Select 3 Record Types



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

Select 3 Record Types

Postby rayngerfan » Wed May 08, 2013 11:04 pm

I want to check a file for at least 1 occurrence of 3 record types that start in column 1 (000,188 & 999). If the file doesn't contain at least 1 occurrence of these records, the job should receive a RC=4. I was able to achieve this task, but I needed to execute two steps. Is it possible to achieve this in only 1 step?

//STEP1 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
000
188
188
188
188
188
188
188
999
//OUT1 DD DSN=&&HEADER,DISP=(,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),UNIT=TEST,DCB=(LRECL=80,RECFM=FB)
//OUT2 DD DSN=&&DATA,DISP=(,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),UNIT=TEST,DCB=(LRECL=80,RECFM=FB)
//OUT3 DD DSN=&&TRAILER,DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(CYL,(1,1),RLSE),DCB=(LRECL=80,RECFM=FB)
//TOOLIN DD *
SORT FROM(IN) TO(OUT1) USING(CTL1)
SORT FROM(IN) TO(OUT2) USING(CTL2)
SORT FROM(IN) TO(OUT3) USING(CTL3)
//CTL1CNTL DD *
SORT FIELDS=COPY,STOPAFT=1
INCLUDE COND=(1,3,CH,EQ,C'000')
//*
//CTL2CNTL DD *
SORT FIELDS=COPY,STOPAFT=1
INCLUDE COND=(1,3,CH,EQ,C'188')
//*
//CTL3CNTL DD *
SORT FIELDS=COPY,STOPAFT=1
INCLUDE COND=(1,3,CH,EQ,C'999')
//*
//STEP2 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=*.STEP1.OUT1,DISP=SHR
// DD DSN=*.STEP1.OUT2,DISP=SHR
// DD DSN=*.STEP1.OUT3,DISP=SHR
//TOOLIN DD *
COUNT FROM(IN) NOTEQUAL(03) RC4
/*
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Select 3 Record Types

 

Re: Select 3 Record Types

Postby BillyBoyo » Thu May 09, 2013 2:27 pm

Although you can specify ICETOOL SORT with OPTION COPY/SORT FIELDS=COPY, you can use ICETOOL COPY instead of SORT.

It is possible with one pass of the data using WHEN=GROUP.

Does SyncTool have the SUBSET operator?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Select 3 Record Types

Postby dick scherrer » Thu May 09, 2013 7:12 pm

Hi BB,

Not that i can find in the 1.4 manual.

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Select 3 Record Types

Postby BillyBoyo » Thu May 09, 2013 7:42 pm

Hi Dick,

Thanks. I think it is one of those things. If it were there, It is "undocumented", so to know if it is there, you have to try it :-)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Select 3 Record Types

Postby rayngerfan » Thu May 09, 2013 10:43 pm

version 1.7.0 does have a SUBSET parameter.

SYT000I SYNCTOOL RELEASE 1.7.0 - COPYRIGHT 2008 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED

SUBSET FROM(IN) TO(OUT) KEEP INPUT LAST(30)
rayngerfan
 
Posts: 51
Joined: Fri Apr 17, 2009 4:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Select 3 Record Types

Postby dick scherrer » Thu May 09, 2013 11:45 pm

Yup, that is Synctool. The current release of Syncsort is 1.4.x.

It would help if they were all the same "release" . . . (methinks) ;)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Select 3 Record Types

Postby dick scherrer » Thu May 09, 2013 11:49 pm

Looks like my bad . . . :oops:

My first reply was based on the Syncsort doc. Interestingly enough, i do not seem to have Synctool info. Once upon a time it was undocumented and rather closely followed ICETOOL conventions.

I'll try to find out more. . .

Sorry for the mis-cue,

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post