View previous topic :: View next topic
|
Author |
Message |
Martylin
New User
Joined: 08 Mar 2016 Posts: 13 Location: Taiwan
|
|
|
|
for example
This is a normal sort step
//SET1 MM=201708
//*
//SORT1 EXEC PGM=SORT
//STEPLIB DD DSN=SYS1.LINKLIB,DISP=SHR
//SORTLIB DD DSN=SORT.SORTLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=PSNP.FTXN&MM..PS,DISP=SHR
//SORTOUT DD DSN=....
//SYSIN DD *
SORT FIELDS=COPY
..........
Is it possible to output a dynamic SET value from previous step
or anyway that I can do this ??? thanks
//PROG1 EXEC PGM=PROG1
//....
//....
//*
//SORT1 EXEC PGM=SORT
//STEPLIB DD DSN=SYS1.LINKLIB,DISP=SHR
//SORTLIB DD DSN=SORT.SORTLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=PSNP.FTXN&MM..PS,DISP=SHR
//SORTOUT DD DSN=....
//SYSIN DD *
SORT FIELDS=COPY
.......... |
|
Back to top |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
I Couldn't understand your question. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
The question, as posed, in meaningless. Programs do not and can not set JCL symbols.
It is perfectly possible, and quite common, for a program to store data in a data set that is subsequently analyzed (and, perhaps) printed in a subsequent step.
Code: |
//A EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
HELLO WORLD
//SYSUT2 DD DISP=(,PASS),UNIT=SYSDA,SPACE=(80,(1,1))
//SYSIN DD DUMMY
//B EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=OLD,DSN=*.A.SYSUT2
//SYSUT2 DD SYSOUT=*
//SYSIN DD DUMMY |
Step A copies the contents of the data set specified by the SYSUT1 DD statement to the data set specified by the SYSUT2 DD statement. Step B effectively prints the data set. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
Martylin wrote: |
Is it possible to output a dynamic SET value from previous step
or anyway that I can do this ??? thanks |
There is no such common thing as "dynamic SET value" in neither JCL, not VSAM.
This looks like your own invented terminology.
If you would be so kind to explain your terminology to others then maybe someone could give you an answer. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Google "DFSORT Symbols". |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
If you want to do what I think you want then the answer is no. Your submitted jcl is 'frozen' at the time of submission and cannot be modified during execution.
As previously stated, you can have a program create JCL which can be used by a subsequent job submission. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Maybe a little late to the party, but at least it is a topic from this year
I assume that you know the logic involved for defining the "dynamic" value.
I have in the past used a combination of JCLLIB and INCLUDE statements to sort of do this.
A job PRIOR to the one that you wish to execute would create the required code into a PDS member. This is a separate job, not a previous step !!
Your job would then have something like
Code: |
// JCLLIB ORDER=(PDS name)
//MYCODE INCLUDE MEMBER=member
|
|
|
Back to top |
|
|
|