SYNCTOOL Question



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

SYNCTOOL Question

Postby rayngerfan » Thu Aug 09, 2012 6:18 am

To Whom May Concern:

I have a FB 133 file that I want to count the occurrences of 3 record types HOLD,WAIT & EXEC which start in column 53. I can accomplish this task with the below JCL.

//STEP001 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=NDMZZZ.TEST,DISP=SHR
//CT DD DSN=NDMZZZ.NDMQUE,DISP=(,CATLG,DELETE),UNIT=TEST,
// DCB=(LRECL=133,RECFM=FB),SPACE=(CYL,(1,1),RLSE)
//TOOLIN DD *
COUNT FROM(IN1) WRITE(CT) TEXT('NDM IN HOLD STATUS IS ') -
EDCOUNT(A1,U10) USING(CTL1)
//CTL1CNTL DD *
INCLUDE COND=(53,4,CH,EQ,C'HOLD')
*************************************************************************************
output
NDM IN HOLD STATUS IS 2

I can get the total counts for 'EXEC' ,'WAIT' & 'HOLD' records, by excuting the above JCL in 3 steps changing the TEXT & INCLUDE parameter to reflect each record type.

Is it possible to capture the record counts for 'EXEC' ,'WAIT' & 'HOLD' in one step?

output
NDM IN HOLD STATUS IS 2
NDM IN WAIT STATUS IS 5
NDM IN EXEC STATUS IS 1
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SYNCTOOL Question

Postby dick scherrer » Thu Aug 09, 2012 8:08 am

Hello,

How many records are in the input file?

One way to do this would be to simply use the sort and INCLUDE the 3 values you want, sort the "keepers" by status and then summarize these.
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: SYNCTOOL Question

Postby rayngerfan » Thu Aug 09, 2012 8:19 pm

Hi Dick

The record count will be different depending on how many 'HOLD','EXEC' & 'WAIT' NDM jobs are in the TCQ. I'm not to familiar with how to summarize the totals. If possible can you provide me an example or a key word I can search for an example?

Thanks
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SYNCTOOL Question

Postby dick scherrer » Thu Aug 09, 2012 8:34 pm

Hello,

Once you have INCLUDEd only the values you want, specify SUM FIELDS=(the position where the status is) after the SORT FIELDS=.

If you get stuck, post what you tried and the result and we can go from there.
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: SYNCTOOL Question

Postby rayngerfan » Fri Aug 10, 2012 12:22 am

Hi Dick

I was able to get the 3 totals for WAIT,HOLD & EXEC using the SYNCTOOL in 1 step with the below JCL. When I write DD CT to a file I only get the 'HOLD' record. If I write the DD CT to DD SYSOUT=*, I get all 3 records. Any idea why creating a flat file wouldn't produce the 3 records, but writing to DD SYSOUT=* creates the 3 records?

//STEP001 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=PLREP12.NDMTCP2.TEST,DISP=SHR
//CT DD SYSOUT=* (capturese the 3 records)
//*CT DD DSN=PLREP12.NDNTCP2.NEW,DISP=(,CATLG,DELETE), (captures only the 'HOLD' record)
// UNIT=TEST,SPACE=(CYL,(1,1),RLSE)
//TOOLIN DD *
COUNT FROM(IN1) WRITE(CT) TEXT('NDM IN HOLD STATUS IS ') -
EDCOUNT(A1,U10) USING(CTL1)
COUNT FROM(IN1) WRITE(CT) TEXT('NDM IN WAIT STATUS IS ') -
EDCOUNT(A1,U10) USING(CTL2)
COUNT FROM(IN1) WRITE(CT) TEXT('NDM IN EXEC STATUS IS ') -
EDCOUNT(A1,U10) USING(CTL3)
/*
//CTL1CNTL DD *
INCLUDE COND=(53,4,CH,EQ,C'HOLD')
//CTL2CNTL DD *
INCLUDE COND=(53,4,CH,EQ,C'WAIT')
//CTL3CNTL DD *
INCLUDE COND=(53,4,CH,EQ,C'EXEC')
/*
OUTPUT using //CT DD SYSOUT=*

NDM IN HOLD STATUS IS 4
NDM IN WAIT STATUS IS 7
NDM IN EXEC STATUS IS 1
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: SYNCTOOL Question

Postby BillyBoyo » Fri Aug 10, 2012 12:32 am

Without DISP=MOD, you'll loose your three sets of data on a dataset,when file is opened. SYSOUT of course can't loose the data.

You are processing the data three times. Doesn't matter if in one step or three.

If you follow what Dick has said (INCLUDE/OMIT, SORT, SUM) you'll get your answer in one pass of the data in one step. Also possible with report processsing using SECTIONS.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SYNCTOOL Question

Postby rayngerfan » Sat Aug 11, 2012 12:39 am

Hi Billyboyo

I can generate the totals for the 3 record types using the below JCL, but I'm not sure how to write the text for each record type. I can write the EXEC text that is IN TRAILER3, but how do I write the text for HOLD & WAIT?

NDM JOBS IN EXEC STATUS : 1
NDM JOBS IN HOLD STATUS : 4
NDM JOBS IN WAIT STATUS : 3

//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=PLREP12.QQQTCP2.SSSSPSTD,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(53,4,CH,EQ,C'WAIT',OR,
53,4,CH,EQ,C'HOLD',OR,
53,4,CH,EQ,C'EXEC')
OUTFIL REMOVECC,
SECTIONS=(53,4,
TRAILER3=('NDM JOBS IN WAIT STATUS : ',COUNT))
/*
OUTPUT

. Prc Name => RTBBTCP2 Queue => EXEC
NDM JOBS IN EXEC STATUS : 1
. Prc Name => NDMIWSCR Queue => HOLD
. Prc Name => NDMIWSCR Queue => HOLD
. Prc Name => NDMIWSCR Queue => HOLD
. Prc Name => NDMIWSCR Queue => HOLD
NDM JOBS IN EXEC STATUS : 4
. Prc Name => COQUEO Queue => WAIT
. Prc Name => RICHQQ Queue => WAIT
. Prc Name => RICHQQ Queue => WAIT
NDM JOBS IN EXEC STATUS : 3
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post