Page 1 of 1

fetch a record from a PS and write it in jcl

PostPosted: Mon Apr 27, 2009 5:14 pm
by kuldeep negi
Hi,

Please suggest me how can i fetch a record (for a filename )from the PS and write that record into the jcl against the corresponding file name

can this be done using rexx?

thanks

Re: fetch a record from a PS and write it in jcl

PostPosted: Mon Apr 27, 2009 5:27 pm
by MrSpock
You're asking how to write a basic file I/O routine in REXX? Again, like your last topic, more details please. Give us an example of the code you've already done and some indication of where you're stuck.

Re: fetch a record from a PS and write it in jcl

PostPosted: Mon Apr 27, 2009 7:59 pm
by dick scherrer
Hello,

You should also consider showing what your input is and what you want as output from that input.

Re: fetch a record from a PS and write it in jcl

PostPosted: Tue Apr 28, 2009 12:56 pm
by kuldeep negi
Hi,

To be more precise and clear, my requirement is as follows:

My input file (PS) is in the below given format:

delivery-------- delivery file --------- tape no.
kk1 --------ttuu.jjuu.file1.mar09---- 15433
kk1 --------ttuu.jjuu.file2.mar09---- 15434,45668
bb1 --------ttuu.jjuu.file3.mar09---- 15445

similarly it contains multiple records (more than 100)

secondly, i have a JCL wherein i am copying these delivery files to some other datasets. for copying these delivery files i am giving the tape no. in the JCL for each delivery file.

As this activity happens 4 days in a week. so it is quite tedious job to copy the tape numbers every time from the input file and paste it in the jcl for each delivery file.

can u please suggest if this can be done using REXX in a more simpler way?

Thanks.

Re: fetch a record from a PS and write it in jcl

PostPosted: Tue Apr 28, 2009 4:36 pm
by expat
Take a look at the ISPF services guide by clicking HERE

Read the section(s) on file tailoring

Re: fetch a record from a PS and write it in jcl

PostPosted: Tue Apr 28, 2009 5:20 pm
by MrSpock
Looking at the description of the process, if this were me, I think I'd use a liberal amount of INCLUDE statements throughout the JCL instead of constantly changing or re-writing the JCL.

Re: fetch a record from a PS and write it in jcl

PostPosted: Tue Apr 28, 2009 6:18 pm
by kuldeep negi
Hi Mr Spock,

Thanks a lot for your suggestion. But the tape no.'s are different every time so i think we will have to change the tape no.'s in the JCL every time. please let me know if am wrong.

Also, can u please tell me how to use include statements in JCL for this process.