|
View previous topic :: View next topic
|
| Author |
Message |
yashgajpalla
New User
Joined: 10 Apr 2007 Posts: 2 Location: Pune
|
|
|
|
hi,
I want to sort unique record on particular field also including condition on other field.
right now i am using SYNCTOOL with two select statement
1. first with firstdup
2. second with nodupe.
by this unique record can be found out but am unable to include condition,
syntax i do not know.
Please reply. |
|
| Back to top |
|
 |
cpuhawg
Active User

Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
The include statement should look like:
| Code: |
SORT FIELDS=COPY
INCLUDE COND=(5,4,CH,EQ,C'0200')
|
5 is the starting position
4 is the length
CH indicates character data
EQ indicates "equals"
C'200' indicates the value you are searching for |
|
| Back to top |
|
 |
yashgajpalla
New User
Joined: 10 Apr 2007 Posts: 2 Location: Pune
|
|
|
|
I tried to include condition but still it is not working,
please see codes below(toolin for synctool),
it gave maxcc=12
SELECT FROM(SORTIN) TO(SRTOUT1) ON(22,13,CH) FIRSTDUP
SORT FIELDS=COPY
INCLUDE COND=(1,4,CH,EQ,C'1220')
SELECT FROM(SORTIN) TO(SRTOUT2) ON(22,13,CH) NODUPS
SORT FIELDS=COPY
INCLUDE COND=(1,4,CH,EQ,C'1220')
*********************************************************
* SORT CARD ADDED 04/09/2007 INFOSYS
* SORT RECORDS FROM XC190CHG FILE
*
*********************************************************
* FIELD START BYTE LENGTH
* REC-ID 01 04
* BAN 22 13
********************************************************* |
|
| Back to top |
|
 |
cpuhawg
Active User

Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
Here are some old JCL I used to execute SYNCTOOL. Maybe it could help your JCL setup:
| Code: |
//SYNC EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(SORTIN) TO(DUPS) ON(17,4,CH) FIRST
//SORTIN DD *
1234 19990101
1234 19990201
1234 20020101
2345 20000101
3456 19980101
3456 20030101
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTWK01 DD UNIT=SYSOUT3,SPACE=(27998,(6000,1500),RLSE)
//SORTWK02 DD UNIT=SYSOUT3,SPACE=(27998,(6000,1500),RLSE)
//DUPS DD DSN=BJ19UN.J000227.DUPS,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// SPACE=(0,(10,50),RLSE),
// LABEL=RETPD=1,UNIT=DASD,DISP=(,CATLG)
//DUPSCNTL DD *
SORT FIELDS=(17,14,CH,A)
SUM FIELDS=NONE
OUTFIL SAVE,FNAMES=DUPS
END
|
The DUPSCNTL is related to the DD DUPS specified in the SELECT parameter. In this example, SORTIN input is coming in under the DD *. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|