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
 

 

Merge 5 files,create one file with count in HDR & TRL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
puneetvirmani143

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Sat Mar 02, 2013 9:45 am    Post subject: Merge 5 files,create one file with count in HDR & TRL
Reply with quote

Hi,

I will be getting 5 files from offhost system (which are junks of same file) to be combined together on mainframe. All have LRECL=4000, RECFM=FB and have header & trailer

1. Header & Trailer are in following format:
a) HEADER<<FILENAME>><<COUNT of detail records>>
b) TRAILER<<COUNT of detail records >>

Note: Count of detail records appearing header and trailer are equal in each respective file. FILENAME will be same in all 5 files.

2) key field in detail record starts at Position 1 and length 11 bytes.

Output Expected.

1. Combine all 5 files so that details records appear in sorted order of Key field and duplicates are rejected on the basis of Key field.

2. Only 1 header and 1 trailer should appear in the combined file with count appearing in Header & trailer to match with the count of detail records in Output combined file.

3. while creating header for output file, Pos1 - Pos 20 of header (all byte position before the start of count) should be used. These Byet pos1-Pos20 will be same in all 5 files.

Please suggest.
Back to top
View user's profile Send private message

puneetvirmani143

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Sat Mar 02, 2013 12:58 pm    Post subject: Reply to: Merge 5 files,create one file with count in HDR &a
Reply with quote

Can anyone please help with this requirement ? Thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Sat Mar 02, 2013 1:52 pm    Post subject: Reply to: Merge 5 files,create one file with count in HDR &a
Reply with quote

it' s saturday, nobody works...
so You have no reason to solicit for an answer after 3 hours of the initial post.

You should remember that replying is ...
on voluntary base
free of charge
interest of the topic

in less PC words... when and if we feel like

if You have time constraints, a forum is not the best place to ask

problems like this one have been discussed soo many times that have become pretty boring

did You search the forum before soliciting for a reply ???

some of the topics having hints on the solution were even started by YOU !
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7255

PostPosted: Sat Mar 02, 2013 2:58 pm    Post subject: Reply to: Merge 5 files,create one file with count in HDR &a
Reply with quote

puneetvirmani143,

As enrico has pointed out, you should already have sufficient knowledge from last December about how to do this, including the "stupidity" of having the record-count on the header.

With the record-count on the header, you know for certain that the header has been added after the creation of the data-records. So, until the point that the header is added, the file is "unprotected" by it, and lots of things can happen to mess it up before something comes along and stamps it "This file is fine". Nuts.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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