How to receive job card statements from ISPF panel to CLIST

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
User avatar
Kirthana
New Member
Posts: 3
Joined: Fri Aug 26, 2022 7:31 pm

How to receive job card statements from ISPF panel to CLIST

Post 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
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
User avatar
Kirthana
New Member
Posts: 3
Joined: Fri Aug 26, 2022 7:31 pm

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

Post 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.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
User avatar
Kirthana
New Member
Posts: 3
Joined: Fri Aug 26, 2022 7:31 pm

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

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”