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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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