Page 1 of 1

Not able to update vsam file

PostPosted: Fri Jul 01, 2016 9:31 am
by arya_starc
Not able to vsam file by rewrite the new values in key part.
Is this because i am trying to update the key field in the file.
Below is the code:-

FILE GMSM VS(UPDATE)                                            
GMSM-ORG                      1 03  N                            
GMSM-SCHEME-ID               22 05  A                            
*                                                                
JOB INPUT NULL                                                  
*-----------------                                              
GET GMSM                                                        
IF GMSM-ORG = 000 999                                            
   GOTO JOB                                                      
END-IF                                                          
 MOVE 'T1CCC' TO GMSM-SCHEME-ID                                  
 WRITE GMSM UPDATE                                              
 STOP.                                                          
 *          

 


Here the file is already catalouged and the field i try to update is the key part of the file.

Re: Not able to update vsam file

PostPosted: Fri Jul 01, 2016 1:25 pm
by NicC
Is this because i am trying to ...

Who knows? You have not provided any error messages.

Re: Not able to update vsam file

PostPosted: Fri Jul 01, 2016 2:26 pm
by enrico-sorichetti
changing - as You say - the key part of a record means that You are inserting a NEW record, NOT updating an existing one.

review Your understanding of vsam ways meditating on
http://www.redbooks.ibm.com/abstracts/s ... .html?Open

Re: Not able to update vsam file

PostPosted: Sun Jul 03, 2016 1:38 pm
by arya_starc
enrico-sorichetti wrote:changing - as You say - the key part of a record means that You are inserting a NEW record, NOT updating an existing one.

review Your understanding of vsam ways meditating on
http://www.redbooks.ibm.com/abstracts/s ... .html?Open

this is the error message that I am getting
EZABX000 An error has occurred in program ????????.                            
EZABX001 The following messages provide diagnostic information.  Please        
         contact the person or persons responsible for maintaining this        
         application.  They may want to see this information or they may        
         want it printed.                                                      
         ###################### Diagnostic Information ######################  
EZABX003 The error occurred at 21.37 on 06/30/16.                              
EZIOE004 Logical I/O error on file GMSM.                                        
         Error indicator returned by access method.                            
EZIOE006 VSAM return code is 8 with error code of 96.                          
EZABX008 The error occurred at program statement number 14.

Re: Not able to update vsam file

PostPosted: Sun Jul 03, 2016 3:31 pm
by NicC
With Enrico's comments and advice you should be abke to understand what has happened and you can then formulate a correction to your code. The error messages (the last 2 lines that you posted), when YOU look them up in the appropriate manual(s) should confirm Enrico's comments.