IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Having only one header while merging files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top