View previous topic :: View next topic
|
Author |
Message |
ashayscript
New User
Joined: 05 Dec 2006 Posts: 4 Location: va
|
|
|
|
I use control-m to set a cycle in my jcl and i need to include that cycle variable in a SYSTSIN. What are my options to do so as if I code the following it will not work
Code: |
//set cycle=%%cyc
//SYSTSIN DD *
&cycle
/*
|
by adding the cycle from control-m in my SYSTSIN, it is not recognized. Any help is appreciated. Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
&CYCLE looks like a symbolic parameter - symbolic paramaters cannot be resolved in data. They are resolved when a PROCedure is executed/expanded.
You could write a bit of code that would receive the parm data from a symbolic parameter on the EXEC statement, then write it into a PS file. Your SYSTSIN DD would then point to the file instead of DD *.
The EXEC would look like:
Code: |
//yourstep EXEC PGM=yourpgm,PARM='&cycle' |
|
|
Back to top |
|
|
ashayscript
New User
Joined: 05 Dec 2006 Posts: 4 Location: va
|
|
|
|
dick scherrer wrote: |
Hello,
&CYCLE looks like a symbolic parameter - symbolic paramaters cannot be resolved in data. They are resolved when a PROCedure is executed/expanded.
You could write a bit of code that would receive the parm data from a symbolic parameter on the EXEC statement, then write it into a PS file. Your SYSTSIN DD would then point to the file instead of DD *.
The EXEC would look like:
Code: |
//yourstep EXEC PGM=yourpgm,PARM='&cycle' |
|
Thank you for the information. I havent dealt with PS files before, but I tried researching a little and found dsorg=ps which is added to dcb. Is this the only thing i need to do to make my output a ps file? And after I have specified the dcb=(dsorg=ps) i could then point my SYSTSIN DD to that output file? Sorry about my lack of knowledge and thank you very much for your help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
Yes, dsorg is a parameter that lets you specify PS. If you have a statement in your COBOL program like:
Code: |
SELECT myfile ASSIGN TO UT-S-ddname. |
you will not need to include the dsorg on your DD statement.
Please let us know if you'd like any other info. |
|
Back to top |
|
|
ashayscript
New User
Joined: 05 Dec 2006 Posts: 4 Location: va
|
|
|
|
dick scherrer wrote: |
You're welcome
Yes, dsorg is a parameter that lets you specify PS. If you have a statement in your COBOL program like:
Code: |
SELECT myfile ASSIGN TO UT-S-ddname. |
you will not need to include the dsorg on your DD statement.
Please let us know if you'd like any other info. |
Thank you very much for the help. I will experiment some and hopefully will be able to get it done correctly Thanks again |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcom.
Good luck |
|
Back to top |
|
|
ashayscript
New User
Joined: 05 Dec 2006 Posts: 4 Location: va
|
|
|
|
dick scherrer wrote: |
You're welcom.
Good luck |
Works like a charm. Thank you very much for your help |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
My pleasure |
|
Back to top |
|
|
|