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
 

 

merge records from 2 ps files with diff lrecl

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

New User


Joined: 24 May 2010
Posts: 91
Location: Pune

PostPosted: Wed Mar 19, 2014 1:00 pm    Post subject: merge records from 2 ps files with diff lrecl
Reply with quote

Hi All,

I am using the below to merge two ps file records into one ps file using-

Code:
//S05TL   EXEC PGM=ICETOOL
//TOOLMSG  DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//IN1      DD  DSN=KK1.OUTPUT.O2,DISP=SHR
//IN2      DD  DSN=KK2.OUTPUT.O2,DISP=SHR
//OUT      DD  DSN=KK3.PROD.OUTPUT,DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(50,50),RLSE),LRECL=100,RECFM=FB
//TOOLIN   DD  *
  COPY FROM(IN1) TO(OUT) USING(CTL1)
  COPY FROM(IN2) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD  *
  OPTION COPY
/*

IN1 : LRECl= 63,BLKSIZE=27972
IN2 : LRECl=100, BLKSIZE=27900


Please assist.

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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 19, 2014 6:35 pm    Post subject:
Reply with quote

Hello,

Suggest you look at some of the JOINKEYS examples here in the forum.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Thu Mar 20, 2014 12:27 am    Post subject:
Reply with quote

You might be looking for this, also as Dick suggested you can look for JOINKEYS as well.


Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/63)
//IN2 DD DSN=...  input file2 (VB/100)
//OUT DD DISP=MOD,DSN=...  output file (FB/100)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT)
COPY FROM(IN2) USING(CTL1)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=OUT,VTOF,OUTREC=(5,95,100:X)
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri Mar 21, 2014 10:22 pm    Post subject:
Reply with quote

Rohit Umarjikar wrote:


Code:

//IN2 DD DSN=...  input file2 (VB/100)
//CTL1CNTL DD *
  OUTFIL FNAMES=OUT,VTOF,OUTREC=(5,95,100:X)


Rohit,

2 minor points.

1. I am not sure as to why you think OP has a VB dataset.
2. Since you overrode the LRECL to 100 in the JCL the contents from the first copy for the dataset with LRECL of 63 will have binary zeroes padded from position 64 thru 100.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Sat Mar 22, 2014 12:30 am    Post subject:
Reply with quote

Your are Right , I misunderstood the question.

Due to region down, I can not able to test but I think below should work for the TS, please correct if I missed something.



Code:
//STEP0100 EXEC PGM=ICETOOL             
//TOOLMSG  DD SYSOUT=*                 
//DFSMSG   DD SYSOUT=*                 
//IN1      DD  DSN=KK1.OUTPUT.O2,DISP=SHR
//IN2      DD  DSN=KK2.OUTPUT.O2,DISP=SHR
//OUT      DD  DSN=KK3.PROD.OUTPUT,DISP=(MOD,CATLG,DELETE),
//             SPACE=(CYL,(50,50),RLSE),LRECL=100,RECFM=FB 
//TOOLIN   DD *                         
  COPY FROM(IN1) TO(OUT)   USING(CTL1)             
  COPY FROM(IN2) TO(OUT)
//CTL1CNTL DD *                         
  INREC OVERLAY=(100:X)                 
//*
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Sat Mar 22, 2014 1:19 am    Post subject:
Reply with quote

Rohit Umarjikar wrote:
Your are Right , I misunderstood the question.

Due to region down, I can not able to test but I think below should work for the TS, please correct if I missed something.



Code:
LRECL=100,RECFM=FB 
//CTL1CNTL DD *                         
  INREC OVERLAY=(100:X)                 
//*


You really don't need the DCB parameters in JCL as DFSORT is quite capable of calculating based on the input or INREC/OUTREC/OUTFIL control cards. So remove them.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Sat Mar 22, 2014 2:23 am    Post subject:
Reply with quote

Code:
//STEP0100 EXEC PGM=ICETOOL             
//TOOLMSG  DD SYSOUT=*                 
//DFSMSG   DD SYSOUT=*                 
//IN1      DD  DSN=KK1.OUTPUT.O2,DISP=SHR
//IN2      DD  DSN=KK2.OUTPUT.O2,DISP=SHR
//OUT      DD  DSN=KK3.PROD.OUTPUT,DISP=(MOD,CATLG,DELETE),
//             SPACE=(CYL,(50,50),RLSE)
//TOOLIN   DD *                         
  COPY FROM(IN1) TO(OUT)   USING(CTL1)             
  COPY FROM(IN2) TO(OUT)
//CTL1CNTL DD *                         
  INREC OVERLAY=(100:X)                 
//*
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 getting three output files out of JOI... migusd SYNCSORT 4 Mon Jun 05, 2017 11:30 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts WER247A incompatible lrecl Danielle.Filteau SYNCSORT 8 Tue May 02, 2017 4:04 am


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