IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYNCTOOL - usage of USING as well as EQUAL(1) possible ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
Search our Forums:

Back to Top