IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Concatenation PS - Fixed Block files with different Lrecl


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hsiva2003

New User


Joined: 22 Feb 2005
Posts: 10
Location: Chennai

PostPosted: Tue Mar 17, 2009 12:06 pm
Reply with quote

My requirement is to concatenate 7 different FB , PS files of different Record Lengths.

The Output is a NEW PS - FB File with the LRECL of the higher of the 7 files length.

The output should be sorted in the first 5 characters ascending order. I have used SORT / ICETOOL / IEBGENER then SORT.. Nothing is working out.

I am ok with 2 or more steps - in a precise JCL. Please help me out.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Mar 17, 2009 12:19 pm
Reply with quote

I believe that you will need to use SORT to set all of the record lengths to the same value and then sort the data.

There are numerous examples of doing this on the forum.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Mar 17, 2009 9:16 pm
Reply with quote

Siva,

Here's an example of a DFSORT/ICETOOL job that will do what you want.

I assumed the largest input file has LRECL=100, but you can change the job appropriately. Do NOT use USING(CTL1) for the input file(s) with LRECL=100 (unless input position 100 has a blank). If you want more specific help, give more specific information about the RECFM and LRECL of each input file.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file (FB/100)
//IN2 DD DSN=...  input file (FB/50)
//IN3 DD DSN=...  input file (FB/70)
//IN4 DD DSN=...  input file (FB/100)
//IN5 DD DSN=...  input file (FB/60)
//IN6 DD DSN=...  input file (FB/20)
//IN7 DD DSN=...  input file (FB/70)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/100)
//TOOLIN DD *
 COPY FROM(IN1) TO(T1)
 COPY FROM(IN2) TO(T1) USING(CTL1)
 COPY FROM(IN3) TO(T1) USING(CTL1)
 COPY FROM(IN4) TO(T1)
 COPY FROM(IN5) TO(T1) USING(CTL1)
 COPY FROM(IN6) TO(T1) USING(CTL1)
 COPY FROM(IN7) TO(T1) USING(CTL1)
 SORT FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(100:X)
/*
//CTL2CNTL DD *
  SORT FIELDS=(1,5,CH,A)
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top