Use DUPKEYS with OUTFIL



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Use DUPKEYS with OUTFIL

Postby gabrielp » Tue Feb 18, 2014 9:28 pm

I have an step thar I want 2 files out. Fisrt of them i'd like all regs sorted. The second one, i'd like all regs sorted but, i'd like the maximiun value of (05,26) for each duplicated keys.

can I do it this way?


SORT FIELDS=(01,04,BI,A)
OUTFIL FILES=01,
OUTREC=(01,50)
OUTFIL FILES=02,
DUPKEYS MAX=(05,26,BI)

thanks
gabrielp
 
Posts: 5
Joined: Tue Feb 18, 2014 9:23 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Use DUPKEYS with OUTFIL

Postby BillyBoyo » Tue Feb 18, 2014 10:42 pm

No, but have look at OUTFIL reporting features,

These users thanked the author BillyBoyo for the post:
gabrielp (Tue Feb 18, 2014 11:01 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Use DUPKEYS with OUTFIL

Postby gabrielp » Tue Feb 18, 2014 10:57 pm

do you know any other way do do this in 1 sept?
gabrielp
 
Posts: 5
Joined: Tue Feb 18, 2014 9:23 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Use DUPKEYS with OUTFIL

Postby dick scherrer » Wed Feb 19, 2014 12:42 am

Hello and welcome to the forum,

do you know any other way do do this in 1 sept?
i do not understand what this is asking . . . :?
Please clarify.

d
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Use DUPKEYS with OUTFIL

Postby gabrielp » Wed Feb 19, 2014 7:37 pm

do you know how can i do it (I want 2 files out. Fisrt of them i'd like all regs sorted. The second one, i'd like all regs sorted but, i'd like the maximiun value of (05,26) for each duplicated keys.) using only one step.
gabrielp
 
Posts: 5
Joined: Tue Feb 18, 2014 9:23 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Use DUPKEYS with OUTFIL

Postby dick scherrer » Thu Feb 20, 2014 12:53 am

Hello,

You really need to make sure of the spelling of what you post. . . . The 1 sept was a mystery . . .

I suppose regs are records?

Suggest you post some sample input data and the outputs you want from that sample input.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Use DUPKEYS with OUTFIL

Postby gabrielp » Thu Feb 20, 2014 1:17 am

input
0001gabriel20
0001gabriel50
0001gabriel30
0002roberta10
0002roberta60
0002roberta20


output1:
0001gabriel20
0001gabriel30
0001gabriel50
0002roberta10
0002roberta20
0002roberta60

output2:
0001gabriel50
0002roberta60
gabrielp
 
Posts: 5
Joined: Tue Feb 18, 2014 9:23 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Use DUPKEYS with OUTFIL

Postby Thampy » Thu Feb 20, 2014 3:19 am

You can use OUTFIL SECTIONS to achieve the result you are looking for.

//STEP010 EXEC PGM=SORT
//SORTIN DD *
0001GABRIEL20
0001GABRIEL50
0001GABRIEL30
0002ROBERTA10
0002ROBERTA60
0002ROBERTA20
//SORTOF1 DD SYSOUT=*
//SORTOF2 DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,13,CH,A)
OUTFIL FILES=1,BUILD=(1,80)
OUTFIL FILES=2,REMOVECC,NODETAIL,SECTIONS=(1,4,
TRAILER3=(1,13))
//*


SORTOF1 output
0001GABRIEL20
0001GABRIEL30
0001GABRIEL50
0002ROBERTA10
0002ROBERTA20
0002ROBERTA60

SORTOF2 output
0001GABRIEL50
0002ROBERTA60
Thampy
 
Posts: 36
Joined: Sat Sep 26, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 3 times

Re: Use DUPKEYS with OUTFIL

Postby BillyBoyo » Thu Feb 20, 2014 12:59 pm

Yes, but are you going to show the use of MAX?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Use DUPKEYS with OUTFIL

Postby gabrielp » Thu Feb 20, 2014 6:26 pm

yes MAX
gabrielp
 
Posts: 5
Joined: Tue Feb 18, 2014 9:23 pm
Has thanked: 1 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post