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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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