On Fri, 14 Feb 2020 10:52:07 -0800, Charles Mills wrote: >I would assume that Gord is using the EDCDSECT program which is legally part >of the XLC compiler. It assembles the DSECT -- can be either by itself or part >of some larger assembly -- and massages SYSADATA to produce a C-legal struct. > >... Its worst flaw IMHO is to make FOO DS FL8 and similar into char foo[8] . > That deserves an APAR. FL8 is not CL8.
>Our local hero Peter Relson developed an internal tool that does a much better >job, and z/OS is now shipping C struct header files for many, many MVS control >blocks. (The tool is not suitable for release because it uses PL/X input, >which is much better because it is closer to C than HLASM is. PL/X is more >strongly typed than HLASM.) > Aren't some z/OS control blocks distributed bilingual, HLASM and PL/X? >Agree with Lionel's recommendation. Even if the usage is going to be 90% C and >10% HLASM you want to do the DSECT first and work from there. > >This has been discussed here previously, including someone who posted regex >that will automate the conversion of char foo[8] to long long foo; > But what if the original was FOO DS CL8, a common cliche in z/OS? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
