Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 2249
Location: Hampshire, 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
No new posts File transfer issue with end of line ... VINAY PALLELA TSO/ISPF 4 Thu Nov 14, 2019 12:01 am
No new posts Extract data from n DB2 Views automat... esmeraldo All Other Mainframe Topics 5 Wed Nov 13, 2019 12:32 am
No new posts adrdssu for copy all data robyjhl JCL & VSAM 5 Tue Nov 12, 2019 11:17 pm
No new posts File compare, where file has header a... VINAY PALLELA SYNCSORT 8 Thu Nov 07, 2019 5:05 pm
No new posts Convert mainframe data to .csv format... karan_reddy DFSORT/ICETOOL 10 Sat Nov 02, 2019 2:09 am

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