Modifying fields in the command-level parameter structure by exits XFCREQ and XFCREQC
Some fields that are passed to file control are used as input to the request, some are used as output fields, and some are used for both input and output. The method your user exit program uses to modify a field depends on the usage of the field.
A list of input and output fields
- Input fields
-
The following are always input fields:
- FILE
- FROM
- KEYLENGTH
- REQID
- SYSID
- Output fields
-
The following are always output fields:
- INTO
- NUMREC
- SET
- Fields used for both input and output
-
Whether LENGTH and RIDFLD are input or output fields depends on the request, as shown in Table 1. A dash (—) means that the keyword cannot be specified on the request.
Table 1. LENGTH and RIDFLD as input and output fields Request LENGTH RIDFLD READ Output See Note 1. WRITE Input See Note 2. REWRITE Input — DELETE — See Note 3. UNLOCK — — STARTBR — Input READNEXT Output Output READPREV Output Output ENDBR — — RESETBR — Input Note:- Normally, this is an input field. However, if UPDATE is specified and the file is a BDAM file using extended key search, RIDFLD is used for both input and output.
- The use of RIDFLD on a WRITE request depends on the file type. For a VSAM KSDS or RRDS, or a fixed-format BDAM file, RIDFLD is an input field. For all other file types, it is used either for output only, or for both input and output, and should be treated like an output field.
- RIDFLD is an input field on DELETE requests that are not preceded by a READ UPDATE. It is not specified on requests that are preceded by a READ UPDATE.
Modifying input fields
The correct method of modifying an input field is to create a new copy of it, and to change the address in the command-level parameter list to point to your new data.
Modifying output fields
The technique described in Modifying input fields is not suitable for modifying output fields. (The results would be returned to the new area instead of the application’s area, and would be invisible to the application.)
An output field is modified by altering the data that is pointed to by the command-level parameter list. In the case of an output field, you can modify the application’s data in place, because the application is expecting the field to be modified anyway.
Modifying fields used for both input and output
An example of a field that is used for both input and output is LENGTH on a READ request that specifies INTO. You can treat such fields in the same way as output fields, and they are considered to be the same.