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
 

 

How to combine four files of different record length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to combine four files of different record length
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    Post subject:
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 Moderator


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

PostPosted: Mon May 11, 2009 9:00 pm    Post subject:
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    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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 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 Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm


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