I think I've got this. No error checking, but I think it is adequate for my
needs. I will add some error checking, such as for null parameters, where it
is convenient to do so. Here's the Rexx

Quote = '"'

Comma = ','

Parse Value Arg(1) with (Quote) First (Quote) (Comma) (Quote) Second (Quote)
(Comma) Remainder   
Say "<" First ">"

Say "<" Second ">"

Do Until Remainder = ""

  Parse Value Remainder with Token (Comma) Remainder

  Token = Strip(Token)

  Say "<" Token ">"

  End /* Do Until */


Here's the input (DISPPARM is the name of the EXEC member)

//STEPA    EXEC PGM=IKJEFT01,PARMDD=MYPARMS                            
//MYPARMS  DD   *                                                      
DISPPARM                                                               
 "Don't look now but something is gaining on us. The quick brown fox.",
 "Buddy, can you spare a dime? Now is the time for all good men.",     
 Token1, Token2, Token3                                                

And here's the output

< Don't look now but something is gaining on us. The quick brown fox. >  
< Buddy, can you spare a dime? Now is the time for all good men. >       
< Token1 >                                                               
< Token2 >                                                               
< Token3 >                                                               

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Charles Mills
Sent: Thursday, November 19, 2020 3:31 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Has anyone integrated Rexx with IKJPARS? [EXTERNAL]

Thanks, yeah, that is the direction I think I am going. I am thinking of
using " " to delimit the quoted strings, and prohibiting embedded "s. The
use of " is not "traditional MVS" but it is close and I like it.

Then I think I should be able to parse using '"' as a delimiter with minimal
complexity.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Feller, Paul
Sent: Thursday, November 19, 2020 2:19 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Has anyone integrated Rexx with IKJPARS? [EXTERNAL]

Charles, would something like this help?  Now I used ( and ) to surround the
first two items and not a '.  Not tested how you would do the whole ' thing.

----------------------------------------------------------------------
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

Reply via email to