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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts SORT Block of records girishb2 DFSORT/ICETOOL 12 Thu Sep 15, 2016 8:58 am


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