Where allowed to run:
|
Parameters Examples Error messages |
The 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
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | Input file | Name, QINLINE | Optional, Positional 1 |
FILETYPE | File type | *DATA, *SRC | Optional, Positional 2 |
ENDCHAR | Characters for end of data | Character value, '//' | Optional, Positional 3 |
IGCDTA | User specified DBCS data | *NO, *YES | Optional |
Top |
Specifies the name of the inline data file. This name is also specified in the program that processes the file.
Top |
Specifies whether the inline data following this command is put in the standard format for source files or in the data file format. The standard source file format is a sequence number (a 6-character source number) followed by the 6-character system date that goes before the data.
Top |
Specifies a string of characters used to indicate the end of an inline data file. To be recognized, the character string must begin in position 1 of the record. If you specify a character string other than // (the default value) as the delimiter, all records up to the end-of-file record (the record containing the specified character string starting in column 1) are treated as data. This allows you to embed reader commands in the data stream. The end-of-file record for ENDCHAR values (which are not default values) is not put to the data file, and it is not checked to see if it is a valid reader command. It is used only to determine the end of the data stream and then it is discarded.
Top |
Specifies whether the inline data following this command may contain double-byte character set (DBCS) data.
Top |
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.
Top |
Top |