z/OS TSO/E CLISTs
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using &STR when supplying input using SYSIN JCL statements

z/OS TSO/E CLISTs
SA32-0978-00

When you submit a background job that invokes a program, you sometimes include a ‘//SYSIN DD *’ JCL statement that supplies the input statements. If any input statement contains leading blanks or is the same as a CLIST statement, enclose that statement in a &STR built-in function. For example, suppose a hypothetical language called SES has an IF-THEN-ELSE sequence. If you were to include such a sequence in the SYSIN input statements, you need to have to enclose it in an &STR built-in function as shown in the following background invocation of a hypothetical SES program called MATRIX.
PROC 1 FORMAT ACCT() CLASS(A)
CONTROL MAIN
⋮
submit * end(nn)
//&SYSUID1 JOB   &ACCT,&SYSUID,CLASS=&CLASS;
//STEP1     EXEC  PGM=MATRIX
⋮
//SYSIN     DD    *
&STR(  IF &FORMAT=1 THEN OPEN DS1)
&STR(ELSE OPEN DS2)
GETFILES 1-12
&STR(SET COLUMNS=GETFILES)
⋮
nn

Only those input statements that contain leading blanks or are the same as CLIST statements are enclosed in &STR built-in functions. If the CLIST invoked MATRIX in the foreground, the &STR built-in functions need to be unnecessary because the program's statements need to appear in the data set containing MATRIX. Thus, they need to be associated with the program, not the CLIST.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014