Page 1 of 1

How to receive job card statements from ISPF panel to CLIST

Posted: Fri Aug 26, 2022 7:39 pm
by Kirthana
Hello,
I am looking at sending the JOB statements from my ISPF panel to CLIST into a variable. And then I use the variables in rexx to generate a final job. But the CLIST SET = parameter does not seem to accept the long line with symbols. What is the best way to do this please?

ISPF dialog panel code is like this:
+ JOBCARD ==>$JC1 +
+ $JC2 +

VER(&JC1,NONBLANK)
VER(&JC2,NONBLANK)

CLIST receives the input like this:
SET JOB1 = &JC1
SET JOB2 = &JC2

Error:
SET JOB1 = //AAAAAAAL JOB ATXXX,'SUPERC',CLASS=A,
THIS STATEMENT HAS AN EXPRESSION WITH OPERATORS OUT OF SEQUENCE
***

Regards,
Kirthana

Re: How to receive job card statements from ISPF panel to CLIST

Posted: Sat Aug 27, 2022 12:15 am
by Robert Sample
If you check the syntax of the SET statement, it has an optional label followed by SET followed by variable name followed by EQ or = (either is okay) followed by a value. Since space is a delimiter, you are attempting to pass it a batch of values. Try putting quotes around the value such as

Code: Select all

SET JOB1 = "//AAAAAAAL JOB ATXXX,'SUPERC',CLASS=A, "
Note that I don't do enough CLIST coding to know if the double quote marks will work or if you need to use single apostrophes instead:

Code: Select all

SET JOB1 = '//AAAAAAAL JOB ATXXX,''SUPERC'',CLASS=A, '
If it is apostrophes, noted that there need to be two apostrophes around the programmer name field in the job card since the usual IBM way to include quotes inside quotes is to double them.

Re: How to receive job card statements from ISPF panel to CLIST

Posted: Tue Aug 30, 2022 2:19 pm
by Kirthana
Thanks for the response, Robert.

I tried adding double quotes around the CLIST values like below, it seems to accept the quotes however still throws the same error.
SET JOB1 = "&JC1"
SET JOB2 = "&JC2"

SET JOB1 = "//HUZ06D4L JOB AT99740,'SUPERC',CLASS=A,"
THIS STATEMENT HAS AN EXPRESSION WITH OPERATORS OUT OF SEQUENCE
***
I am not sure what operator is it referring to in this error.

Re: How to receive job card statements from ISPF panel to CLIST

Posted: Tue Aug 30, 2022 6:25 pm
by Robert Sample
Try it without the embedded quote marks (this is purely a guess):

Code: Select all

SET JOB1 = "//HUZ06D4L JOB AT99740,SUPERC,CLASS=A," 
The Messages manual says
AN EXPRESSION WITH OPERATORS OUT OF SEQUENCE

Explanation
The expression-handling routine found an invalid combination of operators and data elements.
which isn't especially helpful in this case. If the error continues, you've hit the end of my CLIST expertise so I don't have any other ideas.

Re: How to receive job card statements from ISPF panel to CLIST

Posted: Tue Aug 30, 2022 7:17 pm
by Kirthana
Thanks again. Tried without the embedded quotes but the error persists.
Having read some manuals, got to know about &STR function and used like below:
SET JOB1 = &STR(&JC1)
SET JOB2 = &STR(&JC2)

This seems to have fixed the error and my CLIST progresses.
Now figuring out to pass the JOB1, JOB2 strings from CLIST to a REXX.
Thanks very much for your inputs.