No, that is not so. COBOL will not attempt a "get" if the file is not open. It 
will: return the file-status field, or do what is indicated in DECLARATIVES, or 
give the U4038, depending on the presence or otherwise of FILE STATUS and 
DECLARATIVES.

TRAP(ON) or TRAP(OFF), no S0C1.

Someone kindly pointed out the "classic" S0C1 in COBOL. A "static" CALL 
unresolved. If you don't have the correct LE library in the linkedit/binder 
step, you can get LE to give you a S0C1.

If you delete the IO routines from the LE library, you'd get a S0C1 for IO. If 
you linkedit/binderer an old LE library, you may well get a S0C1 (or something 
else). If you overwrite the executable code, you may get a S0C1.

You can't get a S0C1 (without intent to do exactly that) from COBOL IO. 
(Enterprise COBOL, anyway).

I can keep denying the possibility forever. Why doesn't someone attempt to do 
it, rather than assert? I've tried, recently (not with V5+, but I strongly 
doubt it has changed, and its a bug if it has). I can't do it (except with 
deliberation) so feel free to try and report back. Just saying "it does" 
doesn't (shouldn't) cut ice anywhere.

On Tuesday, 12 July 2016 20:42:01 UTC+2, Tom Marchant  wrote:
> On Tue, 12 Jul 2016 11:40:22 -0500, Bill Woodger wrote:
> 
> >This may be true in Assembler, unless you code otherwise, but it is not true 
> >in COBOL, where the compiler generates the code for you (and uses its 
> >own/LE/"system" routines).
> 
> The PIC 1 still occurs when a COBOL (or other LE enabled) program tries to 
> read when the DCB isn't open, whether because the open failed, was never 
> issued, or the DCB was closed. The LE  ESPIE exit will intercept that PIC 1 
> and convert it to a U4038.
> 
> >
> >A simple test is to READ a file which is has not been successfully OPENed, 
> >or WRITE (a record to) a file which has not been successfully OPENed.
> >
> >There will be no S0C1.
> 
> That depends on your LE options. IIRC, if you have TRAP(OFF), you will get 
> the S0C1
> 
> 
> >On Tuesday, 12 July 2016 14:59:20 UTC+2, Tom Marchant  wrote:
> >> 
> >> Yes. The address of the GET or PUT routine has not been filled in. as a 
> >> result, 
> >> that location contains zero. Branch to location zero causes a S0C1.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to