Need help in generating dynamic sort card



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

Need help in generating dynamic sort card

Postby Dambaattam » Thu May 15, 2014 5:26 pm

Hi there,

Please help me generating the below given sort card dynamically. Need to get a date value from input file rather than hardcoding it.

Sort fields=copy
Omit cond=(53,8,ch,LT,C'20140515', AND,
88,3,CH,EQ,'AUT',AND,
143,3,CH,EQ,AUT)


other than the first condition, 2 conditions are direct hardcoding
I tried with Header, Build and trailer options in sort, but no luck in getting that

the sort card i tried so far,

//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
HEADER1=(' SORT FIELDS=COPY '),
BUILD=(C' OMIT COND=(53,8,CH,LT,C''',2,8,C''',AND,
88,3,CH,EQ,C'''AUT,C''',AND,',),



I tried various combinations with the above given
Please do let me know if anything is not clear in this to help

Regards,
Damo
Dambaattam
 
Posts: 7
Joined: Thu May 15, 2014 4:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help in generating dynamic sort card

Postby Dambaattam » Thu May 15, 2014 5:59 pm

Hi,
I am able to generate it.

//S020 EXEC PGM=SORT,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTMSG DD SYSOUT=*
//SORTIN DD DSN=SEY.COTBL.RUNDATE,DISP=SHR
//SORTOUT DD DSN=SEE.DAMO.SORTCARD,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,1),RLSE),
// DCB=(LRECL=80,RECFM=FB)
//SORTWK1 DD DSN=&&SORTWK1,UNIT=SYSDA,SPACE=(CYL,(250))
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,1,CH,EQ,C'O')
OUTFIL REMOVECC,
HEADER1=(' SORT FIELDS=COPY '),
BUILD=(C' OMIT COND=(53,8,CH,LT,C''',2,8,C''',AND,',40X,/,
C' 88,3,CH,EQ,C''',C'AUT',C''',AND,143,3,CH,EQ,C''',C'REV',C''')')
/*
Dambaattam
 
Posts: 7
Joined: Thu May 15, 2014 4:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help in generating dynamic sort card

Postby enrico-sorichetti » Thu May 15, 2014 6:00 pm

works for me

 ****** ***************************** Top of Data ******************************
 - - -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  3 Line(s) not Displayed
 000004 //S1      EXEC PGM=SORT
 000005 //SYSPRINT  DD SYSOUT=*
 000006 //SYSOUT    DD SYSOUT=*
 000007 //SORTIN    DD *
 000008 12345678XXX
 000009 //SORTOUT   DD SYSOUT=*
 000010 //SYSIN     DD *
 000011   OPTION COPY
 000012   OUTFIL BUILD=(C'  SORT FIELDS=COPY',/,
 000013                 C'  OMIT COND=(053,8,CH,LT,C''',1,8,C''',AND,',/,
 000014                 C'             088,3,CH,EQ,C''',9,3,C''',AND,',/,
 000015                 C'             144,3,CH,EQ,C''',9,3,C''')')
 ****** **************************** Bottom of Data ****************************


********************************* TOP OF DATA **********************************
  SORT FIELDS=COPY
  OMIT COND=(053,8,CH,LT,C'12345678',AND,
             088,3,CH,EQ,C'XXX',AND,
             144,3,CH,EQ,C'XXX')
******************************** BOTTOM OF DATA ********************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Need help in generating dynamic sort card

Postby Dambaattam » Thu May 15, 2014 6:40 pm

Thanks a lot.
Dambaattam
 
Posts: 7
Joined: Thu May 15, 2014 4:46 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post