Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SYNCTOOL - usage of USING as well as EQUAL(1) possible ?

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

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Fri Jan 11, 2008 3:14 pm    Post subject: SYNCTOOL - usage of USING as well as EQUAL(1) possible ?
Reply with quote

My requirement is that I have input file LRECL 200 FB and the output should contain records where first 37 characters are unique. If there are duplicates then first record out of them should alone be included in output . Also I want to Include ONLY the records that have 'MYREC' in the position 38. Can I use SYNCTOOL to do it in single pass ? I mean can we use USING as well as EQUAL (or NODUPS etc.,) in the same pass ? I tried the following code but it says USING is illegal. Please help me out with this


Code:

//STEP01  EXEC PGM=SYNCTOOL,REGION=0M                                   
//IN      DD DISP=SHR,DSN=Input file                     
//OUT   DD DSN=Output file         
//DISCARD   DD DSN=Discard.record.file         
//TOOLMSG  DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
  SELECT FROM(IN) TO(OUT) ON(1,37,CH) USING CTL1 EQUAL(1) DISCARD(DISCARD)
/*                                                                     
//CTL1CNTL DD *                                                         
  SORT FIELDS=COPY                                                     
  INCLUDE COND=(38,5,CH,EQ,C'MYREC ')       
//*
Back to top
View user's profile Send private message

raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Fri Jan 11, 2008 6:52 pm    Post subject:
Reply with quote

try this...

Code:
SELECT FROM(IN) TO(OUT) ON(1,37,CH) USING(CTL1) FIRSTDUP
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Sat Jan 12, 2008 10:38 am    Post subject:
Reply with quote

Raak -

Thanks for your control card. But this gives only the records which have duplicates in postion 1,37. But My output should also include unique records.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Sat Jan 12, 2008 5:44 pm    Post subject:
Reply with quote

use
Code:
SELECT FROM(IN) TO(OUT) ON(1,37,CH) USING(CTL1) FIRST
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Mon Jan 14, 2008 10:22 am    Post subject:
Reply with quote

Thank you Krisperms
Quote:

use
Code:
SELECT FROM(IN) TO(OUT) ON(1,37,CH) USING(CTL1) FIRST


Your confidence(in saying Use instead of the usual 'try') worked perfect for me.
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 )SEL and )ENDSEL usage cvnlynn TSO/ISPF 4 Thu Jun 15, 2017 1:15 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts LIKE vs EQUAL Nileshkul DB2 7 Sat Jul 16, 2016 7:50 am
No new posts How can amount of the Storage Usage b... esduman61 CICS 6 Wed Mar 09, 2016 1:19 pm
No new posts Controlling usage of resources by tasks raja1128 CICS 3 Fri Nov 06, 2015 9:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us