Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
File data to symbolic parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: File data to symbolic parameter
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: 2150
Location: UK

PostPosted: Wed Mar 13, 2019 3:43 pm    Post subject: Reply to: File data to symbolic parameter
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    Post subject:
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    Post subject:
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    Post subject: Re: Reply to: File data to symbolic parameter
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Copy one file to possible multiple files dibyendumandal11111 SYNCSORT 9 Fri Mar 08, 2019 2:47 am
This topic is locked: you cannot edit posts or make replies. Problem while Decompressing the ZIP file Nethraa All Other Mainframe Topics 2 Tue Feb 26, 2019 6:55 am
No new posts Problem while Decompressing the ZIP file Nethraa All Other Mainframe Topics 6 Fri Feb 22, 2019 11:41 pm
No new posts File format conversion prino DFSORT/ICETOOL 22 Thu Feb 21, 2019 11:32 am
No new posts Connnect Direct Sending Zip file from... netcrawler All Other Mainframe Topics 3 Tue Feb 12, 2019 3:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us