RC=08 from VSAM Delete

Post your questions related to VSAM

Moderator: Moderator Group

Post Reply
NiceGuy
Member
Posts: 6
Joined: Mon Oct 15, 2007 3:17 am

RC=08 from VSAM Delete

Post by NiceGuy » Mon Oct 15, 2007 3:35 am

I have a problem and hope someone has an idea.

My problem is I need to do a VSAM Delete / Define. This is going to need to be done daily, but sometimes the VSAM file is not there, and the Delete returns a RC=08 causing the Job to abend. I do not care if the file is not there; I just need to delete it if it is there.

Does anyone know of a way to not return a RC=08 if the Delete fails? Please give an example

Thank you

NG

User avatar
DavidatK
Active Member
Posts: 65
Joined: Tue Mar 27, 2007 8:41 am
Location: Troy, MI USA

RC=08 from VSAM Delete

Post by DavidatK » Wed Oct 17, 2007 7:53 am

NG,

Try using the ?SET MAXCC=0? after the DELETE

Code: Select all

DELETE  YOUR.VSAM.TEST                  
SET MAXCC=0                              
DEFINE                              -    
    CLUSTER(                        -    
        NAME(YOUR.VSAM.TEST)       -    
        KEYS(10 0)                  -    
        RECSZ(30 60)                -    
        SPEED                       -    
        REUSE                       -    
        FSPC(0 0)                   -    
        RECORDS(150))               -    
    DATA(                           -    
        NAME(YOUR.VSAM.TEST.DATA)  -    
        CISZ(4096))                 -    
    INDEX(                          -    
        NAME(YOUR.VSAM.TEST.INDEX))  
Sysout Result

Code: Select all

.                                                                           
.  DELETE  YOUR.VSAM.TEST                                                  
.IDC3012I ENTRY YOUR.VSAM.TEST NOT FOUND                                   
.IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEG-42     
.IDC0551I ** ENTRY YOUR.VSAM.TEST NOT DELETED                              
.IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8                  
.                                                                           
.  SET MAXCC=0                                                              

.  DEFINE                              -                              
.      CLUSTER(                        -                              
.          NAME(YOUR.VSAM.TEST)       -                              
.          KEYS(10 0)                  -                              
.          RECSZ(30 60)                -                              
.          SPEED                       -                              
.          REUSE                       -                              
.          FSPC(0 0)                   -                              
.          RECORDS(150))               -                              
.      DATA(                           -                              
.          NAME(YOUR.VSAM.TEST.DATA)  -                              
.          CISZ(4096))                 -                              
.      INDEX(                          -                              
.          NAME(YOUR.VSAM.TEST.INDEX))                               
.IDC0508I DATA ALLOCATION STATUS FOR VOLUME TSO095 IS 0               
.IDC0509I INDEX ALLOCATION STATUS FOR VOLUME TSO095 IS 0              
.IDC0181I STORAGECLASS USED IS TSO                                    
.IDC0181I MANAGEMENTCLASS USED IS TSOREG                              
.IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0            
.                                                                     
.IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0     
Dave

NiceGuy
Member
Posts: 6
Joined: Mon Oct 15, 2007 3:17 am

Post by NiceGuy » Wed Oct 17, 2007 11:50 pm

Thank You Dave, That is just what I was looking for.

I?m working on my first job as a programmer, hired as a junior contractor. What a difference between school and the real world. I?m a little disappointed in how they treat contractors here though; they offer almost no help and treat us as the lowest form of life. Well at least I?m earning experience that will help in my next job.

I will be posting more questions, I hope you don?t mind.

NG

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others