Usage for physical and logical files (position 38)
Usage for physical and logical files (position 38)
You use this field to specify that a named field is to be an input-only, both (both input and output are allowed), or neither (neither input nor output is allowed) field.
For physical files, you can specify the following entries:
Entry : Meaning
Blank : Defaults to B (both input and output allowed)
B : Both input and output allowed
Because the default is the same as the only value, you do not need to make an entry in this field.
Entries in position 38 are not referred to by the REF or REFFLD keywords. Therefore, a B in position 38 for a field in a physical file has no effect when that field is referred to in a display file.
The valid entries for logical files are described as follows:
Blank (Default) : If position 38 is blank, the following situation occurs:
* For simple and multiple format logical files (PFILE specified at the record
level), the field is a both (B) field.
* For join logical files (JFILE specified at the record level), the field
is an input-only (I) field.
B (Both) : If position 38 is B, the field is a both field and can be used for both input and output operations. That is, your program can read data from the field and write data to the field. Both fields are not valid for join logical files, because join logical files are read-only files.
I (Input-Only) : If position 38 is I, the field is an input-only field and can be used for input operations only. That is, your program can read data from the field, but cannot change the field. Typical cases of input-only fields are key fields (to reduce maintenance of access paths), sensitive fields that a user can see but not change (such as, in employee records, salary), and fields for which the SST or TRNTBL keyword is specified.
If your program
performs a change to a record format in which you have specified input-only
fields, the input-only fields are not updated and no message is sent. If your
program performs an output operation to a record format in which you have
specified input-only fields, the input-only fields take default values (see
the DFT (Default) keyword-physical files only topic).
Input-only fields
are not valid in physical files.
N (Neither) : If position 38 is N, the field is a neither field (neither input nor output) and is valid only for join logical files. A neither field can be used as a join field in a join logical file, but your program cannot read a neither field.
Use neither fields when the attributes of join fields
in the physical files do not match. In this case, one or both join fields
must be redefined. However, you might not want to include the redefined fields
in the record format (that is, you might not want the application program
to see the redefined fields). Therefore, code the redefined join fields as
N and they do not appear in the record format.
A field with N in position
38 does not appear in the buffer used by your program. However, the field
description is displayed with the Display File Field Description (DSPFFD)
command.
*Neither* fields cannot be used as select/omit or key
fields.
Entries in position 38 are not referred to using the REF or REFFLD keyword. Therefore, a B or an I in position 38 for a field in a logical file has no effect when that field is referred to in a display file.