Can the OP elaborate on what the use case is for this "generalized file handler"? What is it going to do?
________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Farley, Peter x23353 <[email protected]> Sent: Tuesday, August 22, 2017 9:59 AM To: [email protected] Subject: Re: Cobol Help Scott, IMHO COBOL is highly unsuited for use as a *generalized* file handler. For known files and record sizes and file types (i.e., application-specific I/O modules) the FILE STATUS variable and the VSAM feedback variable for VSAM files are your only choice for error handling. I have seen a COBOL I/O module that handled any LRECL, QSAM or VSAM file of a particular variable-length record type by using three assembler modules (QSAM, ESDS and KSDS) for the actual I/O functions (open, close, read, write, keyed read, update, etc.), with the COBOL interface managing the internal data structures supporting the collection of files opened at the request of the caller(s) in any particular batch step. In that case the assembler I/O modules handled any errors that they could (SYNAD, etc.) and passed back error code(s) and messages to the COBOL interface module to pass up to the caller, simulating COBOL FILE STATUS and VSAM error variable where possible. Metal C might be a better choice for more generalized file I/O handling, one small step above assembler but with all assembler facilities available. HTH Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of scott Ford Sent: Monday, August 21, 2017 8:41 AM To: [email protected] Subject: Cobol Help Guys/Gals: I need some help on a error I am not real familiar with in Cobol. I need write a generalized file-handler for files. Where do I start ? These are mostly QSAM files.. but i have to deal with Open/close/empty files, wrong length records...I have seen U1035 or similar errors and have done some reading in the manuals. Whats the easiest most effective method to handle file errors ? Regards, Scott -- *IDMWORKS * Scott Ford z/OS Dev. “By elevating a friend or Collegue you elevate yourself, by demeaning a friend or collegue you demean yourself” www.idmworks.com<http://www.idmworks.com> [email protected] Blog: www.idmworks.com/blog<http://www.idmworks.com/blog> *The information contained in this email message and any attachment may be privileged, confidential, proprietary or otherwise protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof.* ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
