Discussion:
JCL SET command and instream SYSIn
(too old to reply)
i***@SECURITEAM.CO.IL
2008-06-30 09:29:49 UTC
I already tried that and it doesn't work: A jcl set variable orks only on real JCL not on instream SYSIN (DD *). Any workaround? Any alternative to modify JCL and SYSIN (for example, deleting/definning datasets with IDCAMS) at one parameter without having to use ISPF CHANGE ALL?

Thanks for your ideas

Itschak


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Ted MacNEIL
2008-06-30 10:13:40 UTC
>I already tried that and it doesn't work: A jcl set variable orks only on real JCL not on instream SYSIN (DD *). Any workaround?

This has been discussed many times (see the archives).
The answer is NO.
And, this is documented in the JCL manual(s).

-
Too busy driving to stop for gas!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Paul Gilmartin
2008-06-30 12:17:10 UTC
On Mon, 30 Jun 2008 03:28:19 -0600, ***@securiteam.co.il wrote:

>I already tried that and it doesn't work: A jcl set variable orks only on real JCL not on instream SYSIN (DD *). Any workaround? Any alternative to modify JCL and SYSIN (for example, deleting/definning datasets with IDCAMS) at one parameter without having to use ISPF CHANGE ALL?
>
Nope.

Thanks for your ideas
>
I keep some of my JCL members, including one which renames data sets
and defines aliases with IDCAMS, as UNIX shell scripts in which the
actual JCL appears as a here-document. The shell scripts filter
and submit the JCL using parameter substitution in the simpler cases
and sed or awk in the more complicated. One substitution I regularly
do is to create data set names incorporating the current date, not
possible with pure batch JCL.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Scott Barry
2008-06-30 12:53:51 UTC
A JCL SET statement value can also be passed and resolved as a PARM=
string, so it is possible to write a program in your favorite language that takes
the PARM= value and writes the data to a DD allocation in a job-step. And if
you must have multiple data lines substituted, for example as SYSIN, use
multiple job-steps with DISP=NEW for the first step and DISP=MOD for each
additional job-step.

At one site I support, this technique is used to build IDCAMS control
statements for execution.

Scott Barry
SBBWorks, Inc.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Paul Gilmartin
2008-06-30 13:37:41 UTC
On Mon, 30 Jun 2008 07:53:35 -0500, Scott Barry wrote:

>A JCL SET statement value can also be passed and resolved as a PARM=
>string, so it is possible to write a program in your favorite language that takes
>the PARM= value and writes the data to a DD allocation in a job-step. And if
>you must have multiple data lines substituted, for example as SYSIN, use
>multiple job-steps with DISP=NEW for the first step and DISP=MOD for each
>additional job-step.
>
Actually, for a temporary data set, you can use DISP=(MOD,PASS) for
every step because it starts out empty. This makes it easier to
rearrange the order of steps if necessary.

>At one site I support, this technique is used to build IDCAMS control
>statements for execution.
>
Gee, that's ugly. And not quite modular: you have to first install
the helper program. I suppose it could be inline SYSIN to a leading
assembler step. Or Rexx in an IEBGENER step. Gee, I still wish
Rexx could access SET symbol values (Yeah, I know; use SDSF to
read the JCL text.)

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
McKown, John
2008-06-30 13:56:04 UTC
> -----Original Message-----
> From: IBM Mainframe Discussion List
> [mailto:IBM-***@BAMA.UA.EDU] On Behalf Of Paul Gilmartin
> Sent: Monday, June 30, 2008 8:37 AM
> To: IBM-***@BAMA.UA.EDU
> Subject: Re: JCL SET command and instream SYSIn
[snip]
> Gee, that's ugly. And not quite modular: you have to first install
> the helper program. I suppose it could be inline SYSIN to a leading
> assembler step. Or Rexx in an IEBGENER step. Gee, I still wish
> Rexx could access SET symbol values (Yeah, I know; use SDSF to
> read the JCL text.)
>
> -- gil

The biggest "problem" to me with JCL SET commands is that the are not
really JCL. They don't exist once the converter uses them. Sort of like
HLASM GBLx variables. They don't generate any text records themselves.
They just modify the values in other instructions. Likewise, JCL SET
variables and values do not result in "internal text" records.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential. It is for intended addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense. If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Barkow, Eileen
2008-06-30 14:22:29 UTC
I have a program that
processes the SET command values passed to it in the parm field and it
then
uses them to set condition codes.
The program passes numbers as condition codes and has a few reserved
words it recognizes from the SET commands to pass condition code values.

The SET commands are very useful.

Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@BAMA.UA.EDU] On
Behalf Of McKown, John
Sent: Monday, June 30, 2008 9:56 AM
To: IBM-***@BAMA.UA.EDU
Subject: Re: JCL SET command and instream SYSIn

> -----Original Message-----
> From: IBM Mainframe Discussion List
> [mailto:IBM-***@BAMA.UA.EDU] On Behalf Of Paul Gilmartin
> Sent: Monday, June 30, 2008 8:37 AM
> To: IBM-***@BAMA.UA.EDU
> Subject: Re: JCL SET command and instream SYSIn
[snip]
> Gee, that's ugly. And not quite modular: you have to first install
> the helper program. I suppose it could be inline SYSIN to a leading
> assembler step. Or Rexx in an IEBGENER step. Gee, I still wish
> Rexx could access SET symbol values (Yeah, I know; use SDSF to
> read the JCL text.)
>
> -- gil

