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
 

 

Having only one header while merging files

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

New User


Joined: 27 Mar 2007
Posts: 10
Location: India

PostPosted: Mon Sep 15, 2008 5:14 pm    Post subject: Having only one header while merging files
Reply with quote

Hi,

I'm having input files of LRECL - 5007 and of VB format. I need to merge them into one file with only one header. The O/P file is also of VB and LRECL=5007. The header could be identified by the letter 'D' on the 108(104)th column.

Thanks
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Sep 15, 2008 8:54 pm    Post subject: Reply to: Having only one header while merging files
Reply with quote

mukunthg,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                                 
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DSN=your input vb file1,DISP=SHR
//         DD DSN=your input vb file2,DISP=SHR
//         DD DSN=your input vb file3,DISP=SHR
/*
//SORTOUT  DD DSN=Your output file with 1 header,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
/*
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                         
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,8X,5)),               
  IFTHEN=(WHEN=(116,1,CH,EQ,C'D'),OVERLAY=(5:SEQNUM,8,ZD))
  OUTFIL OMIT=(5,8,ZD,GT,1),                               
  BUILD=(1,4,13)                                           
/*


Hope this helps...

Cheers
Back to top
View user's profile Send private message
mukunthg

New User


Joined: 27 Mar 2007
Posts: 10
Location: India

PostPosted: Tue Sep 16, 2008 8:14 pm    Post subject:
Reply with quote

Thanks a lot Kolusu. It works fine.
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 Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


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