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
 

 

Concatenation PS - Fixed Block files with different Lrecl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Concatenation PS - Fixed Block files with different Lrecl
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: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 17, 2009 12:19 pm    Post subject:
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 Moderator


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

PostPosted: Tue Mar 17, 2009 9:16 pm    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 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