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

How to combine four files of different record length


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

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Mon May 11, 2009 3:27 pm
Reply with quote

HI all,
How to combine four files of different record leangth but same record format FB.

File A: LRECL 11
42538512890
42500000001

File B: LRECL 11
49000125249
49000110639

File C: LRECL 25

WIBERG
HERGETT

File D: LRECL 25.

JENNIFER
ERNEST


OUTPUT:
4253851289049000125249WIBERG JENNIFER
4250000000149000110639HERGETT ERNEST


The format should be such that the records from each file should be one beside the other.
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Mon May 11, 2009 3:29 pm
Reply with quote

The output file should be (11+11+25+25) 72 LRECL.
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: Mon May 11, 2009 9:00 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//FILEA DD DSN=....  input fileA (FB/11)
//FILEB DD DSN=....  input fileB (FB/11)
//FILEC DD DSN=....  input fileC (FB/25)
//FILED DD DSN=....  input fileD (FB/25)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/72)
//TOOLIN DD *
COPY FROM(FILEA) TO(T1) USING(CTLA)
COPY FROM(FILEB) TO(T1) USING(CTLB)
COPY FROM(FILEC) TO(T1) USING(CTLC)
COPY FROM(FILED) TO(T1) USING(CTLD)
SPLICE FROM(T1) TO(OUT) ON(73,8,ZD) WITHEACH -
  WITH(12,11) WITH(23,25) WITH(48,25) USING(CTLE)
/*
//CTLACNTL DD *
  INREC OVERLAY=(73:SEQNUM,8,ZD)
/*
//CTLBCNTL DD *
  INREC BUILD=(12:1,11,73:SEQNUM,8,ZD)
/*
//CTLCCNTL DD *
  INREC BUILD=(23:1,25,73:SEQNUM,8,ZD)
/*
//CTLDCNTL DD *
  INREC BUILD=(48:1,25,73:SEQNUM,8,ZD)
/*
//CTLECNTL DD *
  OUTFIL FNAMES=OUT,BUILD=(1,72)
/*
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top