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 Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts Limit in Length for a CICS START seahawk789 CICS 6 Mon Apr 02, 2018 8:34 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am
No new posts How to build one file from two input ... daniele DFSORT/ICETOOL 5 Tue Feb 27, 2018 6:45 pm

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