The quotes were OK, the space between translate and the left paren was not. Fixing that
parm="INDSN('HLQ.DSNAME(MEMBER)')" Parse Value Translate(parm,"","'")' ' With fill1 '(' val ') ' fill2;say 'fill1='fill1 'val='val 'fill2='fill2 gives me fill1=INDSN val= HLQ.DSNAME(MEMBER fill2=) Not only did it lose the RP, it also stripped off the apostrophes indicating that it was a FQDSN. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Dale R. Smith [dale-sm...@columbus.rr.com] Sent: Thursday, February 27, 2020 11:29 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Rexx parse using period as placeholder On Thu, 27 Feb 2020 19:07:37 +0800, David Crayford <dcrayf...@gmail.com> wrote: >OK. Let me change the requirements again ;) How about also handling >single quotes for a fully qualified data set. > >Simple to do with a regex. Not so simple using REXX. > >Syntax: > > INDSN(DSNAME(MEMBER)) > INDSN(DSNAME) > INDSN('HLQ.DSNAME(MEMBER)') > INDSN('HLQ.DSNAME') Here is your one line REXX solution: Parse Value Translate (parm,"","'")' ' With . '(' val ') ' . Hopefully the single and double quotes come thru correctly. -- Dale R. Smith ---------------------------------------------------------------------- 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