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

Comparison of 2 files with Syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Mon Jul 09, 2007 9:55 pm
Reply with quote

Requirement :- Compare 2 files and give 2 o/p files based on certain condition. IN1 has LRECL as 200 and IN2 has 603. O/P expected is the IN1 record.

Jcl used :-

Code:
//SORT2   EXEC PGM=ICETOOL                                             
//TOOLMSG DD SYSOUT=*                                                 
//DFSMSG  DD SYSOUT=*                                                 
//IN1     DD DSN=VAST.SOSF540B.VAS7140D.VENDOR.ADDRESS.INFON,DISP=SHR 
//IN2     DD DSN=VAST.PRCF695B.VAS7140D.VBUMOVE.ECAT.TTRAN,DISP=SHR   
//T1      DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(10,20)),DISP=(MOD,PASS)   
//T2      DD DSN=&&T2,UNIT=SYSDA,SPACE=(TRK,(10,20)),DISP=(MOD,PASS)   
//OUT1    DD DSN=VAST.US.VENDOR.TESTFILE,                             
//           DISP=(NEW,CATLG,DELETE),                                 
//           SPACE=(TRK,(1,5)),                                       
//           DCB=(RECFM=FB,LRECL=200,BLKSIZE=0),                       
//           UNIT=SYSDA                                               
//OUT2    DD DSN=VAST.CA.VENDOR.TESTFILE,   
//           DISP=(NEW,CATLG,DELETE),                   
//           SPACE=(TRK,(1,5)),                         
//           DCB=(RECFM=FB,LRECL=200,BLKSIZE=0),       
//           UNIT=SYSDA                                 
//TOOLIN  DD *                                         
SELECT FROM(IN1) TO(T1)  ON(3,9,ZD) FIRST USING(CTL1)   
SELECT FROM(IN1) TO(T2)  ON(3,9,ZD) FIRST USING(CTL2)   
SELECT FROM(IN2) TO(T1)  ON(37,9,ZD) FIRST USING(CTL3) 
SELECT FROM(IN2) TO(T2)  ON(37,9,ZD) FIRST USING(CTL4) 
SPLICE FROM(T1)  TO(OUT1) ON(3,9,CH) WITH (1,200)       
/*                                                     
//CTL1CNTL DD *                                         
   OUTFIL FNAMES=T1                                     
/*                                                     
//CTL2CNTL DD *                                         
   OUTFIL FNAMES=T2                                     
/*                                                     
//CTL3CNTL DD *                                         
   OUTFIL FNAMES=T1,                                   
   OUTREC=(2X,3:37,9,189X)                             
   INCLUDE COND=(1,2,CH,EQ,C'A ',AND,602,2,BI,EQ,1)     
   SUM FIELDS=NONE                                     
/*                                                     
//CTL4CNTL DD *                                         
   OUTFIL FNAMES=T2,                                   
   OUTREC=(2X,3:37,9,189X)                             
   INCLUDE COND=(1,2,CH,EQ,C'A ',AND,602,2,BI,EQ,5)     
   SUM FIELDS=NONE                                     
/*                                                     


Error obtained
SPLICE FROM(T1) TO(OUT1) ON(3,9,CH) WITH (1,200)
SYT068E INVALID "WITH" OPERAND
SYT030I OPERATION COMPLETED WITH RETURN CODE 12

Please inform me why this error is coming up.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Jul 09, 2007 10:24 pm
Reply with quote

nikyojin
In your SPLICE opertaor statement,
Code:
SPLICE FROM(T1)  TO(OUT1) ON(3,9,CH) WITH (1,200) 

I see a blank space between WITH and (1,200), which is not synctatically correct.
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Tue Jul 10, 2007 12:01 pm
Reply with quote

Thanks krisprems for your quick response...
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 10, 2007 12:12 pm
Reply with quote

nikyojin
You are welcome!
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top