Even a dead horse needs a tail. Parsing CLIST parms involves more than sorting out characters and delimiters. There are (my terminology) three kinds of parms.
1. Positional parms 2. Keyword switch parms 3, Keyword value parms Positional parms must come first in the order coded in the exec. Each variable is assigned whatever value the user has entered. Keyword switch parms must follow positional parms in any order. If the keyword is present, the variable is assigned the value that matches the variable name. 'Match' here means an unambiguous (sub)string. If the match is ambiguous, CLIST prompts for an unambiguous. Keyword value parms must also follow positional parms in any order, coded like this: keyword(value). Value can be anything. Keyword entered by the user must unambiguously match one coded in the CLIST, else CLIST prompts the user. So why the complexity? CLIST is very old, predating ISPF. Hence the user had to supply lots of data at execution time. This framework offers flexibility. On Thu, Sep 30, 2021 at 4:14 PM Bob Bridges <robhbrid...@gmail.com> wrote: > I once wrote an external routine that can break a character string into > various individual parms and return them on the stack. It correctly parses > strings with quotes, parens and comment markers. > > But as you say, even I hardly ever use it. Most routines work perfectly > well with a string of one-word arguments, and if I don't have to remember > what order they come in and don’t have to label them, anything more is > almost never required. > > --- > Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313 > > /* Having your book turned into a movie is like seeing your oxen turned > into bouillon cubes. -John LeCarré */ > > -----Original Message----- > From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf > Of Skip Robinson > Sent: Wednesday, September 29, 2021 18:06 > > ....one of the most powerful features of CLIST is the mechanism by which > parameters/options are passed by the user: positional or keyword, required > or optional, with system prompting. I once saw a REXX routine that > simulated the old command/CLIST parm processing. It was very complicated > and hardly worth the trouble IMHO. > > -- Skip Robinson 323-715-0595 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN