Is XPROC on file 896 of the CBTTAPE the CLIST keyword processor for REXX? I also remember something called XPARSE that was an interface to IKJPARSE.
BTW, wouldn't "acid " be a more reader friendly name for an ACID? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Bob Bridges [[email protected]] Sent: Friday, June 18, 2021 11:30 AM To: [email protected] Subject: Re: Coding for the future I don't disagree, but I think I've found a way around it -- a way that satisfies me most days, anyway. Almost all my REXX programs start something like this: /* This REXX does a blah, blah, blah.... */ parse source . calltyp self . aid='' /* ACID */ fterm=0 /* start with TERMINAL mode off */ nit=5 /* default iteration count */ arg args; do while args<>''; parse var args arg args; select when arg='DBG' then trace 'I' when abbrev('TERMINAL',arg,4) then fterm=1 when datatype(arg)='NUM' then nit=arg when length(arg)<=8 then aid=arg otherwise call abend arg'?',"I don't understand what you mean", "by '"arg"'."; end; end if aid='' then call abend 'No ACID!',"I need an ACID from you." Sometimes I have many WHEN statements in this section, each one identifying a particular argument. You'll notice that the operator can enter arguments for the above program in any order and still have them identified correctly, the only restriction (in this case) being that there cannot be an ACID named "DBG". I can handle named arguments, too, eg "TYPE(PROFILE)", but I rarely need them. I agree that CLIST handles this better, and every so often I think about a REXX subroutine that imitates it. Then any of my REXXes could call the subroutine, and the subroutine could parse the arguments and return them on the stack. I've gotten as far writing something that handles embedded quotes and comments, but haven't expanded it to parens yet. --- Bob Bridges, [email protected], cell 336 382-7313 /* You'd better check the temperature in hell, first. -Sinclair */ -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Seymour J Metz Sent: Wednesday, June 16, 2021 04:24 That's one of the few weaknesses of REXX compared to CLIST; no keyword parameters. It's actually easier to parse TSO command operands in assembler than in REXX. I wish that REXX included XPARSE, or an equivalent to the Perl Getopt::Long package. Even the PROC statement of CLIST would be an improvement. ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Bob Bridges [[email protected]] Sent: Tuesday, June 15, 2021 6:06 PM 4) This isn't exactly a bad-coding issue, but as much as possible I want the input arguments on a command to come in any order I happen to think of them at the time. My routine to search through a concatenation of PDSs for a particular module has to receive the DD and module name in a particular order, but mostly it's possible to say "tso command arg1 arg2 arg3" or "tso command arg2 arg1 arg3" without any confusion. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
