> -----Original Message----- > From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf > Of Paul Gilmartin > Sent: Friday, April 13, 2012 12:51 PM > To: IBM-MAIN@bama.ua.edu > Subject: Re: Modernizing the BCP code ? > <Snipped> > (But how does PL/S deal with it? Perhaps the DSECT conversion utility > should employ the PL/S rather than the HLASM part of DSECT macros.)
The fly in that ointment would be PL/S constructs like this one in the DCBD macro: %DCBD: MACRO KEYS(DATASET_ORG,DEVICE_TYPE,BASED_VALUE); ANS('?' || MACLABEL || ' DCBDP ' || MACKEYS || ';') SKIP; %END DCBD; Or this one in DCBE: DCBE: MACRO KEYS(END_OF_DATA_NAME,GET_SIZE, BLOCK_TOKEN_SIZE, EA_DSCB, CAPACITY_MODE, NCP_MULTIPLIER,ACCUM_MULTIPLIER, VERIFY_STRIPES,READ_PAST_EOD, BLOCK_SIZE,BUFFER_RMODE,SYNAD_NAME, LOC, SYNC); ANS('?' || MACLABEL || ' DCBEP ' || MACKEYS || ';') SKIP COL(5); %END DCBE; What is any sane conversion program supposed to make out of that? I would think that the DSECT conversion program would have to use the PL/S preprocessor code under the covers to translate that into something that could be used to convert to C. Plus have the PL/S unique macros like "DCBDP" and "DCBEP" in those two examples (yeah, fat chance of that...). At one point I actually thought of trying to use the PL/S parts to translate DSECT macros to C as an interesting side project but gave up when I saw that stuff. I have found that using the EDCDSECT options 'NOLC,EQU(DEF,BIT,BITL)' produces reasonable results that don't need too much manual tweaking to be useful. The results are consistent enough that you can write pre- and post-processors to automate some of the most common tweaks needed (like converting "CHAR[8]" to "void * __ptr64" where appropriate or converting generated struct's to typedef struct's). Peter -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN