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: 86
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: 1609
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: 1609
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: 1609
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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