Merge some of the files out of many files in JCL?
-
- New Member
- Posts: 1
- Joined: Wed Aug 13, 2014 4:30 pm
Merge some of the files out of many files in JCL?
Hello,
There is a catalogued procedure in which 15 files are concatenated. Now for some reason I need to merge some files in the same steps. For example, how to override these files such that file2, file5,file9 and file15 are merged?
I did not answer the question as I don't how to do it. Can someone suggest an answer.
There is a catalogued procedure in which 15 files are concatenated. Now for some reason I need to merge some files in the same steps. For example, how to override these files such that file2, file5,file9 and file15 are merged?
I did not answer the question as I don't how to do it. Can someone suggest an answer.
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: Merge some of the files out of many files in JCL?
You could dummy the FILE2,FILE5,FILE9 and FILE15 and override the merged dataset as a new dataset.
zprogrammer
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Merge some of the files out of many files in JCL?
You can't use DUMMY or DSN=NULLFILE in a concatenation if it is followed by data that you want.
You'd have to override to a dataset with no records but with an end-of-file (been opened for output, and closed).
You'd have to override to a dataset with no records but with an end-of-file (been opened for output, and closed).
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Merge some of the files out of many files in JCL?
I agree with William. Once you have DUMMY in the concatenated files, that's the 'end of file' - rest of the files in the concatenation, after the DUMMY, are ignored by the system.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: Merge some of the files out of many files in JCL?
Thanks for correction Anuj and Williams
zprogrammer
Re: Merge some of the files out of many files in JCL?
So, if you want to concatenate only datasets 2, 4, 9 and 15 you code them as the first four and the fifth is DUMMY:
Code: Select all
//DDNAME DD DSN=DATASET2,DISP=SHR
// DD DSN=DATASET4,DISP=SHR
// DD DSN=DATASET9,DISP=SHR
// DD DSN=DATASET15,DISP=SHR
// DD DUMMY
Regards
Nic
Nic
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute