VSAM File status 34
Moderator: Moderator Group
-
- Member
- Posts: 22
- Joined: Wed Apr 15, 2009 11:51 pm
- Location: london
VSAM File status 34
Hi,
I am reading a VSAM file sequentially and writing records into an sequential file.
The job is getting abended with a file status 34.
I have increased the space of the output file still it is abending at the same record.
Please share your thoughts on this?
I am reading a VSAM file sequentially and writing records into an sequential file.
The job is getting abended with a file status 34.
I have increased the space of the output file still it is abending at the same record.
Please share your thoughts on this?
COBOL CODE FOR FILE STATUS 35
Normally for file status 35 , we do the following.
following cobol code may be helpful to you.
following cobol code may be helpful to you.
Code: Select all
OPEN INPUT FILEA.
IF FILEA-STAT-CDE = '35'
OPEN OUTPUT FILEA
CLOSE FILEA
OPEN I-O FILEA
END-IF.
Natarajan
Chennai
Chennai
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
-
- Member
- Posts: 22
- Joined: Wed Apr 15, 2009 11:51 pm
- Location: london
Hi Dbz,
For the first run and second run the dcb parameters are same.
The dcb parameters are
//SUB DD DSN=ABC.TEST.UNIT.SECPOS.EXTRACT,
// DISP=(NEW,CATLG),
// UNIT=DISK,SPACE=(CYL,(10200,600),),
// DCB=(RECFM=FB,LRECL=285,BLKSIZE=0)
The file status is 34 and in the first run job abended with a user abend
with file status 34
In the second run i have added the below code in the program
IF WS-FILE-STATUS ='00'
CONTINUE
ELSE IF WS-FILE-STATUS ='34'
CONTINUE
ELSE
ABEND ROUTINE
END-IF
END-IF
Now the job abended with a S0C1 abend
select statements
VSAM File
SELECT CMS-POSITIONS-FILE
ASSIGN TO AMC002
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS AMC002-KEY
FILE STATUS IS WS-AMC002-FILE-STATUS.
output sequential file.
SELECT SECPOS-FILE
ASSIGN TO SECPOS
FILE STATUS IS WS-FILE-STATUS-SEC.
I/O Commands
OPEN INPUT CMS-POSITIONS-FILE
OPEN OUTPUT SECPOS-FILE
WRITE SECPOS-RECORD FROM WS-SECPOS-RECORD
CLOSE SECPOS-FILE
CLOSE CMS-POSITIONS-FILE
WS-SECPOS-RECORD record contains the data from VSAM file
Thanks
For the first run and second run the dcb parameters are same.
The dcb parameters are
//SUB DD DSN=ABC.TEST.UNIT.SECPOS.EXTRACT,
// DISP=(NEW,CATLG),
// UNIT=DISK,SPACE=(CYL,(10200,600),),
// DCB=(RECFM=FB,LRECL=285,BLKSIZE=0)
The file status is 34 and in the first run job abended with a user abend
with file status 34
In the second run i have added the below code in the program
IF WS-FILE-STATUS ='00'
CONTINUE
ELSE IF WS-FILE-STATUS ='34'
CONTINUE
ELSE
ABEND ROUTINE
END-IF
END-IF
Now the job abended with a S0C1 abend
select statements
VSAM File
SELECT CMS-POSITIONS-FILE
ASSIGN TO AMC002
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS AMC002-KEY
FILE STATUS IS WS-AMC002-FILE-STATUS.
output sequential file.
SELECT SECPOS-FILE
ASSIGN TO SECPOS
FILE STATUS IS WS-FILE-STATUS-SEC.
I/O Commands
OPEN INPUT CMS-POSITIONS-FILE
OPEN OUTPUT SECPOS-FILE
WRITE SECPOS-RECORD FROM WS-SECPOS-RECORD
CLOSE SECPOS-FILE
CLOSE CMS-POSITIONS-FILE
WS-SECPOS-RECORD record contains the data from VSAM file
Thanks
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
1. this is causing your SOC1.
a 34 requires you to stop. there is no more room.
2. 12,000 records and you die?
try using trks as dcb entry but leave the count the same.
10k cyl is a lot. try 10k trks.
Code: Select all
IF WS-FILE-STATUS ='00'
CONTINUE
ELSE IF WS-FILE-STATUS ='34'
CONTINUE
2. 12,000 records and you die?
try using trks as dcb entry but leave the count the same.
10k cyl is a lot. try 10k trks.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
-
- Member
- Posts: 22
- Joined: Wed Apr 15, 2009 11:51 pm
- Location: london
Hi Dbz,
I have modified the SPACE parameter as below
UNIT=UNIT,SPACE=(TRK,(12050,600),RLSE),
DCB=(RECFM=FB,LRECL=285,BLKSIZE=0)
and i have modified code in program as below
IF WS-FILE-STATUS ='00'
CONTINUE
ABEND ROUTINE
END-IF
I have run the job.
Job got abended with user abend U230 and file status 34
I have increased the space but still it is abended
Thanks
I have modified the SPACE parameter as below
UNIT=UNIT,SPACE=(TRK,(12050,600),RLSE),
DCB=(RECFM=FB,LRECL=285,BLKSIZE=0)
and i have modified code in program as below
IF WS-FILE-STATUS ='00'
CONTINUE
ABEND ROUTINE
END-IF
I have run the job.
Job got abended with user abend U230 and file status 34
I have increased the space but still it is abended
Thanks
-
- Member
- Posts: 22
- Joined: Wed Apr 15, 2009 11:51 pm
- Location: london
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
-
- Member
- Posts: 9
- Joined: Thu Nov 27, 2008 4:45 pm
VSAM - File system
Hi
May be this is too late to response but I think this error i.e FILE-STATUS=34 is not regarding the space problem.
FILE STATUS 34 - An attempt was made to WRITE beyond the
defined boundaries of a sequential file.
So make sure that before writing to a Sequential file see whether the length is not exceed that is defined before.
Thanks
Narendra
May be this is too late to response but I think this error i.e FILE-STATUS=34 is not regarding the space problem.
FILE STATUS 34 - An attempt was made to WRITE beyond the
defined boundaries of a sequential file.
So make sure that before writing to a Sequential file see whether the length is not exceed that is defined before.
Thanks
Narendra
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