MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Merging multiple input files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
jayram99
Beginner


Joined: 16 Aug 2004
Posts: 52
Topics: 21
Location: falls church.va,usa

PostPosted: Mon May 09, 2016 12:41 pm    Post subject: Merging multiple input files Reply with quote

Please see the below details.
Code:

//JS20     EXEC PGM=SORT,REGION=0M,
//           PARM='CORE=MAX,DYNALLOC=(SYSDA,25)'
//*
//SORTIN   DD DSN=MIS.EXTRACT.ABCD2060.CZT,
//            DISP=(SHR,KEEP,KEEP)
//         DD DSN=MIS.EXTRACT.ABCD2062.LAU,
//            DISP=(SHR,KEEP,KEEP)
//         DD DSN=MIS.EXTRACT.ABCD2064.LBL,
//            DISP=(SHR,KEEP,KEEP)
//SORTOUT  DD DSN=MIS.EXTRACT.ROLLUP.ABCD3025,
//            DISP=(NEW,CATLG,DELETE),
//            LABEL=RETPD=0290,
//            DCB=(RECFM=VB,BLKSIZE=0,DSORG=PS),
//            UNIT=CART
//*
//SYSOUT   DD SYSOUT=*
//*
//SYSIN    DD DSN=&ENV.MIS.PARMLIB(CWD3025A),
//            DISP=(SHR,KEEP,KEEP)


I have a requirement to Merge 3 Input Files and sometimes I might not receive MIS.EXTRACT.ABCD2060.CZT File.
The job should sort/merge other 2 files (MIS.EXTRACT.ABCD2062.LAU and MIS.EXTRACT.ABCD2064.LBL).

How to execute job with only 2 input files. Please advice.

Thank you.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Mon May 09, 2016 5:34 pm    Post subject: Reply with quote

Please look at your SORT manual to see what "merge" means in a SORT context. You are not merging, you are just SORTing multiple datasets together.

Presumably the "schedule" "knows" that the file is not present? Use a different JOB which is the same but does not have the missing dataset.

Dirtier way, just delete the dataset from the JCL when you know it isn't present.

Other simple things of the above type.

Out of interest, do you know the defaults for SHR? You never need to specify KEEP,KEEP, because SHR does that automatically.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 10, 2016 10:44 am    Post subject: Re: Merging multiple input files Reply with quote

jayram99 wrote:

I have a requirement to Merge 3 Input Files and sometimes I might not receive MIS.EXTRACT.ABCD2060.CZT File.
The job should sort/merge other 2 files (MIS.EXTRACT.ABCD2062.LAU and MIS.EXTRACT.ABCD2064.LBL).

How to execute job with only 2 input files. Please advice.

Thank you.


You have 2 options

1. Code an IEFBR14 step with DISP=(MOD,KEEP,DELETE) for each file and even if the file did not exist it will be present for the SORT step.

2.Code the JCL as a PROC and depending on the availability of the files you can DUMMY out the unavailable file.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jayram99
Beginner


Joined: 16 Aug 2004
Posts: 52
Topics: 21
Location: falls church.va,usa

PostPosted: Wed May 11, 2016 10:17 am    Post subject: Merging multiple input files Reply with quote

Thanks Kolusu.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group