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
RC=08 from VSAM Delete
Moderator: Moderator Group
RC=08 from VSAM Delete
NG,
Try using the ?SET MAXCC=0? after the DELETE
Sysout Result
Dave
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))
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
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
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
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page