The following considerations apply to opening inline data files:
- Record length specifies the length of the input records. (Record length
is optional.) When the record length exceeds the length of the data, a message
is sent to your program. The data is padded with blanks. When the record length
is less than the data length, the records are truncated.
- When a file is specified in a program, the server searches for the file
as a named inline data file before it searches for the file in a library.
Therefore, if a named inline data file has the same name as a file that is
not an inline data file, the inline data file is always used, even if the
file name is qualified by a library name.
- Named inline data files can be shared between programs in the same job
by specifying SHARE(*YES) on a create file or override file command. For example,
if an override file command specifying a file named INPUT and SHARE(*YES)
is in a batch job with an inline data file named INPUT, any programs running
in the job that specify the file name INPUT will share the same named inline
data file. Unnamed inline data files cannot be shared between programs in
the same job.
- When you use inline data files, you should make sure the correct file
type is specified on the //DATA command. For example, if the file is to be
used as a source file, the file type on the //DATA command must be source.
- Inline data files must be opened for input only.