Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Matching and un matching records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
rswathi_1208

New User


Joined: 14 May 2010
Posts: 11
Location: chennai

PostPosted: Wed Jun 23, 2010 5:13 pm    Post subject: Matching and un matching records
Reply with quote

Hi,

I have two files. one is of length 51 and another of length 10. I am comparing these two files and I need to write the matching records in one file and un matching records in another file. Please find my code below. while executin I am getting error messasage as invalid file reference FileA

Code:
FILE FILEA                                                     
PARTA      1   10 A                                           
I-RECA     1   51 A                                           
FILE FILEB                                                     
PARTB      1   10 A                                           
FILE FILE01                                                   
O-REC1     1   51 A                                           
FILE FILE02                                                   
O-REC2     1   51 A                                           
*                                                             
RCOUNT-OUT1 W  8 N                                             
RCOUNT-OUT2 W  8 N                                             
*                                                             
JOB INPUT (FILEA KEY PARTA FILEB KEY PARTB) FINISH FINISH-PROC
IF MATCHED FILEA FILEB                                         
   MOVE ' ' TO O-REC1                                         
   MOVE I-RECA TO O-REC1                                       
   PUT FILE01                                                 
   RCOUNT-OUT1 = RCOUNT-OUT1 + 1   
ELSE                               
   IF FILEB                       
    MOVE ' ' TO O-REC2             
    MOVE I-RECA TO O-REC2         
    PUT FILE02                     
    RCOUNT-OUT2 = RCOUNT-OUT2 + 1 
END-IF                             
END-IF                             
FINISH-PROC. PROC.                 
DISPLAY ' MATCH ' RCOUNT-OUT1     
DISPLAY ' NOT MATCH ' RCOUNT-OUT2 
END-PROC                           
*     


MY ERROR MESSAGE :
23 *******A010 INVALID FILE REFERENCE - FILEA
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 23, 2010 8:23 pm    Post subject:
Reply with quote

Hello,

Are both files in sequence?

Which line of code is line 23?

What happens when there is a file a record and no matching file b record?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jun 24, 2010 1:14 am    Post subject:
Reply with quote

Hello,

If you are determined to "multi-post" because you don't get what you want in a topic, you may find our doors become closed. . .

The previous question were an attempt to get you to think about your process. . .

The problem is quite likely because you are moving fileA data in the fileB routine. . .
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Matching with Key at different postions. rajatbagga DFSORT/ICETOOL 12 Wed Nov 09, 2016 10:58 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us