View previous topic :: View next topic
|
Author |
Message |
gragha
New User
Joined: 25 Jul 2006 Posts: 23
|
|
|
|
Hi,
My program has to print a dataset to a form ID. This is the syntax generally:
SYSOUT=4,OUTPUT=*.XACT6,RECFM=FBA
But the Output variable (XACT6) has to be generated from the program based on who sends the file. The mapping will be done in a DB2 table. So
if A sends the file the Output statement should look like
"OUTPUT=*.XACT1,RECFM=FBA"
if D sends the file the Output statement should look like
"OUTPUT=*.XACT4,RECFM=FBA"
The DB2 table will have the mapping of A to XACT1 and D to XACT4.
But the problem is how to code this in the JCL as it is created from the previous step in the program. Even though I declare it as a symbolic parameter , where can I pass its value from. The assigning of the value to a symbolic parameter should be through a SET statement again which I can hard code.
Or can a set statement have a DSN name in it like
SET Variable=<DSN>
Please let me know |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Once the program knows the routing information, create a "new" job stream and submit it via the internal reader.
The JCL will remain the same and not need to be modified at run-time.
The "new" jcl that is created by the program will be submitted via the internal reader and discarded. |
|
Back to top |
|
|
gragha
New User
Joined: 25 Jul 2006 Posts: 23
|
|
|
|
Hi,
I thought of this once I started to research on this, but there has been a direction to do this in the same Job and not in a separate job.
Thanks. |
|
Back to top |
|
|
|