MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File Matching Problem in Easytrieve

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
karthick123
Beginner


Joined: 11 Jul 2006
Posts: 2
Topics: 1

PostPosted: Tue Jul 11, 2006 10:22 am    Post subject: File Matching Problem in Easytrieve Reply with quote

hi all,

iam facing the abend A010 when running my EZT pgm.
My code is
Code:

FILE FILEA             FB(8000 8000)           
 A-ABC-CODE             1    4    N           
 A-EMP-NUM              81   8    N           
 A-CBS-EXA              161  10   N           
 A-PRD-CODE             241  5    N           
 A-REAL-CODE            321  4    N           
 A-REAL-NAME            401  60   A           
 A-PB-IND               481  1    A           
 A-LEG-BAL              561  10   P  2         
 A-TOT-LT               641  8    N           
                                               
FILE FILEB             FB(31  27993)           
 B-ABC-NR              1    6    P  0         
 B-ACC-OLD-1           7    2    A             
 B-ACC-OLD-2           9    2    N             
 B-ACC-OLD-3           11   4    N             
 B-ACC-OLD-4           15   8    N             
                                               
FILE MATCH             FB(255 3060)           
 O-ABC-NR              1    6    P  0         
 O-ACC-OLD-1           7    2    A             
 O-ACC-OLD-2           9    2    N             
 O-ACC-OLD-3           11   4    N             
 O-ACC-OLD-4           15   8    N             
 O-PRD-CODE            24   5  N               
 O-REAL-CODE           30   4  N               
 O-REAL-NAME           35  30  A                           
 O-PB-IND              81   1  A                           
 O-LEG-BAL             83   10 P  2                       
 O-TOT-LT              93   7  N                           
                                                           
FILE NONMATCH          FB(255 3060)                       
 C-ABC-NR              1    6    P 0                       
 C-ACC-OLD-1           7    2    A                         
 C-ACC-OLD-2           9    2    N                         
 C-ACC-OLD-3           11   4    N                         
 C-ACC-OLD-4           15   8    N                         
 C-PRD-CODE            24   5  N                           
 C-REAL-CODE           30   4  N                           
 C-REAL-NAME           35  30  A                           
 C-PB-IND              81   1  A                           
 C-LEG-BAL             83   10 P  2                       
 C-TOT-LT              93   7  N                           

                                         
JOB  INPUT (FILEA    KEY (A-ABC-CODE, A-EMP-NUM) +         
            FILEB    KEY (B-ACC-OLD-3, B-ACC-OLD-4) )     
IF MATCHED                             
   O-ABC-NR      =   B-ABC-NR         
   O-ACC-OLD-1   =   B-ACC-OLD-1       
   O-ACC-OLD-2   =   B-ACC-OLD-2       
   O-ACC-OLD-3   =   B-ACC-OLD-3       
   O-PRD-CODE    =   A-PRD-CODE       
   O-REAL-CODE   =   A-REAL-CODE       
   O-REAL-NAME   =   A-REAL-NAME       
   O-PB-IND      =   A-PB-IND         
   O-LEG-BAL     =   A-LEG-BAL         
   O-TOT-LT      =   A-TOT-LT         
   PUT MATCH                           
ELSE                                   
   C-ABC-NR      =   B-ABC-NR         
   C-ACC-OLD-1   =   B-ACC-OLD-1       
   C-ACC-OLD-2   =   B-ACC-OLD-2       
   C-ACC-OLD-3   =   B-ACC-OLD-3       
   C-PRD-CODE    =   A-PRD-CODE       
   C-REAL-CODE   =   A-REAL-CODE       
   C-REAL-NAME   =   A-REAL-NAME       
   C-PB-IND      =   A-PB-IND         
   C-LEG-BAL     =   A-LEG-BAL         
   C-TOT-LT      =   A-TOT-LT         
   PUT NONMATCH                       
END-IF                                 
STOP                                   

In spool iam getting the A010 erro with following details
FILEA                 2    INPUT        SAM  FIX   BLK                 8000     
FILEB                 1    INPUT        SAM  FIX   BLK                   31    2
MATCH                 0   OUTPUT        SAM  FIX   BLK                  255     
NONMATCH              0   OUTPUT        SAM  FIX   BLK                  255     

Please help me out to solve this problem.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Tue Jul 11, 2006 11:00 am    Post subject: Reply with quote

karthick123,

You are using the fields from FILEA and FILEB in the ELSE part. The logic will go to the ELSE part when one of the file does not have a matching record. In that case you CANNOT use the fields from FILEA or FILEB . Take a look at the sample code here as to how to tackle non matched records

http://www.mvsforums.com/helpboards/viewtopic.php?p=32271#32271

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
karthick123
Beginner


Joined: 11 Jul 2006
Posts: 2
Topics: 1

PostPosted: Tue Jul 11, 2006 11:16 am    Post subject: Reply with quote

Thanks for ur suggestions..i will try this one..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group