View previous topic :: View next topic
|
Author |
Message |
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Since the values are sequential sort will do the job, but if the value is not 00002B1234 say 223411B1234 instead of 00002B1234 how to utilize the sort utility, in such case it fails my requirement. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
pkmurali wrote: |
Since the values are sequential sort will do the job, but if the value is not 00002B1234 say 223411B1234 instead of 00002B1234 how to utilize the sort utility, in such case it fails my requirement. |
So you are saying that option 2 is not what you want?
Quote: |
You must choose one or the other.
1) The first record in file-1 inserted between the first and second record in file-2.
2) The record with the value 00002B1234 in file-1 inserted between the two records with the values 00001A1234 & 00003D1234 in file-2. |
How about The first record in file-1 inserted between the two records with the values 00001A1234 & 00003D1234 in file-2?
Or how about option 1? |
|
Back to top |
|
|
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
I need option2 with this value 223411B1234 from file-1 to be inserted in file-2 between 00001A1234 & 00003D1234. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
pkmurali wrote: |
I need option2 with this value 223411B1234 from file-1 to be inserted in file-2 between 00001A1234 & 00003D1234. |
As asked before, does file-1 contain only the one record, whatever the value? |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Based on the information provided so far, try this SyncSort for z/OS job and let us know whether or not it provides the desired output:
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FILE1,DISP=SHR
//SORTOUT DD DSN=&&TEMP1,DISP=(NEW,PASS)
//SYSIN DD *
INCLUDE COND=(1,11,CH,EQ,C'223411B1234')
SORT FIELDS=COPY
/*
//STEP2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&TEMP1,DISP=(OLD,PASS)
// DD DSN=FILE2,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,11,CH,EQ,C'223411B1234'),
OVERLAY=(81:C'00000003'))
SORT FIELDS=(81,8,CH,A),EQUALS
OUTREC BUILD=(1,80)
/* |
|
|
Back to top |
|
|
|