Page 1 of 1

JCL to fetch data

PostPosted: Thu Aug 25, 2011 8:04 pm
by Dhana Kumar
Hi,

I would like to know the JCL to fetch the data from one dataset to other new dataset which i am going to create. If some help me it would be great.

Regards
Dhana Venkatesh

Re: JCL to fetch data

PostPosted: Thu Aug 25, 2011 8:33 pm
by Robert Sample
Terminology is critical in IT, where similar terms may mean very different things. JCL executes programs. It cannot "fetch" data -- all JCL does is execute programs. If you are wanting to create a new file as a copy of an existing file, at a minimum you need to tell us whether the source file is VSAM (and if so, if the file is KSDS, ESDS, RRDS, or one of the other VSAM types), sequential, or a PDS. VSAM files are typically copied using IDCAMS, while sequential files are typically copied using SORT or IEBGENER and PDS files are typically copied using IEBCOPY -- although IDCAMS can copy sequential files as well.

Since the JCL for each of these system utiltiies varies, your best and fastest option would be to look them up in the appropriate IBM manual and learn how to use them yourself.

Re: JCL to fetch data

PostPosted: Thu Aug 25, 2011 8:53 pm
by MrSpock
Dhana, I have to admit that I'm a bit perplexed by your topic. A year ago you posted that you wanted to go through some Storage Management Certification programs. Certainly if you're at that level of expertise then you'd know how to do this better than a lot of us.

Re: JCL to fetch data

PostPosted: Thu Aug 25, 2011 11:04 pm
by Frank Yaeger
VSAM files are typically copied using IDCAMS, while sequential files are typically copied using SORT or IEBGENER and PDS files are typically copied using IEBCOPY -- although IDCAMS can copy sequential files as well.


And DFSORT can copy VSAM files as well.

Re: JCL to fetch data

PostPosted: Fri Aug 26, 2011 3:13 pm
by Dhana Kumar
Thanks Frank and Robert for your reply.. Let me Re-phrase my question i need a JCL program which will fetch or copy the information's from an another job(Actual Job).I need to use my JCL Job in the Schedule as Predecessor for the Actual job which i need to copy the information. So if the schedule starts once the Actual job is completed then my job will run, which should copy the information.

Need for copying the information is ?, Since the actual job will automatically delete the data's inside it once it ran. For this reason i am planning to create a JCL program for fetching the information.

Re: JCL to fetch data

PostPosted: Fri Aug 26, 2011 4:40 pm
by Robert Sample
I'm sorry but I don't see how we can help you. JCL executes programs -- "create a JCL program" cannot be done, period. JCL can be created but it executes programs, it is not a program by itself. It also sounds like you need to set your JCL up with the scheduler so you need to work with your site support group to do that.

Furthermore, you have not specified anything about the data so it is impossible to even guide you on which utility to start with.

And finally, if you are so inexperienced (or lazy) as to be unable to find the Utilties or SORT manuals on the IBM web site and look up the sample JCL yourself -- and you cannot bring yourself to ask your site support group, team leader, or coworkers how to write the JCL to execute a batch job to do what you want -- just why do you think we should do your job for you and give you the JCL?

Re: JCL to fetch data

PostPosted: Fri Aug 26, 2011 10:36 pm
by NicC
I need to use my JCL Job in the Schedule as Predecessor for the Actual job which i need to copy the information. So if the schedule starts once the Actual job is completed then my job will run


So which is it to do? Run before or after the 'actual job'?

Re: JCL to fetch data

PostPosted: Sat Aug 27, 2011 12:16 am
by dick scherrer
Hello,

copy the information's from an another job(Actual Job).
What does this mean?

Keep in mind that you believe you know exactly what you want to do, but we have no idea. . .

Suggest you post some example "input" data and what y0u want your new process to do with this data. Are you looking at working with a data file, somthing that is in thw jes output, or something else.

When you abuse the terminology and post nothing we can use to help, we are kinda stuck. . .

Re: JCL to fetch data

PostPosted: Thu Sep 15, 2011 11:03 am
by Dhana Kumar
Thanks Everyone for your replies. I got that utility which is used to copy the data from the actual job.

//LIST1 EXEC PGM=GJTRJARC,PARM='LIST,B=RPD250A'
//SYSPRINT DD DSN=ZZZP.PATCH.OUT1,
// DISP=(,CATLG,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=27930),
// SPACE=(TRK,(2,2),RLSE)

Re: JCL to fetch data

PostPosted: Thu Sep 15, 2011 12:09 pm
by mongan
For those that do not know it, GJTRJARC happens to be a Jobtrac utility which is a CA product. So much for qualified questions - nobody could have solved the question asked with so little information about what is to be done. :(