Page 1 of 1

VSAM File status 34

Posted: Tue May 12, 2009 12:56 pm
by neo_charan7
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?

COBOL CODE FOR FILE STATUS 35

Posted: Tue May 12, 2009 1:17 pm
by Natarajan
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.                                               

Posted: Tue May 12, 2009 3:30 pm
by dbzTHEdinosauer
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?

Posted: Tue May 12, 2009 4:29 pm
by neo_charan7
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

Posted: Tue May 12, 2009 5:00 pm
by dbzTHEdinosauer
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.

Posted: Tue May 12, 2009 5:50 pm
by neo_charan7
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

Posted: Tue May 12, 2009 5:51 pm
by neo_charan7
Sorry typo error in below post

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

Posted: Tue May 12, 2009 5:55 pm
by dbzTHEdinosauer
change your space parm to SPACE=(TRK,(1000,600),RLSE),

VSAM - File system

Posted: Wed Aug 05, 2009 10:57 am
by Narendra.nareddy
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

Topic deleted by Admin

Posted: Tue Jan 19, 2016 7:33 pm
by academyindia4
<< Content deleted By Admin >>

Topic deleted by Admin

Posted: Wed Feb 03, 2016 12:40 am
by academyindia4
<< Content deleted By Admin >>