I suspect they would not take an APAR (although of course it turns out I do not actually speak for IBM). I suspect they would cite compatibility concerns if they changed it. Yeah, yeah, I know, could be controlled by an option. I don't think EDCDSECT is IBM's highest priority.
Yes, many control blocks are bilingual. So what? (Not trying to be rude; just mean ... so what?) PL/X is in any event a better starting point for C than is HLASM. Or am I missing your point? I don't recall how the regex works. Perhaps it is semi-manual field by field. Yeah, the problem with HLASM is lack of strong typing. DS CL8 is a perfectly fine way of defining a 64-bit integer in HLASM, but also a common way of course of defining a DD name or member name field. I personally solved the problem by coding some small distinctive comment token -- something like $@$ or something like that -- on every 64-bit integer or address so that they were easy to find (and then fix) in the converted struct. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Friday, February 14, 2020 11:30 AM To: [email protected] Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ? 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? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
