Hi all. !
OPNID(M1AMC00) for file M1AMC00 already exists.
CPF4174 received by procedure NONCLP. (C D I R).
I'm getting this kind of error: what will be the solution?
Surey
Software/Hardware used:
ASKED:
December 27, 2012 6:00 AM
UPDATED:
December 27, 2012 2:14 PM
DCL VAR(&TXT) TYPE(*CHAR) LEN(100)
CHGVAR VAR(&TXT) VALUE(‘DEP’ *GT ‘ *CAT ’01′)
OVRDBF FILE(M1AMC00) SHARE(*YES) SEQONLY(*NO)
OPNQRYF FILE((*LIBL/M1AMC00)) OPTION(*ALL) +
QRYSLT(&TXT) KEYFLD(*FILE) SEQONLY(*NO)
CALL PGM(NONRPG)
DLTOVR FILE(M1AMC00)
CLOF OPNID(M1AMC00)
this is my code i have already closed the file using CLOF .. but still im getting the same error.
Before anything else, try calling the program in a new session. Either start a second session and test the program or sign off, sign back on and test the program. If you get the error in a new session, check the joblog for any previous errors related to the file. Post results back here. — Tom
I just called the same program in different session, now its working fine ..
thanks
But what was the problem Mr.Tom ?
Surey
One large possibility is that you called the program earlier in the same job, and there was an error that caused an exit early from the program. If you call the program again, the file could still be open in the job with the same open ID. You should ensure that the file is closed with error handling code when errors happen. Try running CLOF OPNID(M1AMC00) from a command line in the job that has the error. — Tom