1. Thanks for allowing me to clarify. I did not for a second mean "the OP should use Rexx instead." I was just comparing the learning curve for the two languages.
2. Interesting idea. IBM ships a program with the C compiler called EDCDSECT that maps a DSECT into a struct. That program and its problems is a thread of its own. But I like what you are suggesting: software that would somehow map a DSECT into a Rexx stem. Rexx as you say would seem to be poorly suited: Rexx does not really have "records" made up of "fields." When I have tried to be systematic about mapping a record to Rexx I have defined offsets and lengths so that I could code SOMEFIELD = SUBSTR(RECORD, SOMEFIELD_OFFSET, SOMEFIELD_LENGTH). It would be very cool if one could create a "DSECT converter" that would create a conversion map such that one could code for example CALL CONVERT InputJFCB, MYJFCB, JFCBconversionMap Say "DSN =" MYJFCB.JFCBDSNM ", Member =" MYJFCB.JFCBELNM A lot of thought required. Converting every field from a non-trivial DSECT would be a lot of overhead. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Sunday, July 5, 2020 1:51 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Assembler question On Sat, 4 Jul 2020 15:28:44 -0700, Charles Mills wrote: >I am not sure what you are trying to achieve in the big picture but assembler >is not something you can spend a short time on and expect to have something >that works. > >Rexx -- you could study it for 5 minutes and be able to write SAY "Hello >World" and you would have a working first program. Not so with assembler. >There are an awful lot of gotchas before you can get to first base, before >your first working program. > I largely concur. But the OP's intent was to access fields in a control block. Rexx is poorly suited to the task. I wonder if someone has attempted to map from an Assembler SYSPRINT or ASMADATA to an initialization of a Rexx compound symbol and a few functions to access the fields, such as: GETFIELD: parse arg NAME FIELD Work = substr( value( NAME.CONTENT, NAME.FIELD.OFFSET, NAME.FIELD.LENGTH ) ) interpret 'return c2'NAME.FIELD.TYPE'( Work )' (Work (not) in progress; totally untested; suffers Use-Mention conflation.) -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN