Count using SYNCTOOL



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

Count using SYNCTOOL

Postby ranga_subham » Fri Oct 03, 2008 9:26 pm

Hi,

I am using below SORT job to count different occurences of input records on different criteria and successfully getting the results.........

//STEP0001 EXEC PGM=SYNCTOOL                                           
//TOOLMSG  DD SYSOUT=*                                                 
//SSMSG    DD SYSOUT=*                                                 
//IN1      DD *                                                       
ABCD1111                                                               
BCDE2222                                                               
CDEF3333                                                               
//OUT1     DD DSN=&&TEMP1,SPACE=(TRK,(1,1),RLSE),DISP=(NEW,PASS,DELETE)
//TOOLIN   DD *                                                       
 COPY FROM(IN1) TO(OUT1) USING(SAM1)                                   
 COUNT FROM(OUT1)                                                     
 COPY FROM(IN1) TO(OUT1) USING(SAM2)                                   
 COUNT FROM(OUT1)                                                     
/*                                                                     
//SAM1CNTL DD *                                                       
 INCLUDE COND=(5,1,CH,EQ,C'1')                                         
/*                                                                     
//SAM2CNTL DD *                                                       
 INCLUDE COND=(5,1,CH,EQ,C'2')                                         
/*


Output:

SYT001I  INITIAL PROCESSING MODE IS "STOP"                     
SYT002I  "TOOLIN" INTERFACE BEING USED                         
                                                               
          COPY FROM(IN1) TO(OUT1) USING(SAM1)                 
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0001"               
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0               
                                                               
          COUNT FROM(OUT1)                                     
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0002"               
SYT031I  NUMBER OF RECORDS PROCESSED: 000000000000001         
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0               
                                                               
          COPY FROM(IN1) TO(OUT1) USING(SAM2)                 
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0003"               
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0               
                                                           
          COUNT FROM(OUT1)                                 
SYT020I  SYNCSORT CALLED WITH IDENTIFIER "0004"           
SYT031I  NUMBER OF RECORDS PROCESSED: 000000000000001     
SYT030I  OPERATION COMPLETED WITH RETURN CODE 0           
                                                           
SYT004I  SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 0 


Would you please let me know if my approach is right or wrong?
Is there any scope for betterment of this SORT job?

Please suggest.

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

Re: Count using SYNCTOOL

 

Re: Count using SYNCTOOL

Postby Alissa Margulies » Tue Oct 14, 2008 10:31 pm

Is this related to the thread below?
syncsort-synctool/topic1124.html
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Count using SYNCTOOL

Postby ranga_subham » Wed Oct 15, 2008 10:11 am

Alissa, the one you referred had only one condition. But, here need to count based on several conditions.

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

Re: Count using SYNCTOOL

Postby Alissa Margulies » Wed Oct 15, 2008 7:56 pm

Then the same logic applies. If you want a total count when (5,1) is 1 or 2, then code your INCLUDE statement with the 'OR' condition. If you need separate counts for when (5,1) equals 1 and when (5,1) equals 2, then code 2 separate OUTFIL statements each with the corresponding INCLUDE statement.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Count using SYNCTOOL

Postby ranga_subham » Wed Oct 15, 2008 8:57 pm

I think you are suggesting to do like below:

//STEP0001 EXEC PGM=SYNCTOOL               
//TOOLMSG  DD SYSOUT=*                     
//SSMSG    DD SYSOUT=*                     
//IN1      DD *                             
ABCD1111                                   
BCDE2222                                   
CDEF3333                                   
//OUT1     DD SYSOUT=*                     
//OUT2     DD SYSOUT=*                     
//TOOLIN   DD *                             
 COPY FROM(IN1) TO(OUT1) USING(SAM1)       
 COPY FROM(IN1) TO(OUT2) USING(SAM2)       
/*                                         
//SAM1CNTL DD *                             
 OUTFIL FNAMES=OUT1,INCLUDE=(5,1,CH,EQ,C'1')
/*                                         
//SAM2CNTL DD *                             
 OUTFIL FNAMES=OUT2,INCLUDE=(5,1,CH,EQ,C'2')
/*                                         


Look for the below statements in the SSMSG:

WER405I  OUT1     :  DATA RECORDS OUT          1; TOTAL RECORDS OUT          1
WER405I  OUT2     :  DATA RECORDS OUT          1; TOTAL RECORDS OUT          1


Isn't it?

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

Re: Count using SYNCTOOL

Postby Alissa Margulies » Wed Oct 15, 2008 9:10 pm

No, that is your original solution. I was talking about the same logic in the other thread, using PGM=SORT, not SYNCTOOL.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Count using SYNCTOOL

Postby sricsc » Tue Aug 18, 2009 10:06 am

Hi ,

I dont know how to use SYNCTOOL. Can anyone give the syntax or link for the synctool manual. Thanks.
Thanks,
Sri
sricsc
 
Posts: 13
Joined: Sat Aug 08, 2009 7:07 am
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post