Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is it possible to pass a parameter into a record using JCL ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ARUL PRASATH

New User


Joined: 04 Mar 2014
Posts: 1
Location: India

PostPosted: Tue Mar 04, 2014 3:03 pm    Post subject: Is it possible to pass a parameter into a record using JCL ?
Reply with quote

Hi, I want to create a file whose name varies along with a single record in it whose 8th to 11th position also varies with the date of submission of the Job. For e.g, If I want to create the file on 172nd day of the year, the file should have name of XXX.YYY.K172 and the record generated should have the value 'K172' in 8th-11th position.

I am creating the file with the file name as required since I pass the value 'K172' as a parameter into the JCL. But I do not know any method to create a record in a file just using JCL. So I made an existing file as a reference file and made the job to copy the data from the reference file so that I can have the record. The problem is the variable in the record as mentioned above.
I learnt we can use Overlay function to pass it as character but I have 20+ files to be created like this and it is not possible to edit all the 20+ files in the JCL at a time. Is it possible to move the variable into the record as a parameter like we use it to name the file ?

Or Is there any other way to generate a file with a single record using JCL like mentioned above by passing the values to the record ?

The record length is 160 bytes and it has 2 variables each of length 4 and 6. All other values are default.

Thanks in advance
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Mar 04, 2014 3:10 pm    Post subject: Reply to: Is it possible to pass a parameter into a record u
Reply with quote

to do it in one step depends on Your zOS level ( 2.xxxx required )
and the standards in use in Your organization

You will have to do do it in two jobs
the first one will build the second one and submit it thru the internal reader

unless You have a scheduler that blindly substitutes a scheduler parameter with the proper value
in this case everything could be automated without any human intervention by having the scheduler substitute the ( for example ) job run day
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Tue Mar 04, 2014 4:14 pm    Post subject:
Reply with quote

Enrico has given the best solution..in one of my current job flow similar to this getting executed.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Mar 04, 2014 10:05 pm    Post subject: Reply to: Is it possible to pass a parameter into a record u
Reply with quote

ARUL PRASATH,

Unless I grossly misunderstood the question, it is a quite simple job for DFSORT where you can pass parms Via JPn construct. With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct, 2010), you can now use DFSORT's new JP1 Symbols to pass parms to sort like shown below

Code:

//   SET PASSVAL='K172'                               
//STEP0100 EXEC PGM=SORT,PARM='JP1"&PASSVAL"'         
//SYSOUT   DD SYSOUT=*                               
//SORTIN   DD *                                       
//SORTOUT  DD DSN=XXX.YYY.&PASSVAL,               
//            DISP=(NEW,CATLG,DELETE),               
//            SPACE=(TRK,(1,0),RLSE)                 
//SYSIN    DD *                                       
  OPTION COPY                                         
  OUTFIL REMOVECC,BUILD=(160X),HEADER1=(8:JP1)       
//*


Check this link which explains in detail about Using SET and PROC Symbols in DFSORT and ICETOOL Statements.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca60/8.7?

enrico-sorichetti,

Why do you think you need z/OS 2.1x? Are you thinking of PARMDD?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Mar 04, 2014 10:51 pm    Post subject: Reply to: Is it possible to pass a parameter into a record u
Reply with quote

Quote:
Why do you think you need z/OS 2.1x?

I was just thinking about parameter substitution in a generic sysin
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us