CL Command Reference - DATA
CL Command List > DATA Reference
Description:
he Data (DATA) command must be used in an input stream to indicate the beginning of an inline data file. This input stream is read by a spooling reader. The Data (DATA) command also specifies what delimiter must be used to indicate the end of the data file. Inline data files exist only during this job, after the job is finished, they are destroyed. Unnamed inline files can be used only once in the job.
Restrictions
1. The DATA command cannot be run from a work station.
2. The DATA command must have two slashes (//) in positions 1 and 2 of the data record.
3. Blanks can separate the slashes from the command name (//DATA).
Examples:
Example 1: Inline Data File in Data File Format
//DATA FILE(FILE1)
This command assigns the name FILE1 to the data that follows it, until an end of inline data condition is found (two slashes in positions 1 and 2).
Example 2: Specifying an End Character String
//DATA FILE(FILE2) ENDCHAR(¡¯STOPIT¡¯)
This command assigns the name FILE2 to the data following it; the file continues until a record is found that contains the characters STOPIT in positions 1 through 6. This delimiter allows the //BCHJOB, //ENDBCHJOB, and //DATA commands and records with // in positions 1 and 2 to be embedded in an inline file.
Example 3: Specifying a File Containing DBCS Data
//DATA FILE(FILE3) IGCDTA(*YES)
This command assigns the name FILE3 to the data that follows it. This file can contain DBCS data.