|
View previous topic :: View next topic
|
| Author |
Message |
vmj
New User
Joined: 16 May 2006 Posts: 16 Location: Philippines
|
|
|
|
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?
thanks.  |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
 |
vmj
New User
Joined: 16 May 2006 Posts: 16 Location: Philippines
|
|
|
|
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.  |
|
| Back to top |
|
 |
vmj
New User
Joined: 16 May 2006 Posts: 16 Location: Philippines
|
|
|
|
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?  |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
| Sounds about right, what is the new error? |
|
| Back to top |
|
 |
vmj
New User
Joined: 16 May 2006 Posts: 16 Location: Philippines
|
|
|
|
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...  |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|