ACCEPT does not involve a COBOL file (meaning there is no SELECT, no OPEN, 
CLOSE or any other IO statement, no FD).

ACCEPT therefore has no possible mechanism to "check the open worked". The sole 
"fix" for SYSIN missing is to include SYSIN (usually in the JCL - I don't think 
it can be dynamically added, certainly SYSOUT cannot, and I'd initially go with 
SYSIN not for the same general reasons).

In my experience, ACCEPT is used very little in Mainframes. If you want control 
over something, define it as a file, use OPEN/READ/CLOSE as normal. Then it is 
just a file, which happens to be 80-bytes fixed.

Beyond the potential usefulness (or otherwise) of a "conversation" with OPs, I 
don't think there should be ACCEPTs in a Production program. Just make it a 
file.

My use of ACCEPT is for those little programs to try things out. For a start, 
ACCEPTed data fools the compiler (with OPT) in a way that literals don't. 

This is not to say that ACCEPT doesn't have its cuteness: define a PIC X(240), 
ACCEPT with that field, and watch (well, not watch, it's COBOL, what are you 
going to see?), observe that it sucks of three input cards at once.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to