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
 
Comparison of 2 files with Syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Comparison of 2 files with Syncsort
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    Post subject:
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    Post subject: Re: Comparison of 2 files with Syncsort
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    Post subject:
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    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 Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

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