Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us