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
 
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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