The biggest "problem" to me with JCL SET commands is that the are not
really JCL. They don't exist once the converter uses them. Sort of like
HLASM GBLx variables. They don't generate any text records themselves.
They just modify the values in other instructions. Likewise, JCL SET
variables and values do not result in "internal text" records.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential. It is for intended addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense. If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
McKown, John
2008-06-30 14:43:09 UTC
> -----Original Message-----
> From: IBM Mainframe Discussion List
> [mailto:IBM-***@BAMA.UA.EDU] On Behalf Of Barkow, Eileen
> Sent: Monday, June 30, 2008 9:22 AM
> To: IBM-***@BAMA.UA.EDU
> Subject: Re: JCL SET command and instream SYSIn
>
> I have a program that
> processes the SET command values passed to it in the parm field and it
> then
> uses them to set condition codes.
> The program passes numbers as condition codes and has a few reserved
> words it recognizes from the SET commands to pass condition
> code values.
>
> The SET commands are very useful.
>

I agree that SET variables are very useful. But I think that they could
be more useful if they were more like UNIX environment variables -
accessible to running programs. Perhaps via the ASASYMBM interface. The
100 char limit on PARM, limits how much data you can pass to a program
using it.

Another weird idea just occurred to me (though I may have read it here).
A subsystem, written by IBM, which "emulates" a sequential file. But
what is read are the subsystem parameters on the JCL. Each subparameter
would be a separate record when read by the program. This could be used
to replace small SYSIN-like data with data which includes symbol
substitution.

Eg:

//DEL EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD SUBSYS=(READ,
// ' DEL &DSN',
// ' SET MAXCC=0'),
// DCB=(RECFM=FB,LRECL=80,BLKSISE=80)

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential. It is for intended addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense. If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Bass, Walter W
2008-06-30 17:30:22 UTC
<snip>
>
> I agree that SET variables are very useful. But I think that
> they could
> be more useful if they were more like UNIX environment variables -
> accessible to running programs. Perhaps via the ASASYMBM
> interface. The
> 100 char limit on PARM, limits how much data you can pass to a program
> using it.
>
> Another weird idea just occurred to me (though I may have
> read it here).
> A subsystem, written by IBM, which "emulates" a sequential file. But
> what is read are the subsystem parameters on the JCL. Each
> subparameter
> would be a separate record when read by the program. This
> could be used
> to replace small SYSIN-like data with data which includes symbol
> substitution.
>
> Eg:
>
> //DEL EXEC PGM=IDCAMS
> //SYSPRINT DD SYSOUT=*
> //SYSIN DD SUBSYS=(READ,
> // ' DEL &DSN',
> // ' SET MAXCC=0'),
> // DCB=(RECFM=FB,LRECL=80,BLKSISE=80)
>
> --
> John McKown
> Senior Systems Programmer
<unsnip>

Also available on the CBT updates as file 779 is a program called
SYMBSUB which reads an 80 column file, does symbol substitutions using
values pulled from jobs own JESJCL and writes the file back out. Using
the example from above, the equivalent function would be coded as
follows:

// SET &DSN=SOME.DSN.NAME
//DOSUBS EXEC PGM=SYMBSUB
//CNTL001I DD *
DEL &DSN
SET MAXCC=0
//CNTL001O DD DSN=&&TMPSYSIN,DISP=(NEW,PASS),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// UNIT=SYSDA,SPACE=(TRK,1)
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DEL EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=&&TMPSYSIN,DISP=OLD

With this there is no need to worry about limitations of parm lengths or
multiple job steps for multiple lines of data. The program will also
handle more than one input and output file in a single step. Just
supply matching CNTLxxxI and CNTLxxxO DD names and it will process them
all.

HTH,
Bill Bass
Senior Applications Developer
United Health Care
Greenville, SC



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Rick Fochtman
2008-06-30 16:23:08 UTC
------------------------------<snip>------------------------
A JCL SET statement value can also be passed and resolved as a PARM=
string, so it is possible to write a program in your favorite language
that takes the PARM= value and writes the data to a DD allocation in a
job-step. And if you must have multiple data lines substituted, for
example as SYSIN, use multiple job-steps with DISP=NEW for the first
step and DISP=MOD for each additional job-step.
-------------------------------<unsnip>-------------------------
I am contributing a "helper program" that might be useful in this area.
It substitutes PARM= values into control statements and writes them to a
DD named SYSIN, then invokes a program that's also specified in the PARM
field. It's called UTILITY and I'm about 15 minutes away from sending it
to the CBTTAPE site. A private E-Mail request will get you a copy.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
Clement Clarke
2008-06-30 13:56:39 UTC
Jol allows this. You can set up a symbolic variable, or use one of the
pre-defined variables, and have it replaced on your card file.

For example, %DAY is set up by Jol

Then...

DCL X * REPLACE;
Today is %DAY
Month %MONTH
EOF;

Print x; /* Print the card file */

See www.ozemail.com.au/~oscarptyltd


Cheers,

Clem


***@securiteam.co.il wrote:
> I already tried that and it doesn't work: A jcl set variable orks only on real JCL not on instream SYSIN (DD *). Any workaround? Any alternative to modify JCL and SYSIN (for example, deleting/definning datasets with IDCAMS) at one parameter without having to use ISPF CHANGE ALL?
>
> Thanks for your ideas
>
> Itschak
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html