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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


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