IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

File data to symbolic parameter


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
madprasy

New User


Joined: 08 Apr 2008
Posts: 34
Location: Chennai

PostPosted: Wed Mar 13, 2019 11:14 am
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Mar 13, 2019 3:43 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Mar 13, 2019 7:11 pm
Reply with quote

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
View user's profile Send private message
madprasy

New User


Joined: 08 Apr 2008
Posts: 34
Location: Chennai

PostPosted: Wed Mar 13, 2019 9:48 pm
Reply with quote

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
View user's profile Send private message
madprasy

New User


Joined: 08 Apr 2008
Posts: 34
Location: Chennai

PostPosted: Wed Mar 13, 2019 9:49 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Mar 13, 2019 10:13 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top