VSAM File status 34

Post your questions related to VSAM

Moderator: Moderator Group

Post Reply
neo_charan7
Member
Posts: 22
Joined: Wed Apr 15, 2009 11:51 pm
Location: london

VSAM File status 34

Post by neo_charan7 » Tue May 12, 2009 12:56 pm

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?

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

COBOL CODE FOR FILE STATUS 35

Post by Natarajan » Tue May 12, 2009 1:17 pm

Normally for file status 35 , we do the following.
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

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue May 12, 2009 3:30 pm

neo_charan7,

what were your dcb parms for the first run, and for the second?

also, your select statement and the I/O commands in your program.

and last, it is a 34 and not a 35?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

neo_charan7
Member
Posts: 22
Joined: Wed Apr 15, 2009 11:51 pm
Location: london

Post by neo_charan7 » Tue May 12, 2009 4:29 pm

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

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue May 12, 2009 5:00 pm

1. this is causing your SOC1.

Code: Select all

IF WS-FILE-STATUS ='00'
CONTINUE
ELSE IF WS-FILE-STATUS ='34'
CONTINUE 
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.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

neo_charan7
Member
Posts: 22
Joined: Wed Apr 15, 2009 11:51 pm
Location: london

Post by neo_charan7 » Tue May 12, 2009 5:50 pm

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

neo_charan7
Member
Posts: 22
Joined: Wed Apr 15, 2009 11:51 pm
Location: london

Post by neo_charan7 » Tue May 12, 2009 5:51 pm

Sorry typo error in below post

IF WS-FILE-STATUS ='00'
CONTINUE
ELSE
ABEND ROUTINE
END-IF

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue May 12, 2009 5:55 pm

change your space parm to SPACE=(TRK,(1000,600),RLSE),
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Narendra.nareddy
Member
Posts: 9
Joined: Thu Nov 27, 2008 4:45 pm

VSAM - File system

Post by Narendra.nareddy » Wed Aug 05, 2009 10:57 am

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

academyindia4

Topic deleted by Admin

Post by academyindia4 » Tue Jan 19, 2016 7:33 pm

<< Content deleted By Admin >>

academyindia4

Topic deleted by Admin

Post by academyindia4 » Wed Feb 03, 2016 12:40 am

<< Content deleted By Admin >>

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