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.
SAY 'TESTPARS: Start REXX'
Parse Upper External TESTPRM
SAY 'Display TESTPRM.. ' TESTPRM
STRPOS = pos('(',TESTPRM,1)
STRPOS = STRPOS + 1
ENDPOS = pos(')',TESTPRM,1)
LENDSN = ENDPOS - STRPOS
PARM01 = Substr(TESTPRM,STRPOS,LENDSN)
SAY 'Display TESTPRM/PARM01.. ' PARM01
STRPOS = pos('(',TESTPRM,ENDPOS)
STRPOS = STRPOS + 1
ENDPOS = pos(')',TESTPRM,STRPOS)
LENDSN = ENDPOS - STRPOS
PARM02 = Substr(TESTPRM,STRPOS,LENDSN)
SAY 'Display TESTPRM/PARM02.. ' PARM02
STRPOS = pos(',',TESTPRM,ENDPOS)
STRPOS = STRPOS + 1
ENDPOS = pos(',',TESTPRM,STRPOS)
LENDSN = ENDPOS - STRPOS
PARM03 = Substr(TESTPRM,STRPOS,LENDSN)
SAY 'Display TESTPRM/PARM03.. ' PARM03
STRPOS = pos(',',TESTPRM,ENDPOS)
STRPOS = STRPOS + 1
ENDPOS = LENGTH(TESTPRM)+1
LENDSN = ENDPOS - STRPOS
PARM04 = Substr(TESTPRM,STRPOS,LENDSN)
SAY 'Display TESTPRM/PARM04.. ' PARM04
TESTPARS: Start REXX
(1234567890),(ABCDEF),TOKEN01,TOKEN02
Display TESTPRM.. (1234567890),(ABCDEF),TOKEN01,TOKEN02
Display TESTPRM/PARM01.. 1234567890
Display TESTPRM/PARM02.. ABCDEF
Display TESTPRM/PARM03.. TOKEN01
Display TESTPRM/PARM04.. TOKEN02
***
Thanks..
Paul Feller
GTS Mainframe Technical Support
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Charles Mills
Sent: Thursday, November 19, 2020 1:30 PM
To: [email protected]
Subject: Has anyone integrated Rexx with IKJPARS? [EXTERNAL]
It would appear to be a lot of work, but it would seem that "TSO format command
parsing" and Rexx would be a natural marriage.
I have never used IKJPARS, so I don't claim to be an expert, and others might
disagree.
The issue I am struggling with is that for all of Rexx's parsing power, which
is of course legendary, it does not seem well-suited to classic "MVS"
(for want of a better term) quoted strings. I am considering an EXEC that would
accept parameters of
'a quoted string', 'another quoted string', simpletoken1, simpletoken2, ...
I don't see a good way to parse -- without resorting to a
character-by-character loop -- input such as
'now isn''t the time', 'nor, is this', MYTOKEN, YOURTOKEN
Am I missing something?
It would be great if one could define the expected parameters and their format
to Rexx in some systematic way, parse the user's input, and get back either
parameter values in stem variables, or an error message to present to the user.
Any suggestions?
Charles
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
Please note: This message originated outside your organization. Please use
caution when opening links or attachments.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN