set variable in SYSIN DD *



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

set variable in SYSIN DD *

Postby crazydoc » Wed Jun 08, 2016 4:17 pm

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)
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: set variable in SYSIN DD *

Postby Aki88 » Wed Jun 08, 2016 5:01 pm

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.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: set variable in SYSIN DD *

Postby crazydoc » Wed Jun 08, 2016 5:05 pm

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 )
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: set variable in SYSIN DD *

Postby Robert Sample » Wed Jun 08, 2016 5:13 pm

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: set variable in SYSIN DD *

Postby Aki88 » Wed Jun 08, 2016 5:13 pm

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: >
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: set variable in SYSIN DD *

Postby crazydoc » Wed Jun 08, 2016 5:36 pm

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?
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: set variable in SYSIN DD *

Postby enrico-sorichetti » Wed Jun 08, 2016 7:00 pm

the possibility of passing parametrised ( // SET variables ) in sysin data depends on the zOS level
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: set variable in SYSIN DD *

Postby Aki88 » Wed Jun 08, 2016 7:08 pm

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.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: set variable in SYSIN DD *

Postby crazydoc » Wed Jun 08, 2016 7:33 pm

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?
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: set variable in SYSIN DD *

Postby crazydoc » Thu Jun 09, 2016 4:11 pm

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
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post