Copy Alternate Records from 2 Input files in to the Single O



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Re: Copy Alternate Records from 2 Input files in to the Single O

Postby Frank Yaeger » Wed Jan 06, 2010 10:13 pm

Can you please provide more information Nov, 2009 DFSORT PTF software,because when I tried above syntax the job is getting abended.


You can find complete information on the Nov, 2009 PTF at:

http://www.ibm.com/support/docview.wss? ... g3T7000174

Ask your System Programmer to install the PTF.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Copy Alternate Records from 2 Input files in to the Single O

Postby skolusu » Thu Jan 21, 2010 12:07 am

upendra_water,

Here is alternative way of doing it in a single step/pass of data if you don't have the Nov 2009 PTF installed.

we concatenate a single line HDR record before each file and then create a seqnum which will we use to sort and get the records in the desired order.
//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
HDR                                                                     
//         DD *                                                         
RECORD-1                                                               
RECORD-2                                                               
RECORD-3                                                               
RECORD-4                                                               
//         DD *                                                         
HDR                                                                     
//         DD *                                                         
RECORD-5                                                               
RECORD-6                                                               
RECORD-7                                                               
RECORD-8                                                               
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  SORT FIELDS=(82,8,CH,A)                                               
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,3,CH,EQ,C'$$$'),PUSH=(81:ID=1)),   
  IFTHEN=(WHEN=(81,1,ZD,EQ,1),OVERLAY=(82:SEQNUM,8,ZD,START=1,INCR=2)),
  IFTHEN=(WHEN=(81,1,ZD,EQ,2),OVERLAY=(82:SEQNUM,8,ZD,START=2,INCR=2)) 
  OUTFIL STARTREC=3,BUILD=(1,80)                                       
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Copy Alternate Records from 2 Input files in to the Single O

Postby Frank Yaeger » Thu Jan 21, 2010 10:39 pm

For more information on the Nov, 2009 DFSORT PTF, see:

http://www.ibm.com/support/docview.wss? ... g3T7000174

If you don't have this PTF installed, ask your System Programmer to install it (it's free).
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post