If the types of input files previously described in this document do not provide the appropriate methods for accessing a particular file, you can code your own specialized routine and cause the Reporting Facility to call it.
The following format of the FILE command describes how to define a user-supplied File Access Module (user-module) to the Reporting Facility:
►►─ filename: ─┬─ INPUT ─┬─ modulename ─┬──────────────────────────┬──────────► └─ FILE ──┘ └─ 'alphanumeric literal' ─┘ ►─ RECORD=nnn ─┬─────────────┬───────────────────────────────────────────────►◄ └─ PROG=type ─┘
Is a unique identifier within the Reporting Facility program, coded in accordance with standard file naming conventions. A one-character alphanumeric field is generated by CA Datacom/DB Reporting Facility with the same name as the file name, to be used as a return code in conjunction with the GET command.
Is a maximum eight-character name by which the user program has been cataloged to the user Load Library. The first character must be in the range of A—Z and subsequent characters must be in the range of A—Z or 0—9. The module name must be different from the file name.
The system automatically allocates an 80-byte area to be used for communication between the user-module and the Reporting Facility. The 80-byte area is a field that resides in the GSA; you can reference it by the field name of the module name.
To code a multiple user routine in a single run with the same module name, qualify the reference to the Communications Area.
Specifies an initial value for the 80-byte Communications Area defined above. If you omit this parameter, the system sets the Communications Area to blanks.
Specifies the length of the I/O buffer where the user-module places the accessed data. It is the sole responsibility of the user-module to fill this area with data. This is a required parameter and must be a valid numeric constant greater than 0.
Specifies the source language of the user-module so that the necessary internal linkage can be set up properly. Valid entries are ASSEMBLY, ASM, BAL, COBOL, or COB. If you omit this parameter, the system assumes ASSEMBLY.
Note the following:
The user-module must assume complete responsibility for the integrity of the files it accesses, including their opening and closing.
By filling bytes 1—4 of the Communication Area with X'FF' (hexadecimal high-values), you can signal the END-OF-FILE condition to the Reporting Facility. Post the END-OF-FILE condition after the last record has been processed.
By setting bytes 1—4 of the Communications Area to X'FFFFFFFE', you can signal the NO-RECORD-FOUND condition.
When bytes 1—4 contain blanks on return from the user-module, the Reporting Facility assumes that data has been placed in the I/O area and sets the return code to Y.
If the user-module detects a condition serious enough to terminate the run immediately, fill bytes 1—4 of the Communications Area with hexadecimal low-values.
Fill the remaining bytes in the Communications Area, bytes 5—80, with any user message to be printed along with the Reporting Facility abend message. Processing terminates, and a complete system dump is executed.
|
Copyright © 2014 CA.
All rights reserved.
|
|