View previous topic :: View next topic
|
Author |
Message |
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
|
|
I have came across a requirement, which goes as below
Step 1) Get the current date and format into MM/DD/YY (no century)
Step 2) Move the acquired date as symbolic parameter into unix command using BPXBATCH utility (that unix command converts the MM/DD/YY into arsdate which will be more like an integer value and write into PS file)
Step 3) Fetch the converted date from above step and pass to an SQL query that unloads a db2 table.
I am struggling in the step #2, I am not able move the output of step 1 as symbolic parameter to step 2.
Ultimately I need help in, moving a value from file into symbol.
Yes JCL is not data manipulator, but need help to know the route to achieve this. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Have yu tried using your sort product? Your input would be the JCL to be sent, within sort you would insert the date parts into the relevat positions in the JCL and the whole lot written out to the internal reader. Or you could wtite a small program to do it. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Some of the scheduling products can substitute symbols in the JCL at run-time. You might want to check that option too. |
|
Back to top |
|
|
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
|
|
Arun Raj wrote: |
Some of the scheduling products can substitute symbols in the JCL at run-time. You might want to check that option too. |
Thanks for the suggestion, but we are doing this process in adhoc manner.
So we couldn't afford scheduler as well! |
|
Back to top |
|
|
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
|
|
Nic Clouston wrote: |
Have yu tried using your sort product? Your input would be the JCL to be sent, within sort you would insert the date parts into the relevat positions in the JCL and the whole lot written out to the internal reader. Or you could wtite a small program to do it. |
Ok Sure, let me try and update on this. I suppose this is the closest way to do it. If someone has other ideas, please throw it up! |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
You could write the current date as a SET statement in a PDS member in JobA,
Code: |
// SET SYM1='03/13/19' |
And INCLUDE the member in your BPXBATCH job - JobB.
Or better yet, use a parameter file to pass the parm data to BPXBATCH after creating it with the date you want.
Quote: |
To pass parameters to BPXBATCH using a parameter file, you define a file containing the parameter data and allocate it to the ddname STDPARM. The parameter file can be one of the following:
A z/OS UNIX text file
An MVS™ data set
The default is to use the parameter string specified on the TSO command line or in the PARM= parameter of the JCL EXEC statement. If the STDPARM ddname is defined, BPXBATCH uses the data found in the specified file rather than what is found in the parameter string or in the STDIN ddname. |
z/OS UNIX System Services User's Guide >> Using z/OS UNIX from batch, TSO/E, and ISPF >> The BPXBATCH utility |
|
Back to top |
|
|
|