Oh, the hazards of working without coding examples and manuals at hand! Obviously I've suffered a memory parity error and the peculiar failures in the past that I'm thinking of must have been from using CLOSE (R3) rather than CLOSE ((R3)), which I confirmed does indeed pass the contents of R3.

Perhaps your failure is for the same reason that the system is getting what we like to call the "I've Gotcha" error on autoclose. The IEC999I basically says the system can't find a valid DCB where he thinks there ought to be one to CLOSE the open file at step termination. Have you by any chance freed the storage containing the DCB before you do the CLOSE? If the storage is still allocated and R3 still contains the correct address, then another possibility to consider is that your program has somehow overwritten the DCB with garbage.


Steve Myers wrote:
OPEN ((R3))

and

CLOSE ((R3))

produce the same result.  That part of the code is correct.

Joel C. Ewing wrote:
I have been burned in the past by the syntax for OPEN and CLOSE not being identical. You have an extra pair of parentheses in your CLOSE which I believe is causing the macro to interpret your DCB address as being an expression "(R3)" rather than a register reference, which would mean it would be looking at absolute location "3" rather than using the contents of register 3 as the DCB pointer. Needless to say it won't find a valid DCB there. I believe you want instead
  CLOSE (R3),MODE=31

In contexts where a DCB auto close at step termination succeeds, some programs may run with this kind of bug for years with no ill effects other than the mysterious error message from attempting to do a CLOSE on a bad DCB with a strange DDNAME. Your IFGOTCOA error indicates that auto-close is not succeeding, so there could be other undesirable side effects if the problem is not fixed.


Paul Schuster wrote:
Hello:

I have a AMODE 31 RMODE ANY program that dynamically allocates an existing
PDS with DISP=SHR and NDISP=KEEP.

I create a DCB in 24bit storage, and issue OPEN like this:

OPEN  ((R3),INPUT),MODE=31

The OPEN completes RC=0.

With very little intervening code (a WTO, but no READ of the data set)
I issue this:

CLOSE ((R3)),MODE=31

R3 does point to the DCB, but the CLOSE gets RC=4.

I get messages like this:

IEC223I 04,IFG0200V,INIT,,UNKNOWN IEC999I IFG0TC0A,IFG0TC0B,INIT , ,DEB ADDR = 7BDD94,DSN = thedsnthatwasopened

Any idea on what is wrong? I don't specify a DCBE, as that is supposed
to be optional??

Thank you.

Paul
...




--
Joel C. Ewing, Fort Smith, AR        [EMAIL PROTECTED]

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to