Inline data files
An inline data file is a data file that is included as part of a batch job when the job is read by a reader or a submit jobs command. You use SBMDBJOB or STRDBRDR to queue a CL batch stream (stream of CL commands to be run). That CL batch stream can include data to be placed into inline data files (temporary files). When the job ends, the inline data files are deleted.
An inline data file is delimited in the job by a //DATA command at the start of the file and by an end-of-data delimiter at the end of the file.
ENDCHAR('// *** END OF DATA')
An inline data file can be either named or unnamed. For an unnamed inline data file, either QINLINE is specified as the file name in the //DATA command or no name is specified. For a named inline data file, a file name is specified.
- It has a unique name in a job. No other inline data file can have the same name.
- It can be used more than once in a job.
- Each time it is opened, it is positioned to the first record.
To use a named inline data file, you must either specify the file name in the program or use an override command to change the file name specified in the program to the name of the inline data file. The file must be opened for input only.
- Its name is QINLINE. (In a batch job, all unnamed inline data files are given the same name.)
- It can only be used once in a job.
- When more than one unnamed inline data file is included in a job, the files must be in the input stream in the same order as when the files are opened.
- Specify QINLINE in the program.
- Use an override file command to change the file name that is specified in the program to QINLINE.