Page 1 of 2

set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 4:17 pm
by crazydoc
Good day. 've seen a lot of mention of the fact that it is necessary to write a separate program(which will pass the variable via PARM). But, unfortunately, not seen examples of this(besides COBOL, this example unfortunately was not able to understand). Could you help with that? Please give an example for:
//STEP01   EXEC PGM=ICKDSF,PARM='NOREPLYU'
//SYSPRINT DD   SYSOUT=*                  
//SYSIN    DD   *                        
 INIT UNIT(xxx) VFY(yyyxxx) VTOC(z,z,zzz)

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 5:01 pm
by Aki88
Hello,

Whenever you're faced with this kind of query, the best place to look at is usually the IBM manuals.

For instance, "PGM=ICKDSF,PARM='NOREPLYU'", from the IBM manual, corresponds to:

Initializing a volume in offline mode without operator's intervention

In this example, a volume is reinitialized at the minimal level. The VOLID is specified; the volume serial will be changed. Because the VERIFY(volser) parameter is specified in INIT and 'NOREPLYU' is specified in the JCL, no reply U or T is necessary. If either one of the parameters is not specified, the user will be prompted for a reply U or T.

Changing volid with the INIT command can only be done in the offline mode. Therefore if you are running in online mode, you have to vary off the device to change the volser then vary back online to resume normal operation.

Note that if you specify PARM='NOREPLYU,FORCE', the VERIFY(serial) parameter is not required to bypass the operator's intervention (Reply U or T) message.

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 5:05 pm
by crazydoc
Aki88 wrote:Hello,

Whenever you're faced with this kind of query, the best place to look at is usually the IBM manuals.

For instance, "PGM=ICKDSF,PARM='NOREPLYU'", from the IBM manual, corresponds to:


Thanks for the response, but that is not the issue. Foundation - how to pass a variable in a string statement, sysin dd. Changed the basis for the example:
//STEP00   EXEC PGM =ICKDSF
//SYSPRINT DD   SYSOUT = *                  
// SYSIN    DD   *                        
 INIT UNIT ( xxx ) VFY ( yyyxxx ) VTOC ( z,z,zzz )

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 5:13 pm
by Robert Sample
It is not at all clear what you are wanting to accomplish. Since JCL has no strings, your statement
Foundation - how to pass a variable in a string statement, sysin dd.
makes ABSOLUTELY no sense. Start over, explain what you are wanting to do, what you have tried, and why the results you have achieved do not match your expectations.

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 5:13 pm
by Aki88
From your last post, please correct me if I have it right- you want to pass symbolic parameter in your SYSIN for 'ICKDSF' program.

If so, then you'd need to refer the manual to check if symbolics are allowed in the first place with 'ICKDSF' program.

Another method would be to generate the entire control card using a utility program- REXX/*SORT etc, and passing it to you ICKDSF setup. REXX/*SORT both can receive and process values passed to them through symbolics.


<EDIT: Missed Robert's post - AGAIN :oops: >

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 5:36 pm
by crazydoc
Aki88 wrote:Another method would be to generate the entire control card using a utility program- REXX/*SORT etc, and passing it to you ICKDSF setup. REXX/*SORT both can receive and process values passed to them through symbolics.

Sorry for my bad English. That is what is required. Could you give us an example?

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 7:00 pm
by enrico-sorichetti
the possibility of passing parametrised ( // SET variables ) in sysin data depends on the zOS level

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 7:08 pm
by Aki88
Hello,

There are various ways of achieving this depending on programmer's proficiency with the tool of choice.
For example, if you have DFSORT, look at SYMNAMES; there is a complete chapter dedicated to this in the 'DFSORT Application Programming Guide' -> Using symbols for fields and constants.
Couple this with a simple 'OUTFIL BUILD' and you will be able to generate the control card you're looking for; route it to a LRECL=80 dataset which in turn can be fed to the SYSIN of your requisite step.

A REXX EXEC on the other hand will give programmer more flexibility to play around. Possibilities are limitless (for the word's sake) depending on programmer creativity again.

Search the forum/Google for usage of symbolics in DFSORT; there are numerous examples that are available for the same.

Re: set variable in SYSIN DD *

PostPosted: Wed Jun 08, 2016 7:33 pm
by crazydoc
enrico-sorichetti wrote:the possibility of passing parametrised ( // SET variables ) in sysin data depends on the zOS level

Right, in 2 versions.x this task more simple. Forgot to mention this point - used 1.8. Started reading the guide REXX(maybe someone will be useful https://www-01.ibm.com/software/awdtool ... mpubs.html), tomorrow will also check for DFSORT. Also still would like to hear at least a brief description of the matter in REXX, what tool to use?

Re: set variable in SYSIN DD *

PostPosted: Thu Jun 09, 2016 4:11 pm
by crazydoc
A little more information. Did not understand how to use it(understand how to run, but not about getting a practical result)
http://billlalonde.tripod.com/back/mvsh017.htm