Syncsort - why does not work



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

Syncsort - why does not work

Postby ranga_subham » Sat Nov 24, 2012 9:48 pm

Hi,

May I please know why below sort card ends with U0016 ?

//STEP1000 EXEC PGM=SORT                                         
//SORTIN   DD *                                                 
ABCDEFGHIJ01236ZYXWVUTSRQ01234                                   
//SORTOUT  DD SYSOUT=*                                           
//SYSOUT   DD SYSOUT=*                                           
//SYSIN DD *                                                     
  SORT FIELDS=COPY                                               
  INREC IFTHEN=(WHEN=(11,5,ZD,SUB,26,5,ZD),OVERLAY=(40:C'PROB'))


Please help.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - why does not work

Postby BillyBoyo » Sat Nov 24, 2012 10:29 pm

Please post the full sysout from the step.

What are you trying to do with that WHEN condition?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Syncsort - why does not work

Postby ranga_subham » Sun Nov 25, 2012 8:09 am

Bill, realized the mistake......corrected it as shown below and got the results (1st IFTHEN only) :idea:

//SYSIN DD *                                               
  SORT FIELDS=COPY                                         
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(40:11,5,ZD,SUB,26,5,ZD)),
        IFTHEN=(WHEN=(40,1,ZD,GT,+1),BUILD=(1:C'PROBLEM')) 


But, why 2nd IFTHEN does not work though job ends with MAXCC=0 :?: Is it must to use OUTREC :?: Should not it have supplied previously built data to next IFTHEN :?:

Output:
ABCDEFGHIJ01236ZYXWVUTSRQ01234                       2   


Please help.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - why does not work

Postby bodatrinadh » Tue Nov 27, 2012 9:38 am

Hi Ranga,

But, why 2nd IFTHEN does not work though job ends with MAXCC=0 Is it must to use OUTREC Should not it have supplied previously built data to next IFTHEN


This is because, the value "2" is appearing in 54th position...

***************************** Top of Data ***********
----+----1----+----2----+----3----+----4----+----5----+----6----
ABCDEFGHIJ01236ZYXWVUTSRQ01234                       2                 
**************************** Bottom of Data ********


Change the code to -
IFTHEN=(WHEN=(54,1,ZD,GT,+1),BUILD=(1:C'PROBLEM')) 
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: Syncsort - why does not work

Postby BillyBoyo » Tue Nov 27, 2012 3:52 pm

Missed that it was a WHEN=INIT, so my previous rubbish I removed :-)

When you do the calculation, you have not specified a length for the result, so it is using a default length. If you use TO=ZD and LENGTH=whatever, then you'll end up with a field where you think it should be.

Do not fall into the trap of just specifying a length of one. If the difference is 10 or greater, then you won't on occasion get the answer you want (try with difference of 10, 20, 30, 3000). Your result field should be "long enough" to hold the longest field which is being used in the calculation.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Syncsort - why does not work

Postby ranga_subham » Thu Nov 29, 2012 9:54 am

Thank you Billy and 3nadh !
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post