IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Other reason for VSAM RC 35


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vmj

New User


Joined: 16 May 2006
Posts: 16
Location: Philippines

PostPosted: Wed May 30, 2007 2:49 pm
Reply with quote

I have this COBOL batch program that uses 4 vsam files, 1 of them is an I-O file.

I already successfully defined the I-O vsam file before the execution of program, however the program stops and gave me a return code 35.

I have double checked the names of the files and it's location and i'm sure it's correct...

RC 35 according to manuals refers to opening a file that does not exist, but in my case it exists, any other explanation and help? icon_cry.gif

thanks. icon_smile.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed May 30, 2007 3:06 pm
Reply with quote

If the 35 is in the status for a file opened for some form of input, then it is not present.
Are you sure it is the I-O file and not another input file?
The only connection between the program and the operating system is through the filenames in the selects and the filenames on the DDs.
Don't worry about if the file exists or not, if it didn't, that would be another error.
Post your selects and the DD jcl.
Back to top
View user's profile Send private message
vmj

New User


Joined: 16 May 2006
Posts: 16
Location: Philippines

PostPosted: Thu May 31, 2007 6:23 am
Reply with quote

Hi William,

thanks for the reply, i appreciate it. here are some details of the situation.

*****
the listq of the jcl produce this.

/. LLSDF
// ASSGN SYS026,SYSIPT
1T20I SYS026 HAS BEEN ASSIGNED TO X'FEC' (TEMP)
// ASSGN SYS007,01E
// DLBL IJSYSUC,'SLOL2.USER.CATALOG',,VSAM,CAT=SLOL2UC
// DLBL SLSBCHI,'SLS10.BCH.BRANCH',,VSAM
// DLBL STMASI,'LBP2.ST.BATCH.STACTM.VSAM',,VSAM,CAT=STBT1UC
// DLBL IMMASI,'LBP2.IM.ONLINE.IMACTM.TEST.VSAM',,VSAM,CAT=IMBT1UC
// DLBL TMPFILE,'LLS.DF.TEMP.VSAM',,VSAM,CAT=SLBT2UC
// DLBL LLSST,'SLS10.TEST.ACT.SAVINGS.MERGED.D0529'
// EXTENT SYS003,DEVTPL,1,0,1,600
// DLBL LLSIM,'SLS10.TEST.ACT.CHECKING.MERGED.D0529'
// EXTENT SYS004,DEVTPL,1,0,1,60
// DLBL DFLST,'SLS10.TEST.ACT.SAVINGS.FILTERED.D0529'
// EXTENT SYS012,DEVTPL,1,0,1,600
// DLBL DFLIM,'SLS10.TEST.ACT.CHECKING.FILTERED.D0529'
// EXTENT SYS014,DEVTPL,1,0,1,60
// EXEC LLSDF,SIZE=AUTO
1S54I PHASE LLSDF IS TO BE FETCHED FROM TSTLBD.SLSLOAD2
**** TEMP FILE ERROR: 35 ****
1S55I LAST RETURN CODE WAS 0012
05/29/07
1S01D INVALID STATEMENT.
// IF $MRC GT 4 THEN
// GOTO $EOJ
1S78I JOB TERMINATED DUE TO 'GOTO $EOJ'
EOJ LLSDFJ MAX.RETURN CODE=0012


*****
in my COBOL program i have this select statement for the temp file

SELECT TEMP-FILE ASSIGN TO TMPFILE
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS TEMP-KEY
FILE STATUS IS WS-TEMP-STAT.

*****
i opened my files like this

OPEN INPUT LLS-IMFILE
LLS-STFILE
ST-MASTERFILE
IM-MASTERFILE
SLSBCH-FILE
SYSIN-FILE
I-O TEMP-FILE
OUTPUT DF-STFILE
DF-IMFILE
REPORT-FILE.

*****

i have a section in my program that traps file status, the condition below was satisfied thus the message in the listq also terminating the program

IF NOT WS-TEMP-STAT-OK THEN
DISPLAY '**** TEMP FILE ERROR: ', WS-TEMP-STAT, ' ****'
GO TO 7100-ERROR
END-IF.

*****

hope this could help in analyzing the problem.

thanks william. icon_biggrin.gif
Back to top
View user's profile Send private message
vmj

New User


Joined: 16 May 2006
Posts: 16
Location: Philippines

PostPosted: Thu May 31, 2007 12:13 pm
Reply with quote

i think i just fixed my problem, the situation is the file that gives RC 35 is open as I-O, but this file is empty, what i did was to open it as output first and later on open it as I-O.

Somehow the RC 35 is gone and now encountering a different error.

what do you think william? icon_biggrin.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu May 31, 2007 2:41 pm
Reply with quote

Sounds about right, what is the new error?
Back to top
View user's profile Send private message
vmj

New User


Joined: 16 May 2006
Posts: 16
Location: Philippines

PostPosted: Thu May 31, 2007 3:04 pm
Reply with quote

just some data exception (which i already solved by this time)

i made some test on the i-o file to see if it contain any record after the write section in the program, i found nothing in the file, it's weird because it does not return any error, i only noticed it when the 2nd part of the program, which is where the file is being used as input, abend.

this is my code for the write statement

MOVE 1 TO TEMP-SEQUENCE-NUMBER.
SET WS-TEMP-WRITTEN-NO TO TRUE.

PERFORM UNTIL WS-TEMP-WRITTEN-YES

READ TEMP-FILE
INVALID KEY
WRITE TEMP-REC
IF NOT WS-TEMP-STAT-OK THEN
DISPLAY 'WRITE TEMP FILE ERROR: ' WS-TEMP-STAT
GO TO 7100-ERROR
END-IF
SET WS-TEMP-WRITTEN-YES TO TRUE
END-READ

ADD 1 TO TEMP-SEQUENCE-NUMBER

END-PERFORM.


i need to check this part....

sigh... icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Reorg abended with REASON=X'00E40347' DB2 2
No new posts REASON 00D70014 in load utility DB2 6
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts CVDA value for RRDS VSAM dataset. CICS 2
Search our Forums:

Back to Top