Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort unique record on particular field USING SYNCTOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
yashgajpalla

New User


Joined: 10 Apr 2007
Posts: 2
Location: Pune

PostPosted: Wed Apr 11, 2007 5:50 pm    Post subject: Sort unique record on particular field USING SYNCTOOL
Reply with quote

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
View user's profile Send private message

cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Apr 11, 2007 6:02 pm    Post subject: Re: regarding SYNCTOOL
Reply with quote

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
View user's profile Send private message
yashgajpalla

New User


Joined: 10 Apr 2007
Posts: 2
Location: Pune

PostPosted: Wed Apr 11, 2007 6:58 pm    Post subject: regarding synctool
Reply with quote

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
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Apr 11, 2007 7:10 pm    Post subject: Re: Sort unique record on particular field USING SYNCTOOL
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us