× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



One upon a time "programmers" typed programs on (gasp) CARDS!  They fed the
cards into the computer and the computer compiled the program...
DATA (Data) Command Description
DATA Command syntax diagram
Purpose
The Data (//DATA) command must be used to indicate the beginning of an
inline data file in an input stream that is read by a spooling reader. It
also specifies the delimiter that must be used to indicate the end of the
data file. Inline data files exist only during the current job; they are
destroyed after the current job is finished. Unnamed inline files can be
used only once in the job.
Restrictions:
1. The DATA command cannot be used from a work station.
2. Two slashes must precede this command name when entering it in the data
record, that is, //DATA.
3. The user can separate the slashes from this command name with blank
spaces, for example, //  DATA.
Optional Parameters
FILE
Specifies the name of the inline data file. This name is also specified in
the program that processes the file.
QINLINE: The name of the inline data file is QINLINE. The file is processed
as an unnamed inline file. An unnamed file can be processed if the program
specifies QINLINE as the file name, or if the device file that specifies
SPOOL(*YES) is opened for input. Unnamed inline files can be used only once
by the job.
inline-file-name: Specify the name of the inline data file used by one or
more programs in the job. The file is connected to the program when the
program opens the file by specifying its file name. The job can get access
to named inline data files more than once.
FILETYPE
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 precedes the data. More
information on this parameter is in commonly used parameters.
*DATA: The diskette file describes data records.
*SRC: The inline data is numbered in sequence. It is a source file that can
be used to create another file or a program.
ENDCHAR
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 by using // (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 imbed reader commands (//BCHJOB,
//DATA, //ENDBCHJOB, or //ENDINP) 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.
'//': The default value is two slashes. The command works the same way
whether two slashes are coded into the parameter or the parameter itself is
defaulted.
Using the default, the slashes in positions 1 and 2 of a record (in either a
data file or a source file) identify the first record beyond the file. Thus,
the commands //BCHJOB, //DATA, //ENDBCHJOB, or //ENDINP also indicate the
end of the inline file.
'end-character-string': A character string (up to 25 characters long and
enclosed in apostrophes) can be entered to identify the last record in the
file. The character string can contain both alphanumeric and special
characters. If a character combination other than '//' is specified on the
ENDCHAR parameter, reader commands can be safely imbedded in the data. The
reader ignores all other data, including reader commands, while searching
for the specified string.
IGCDTA
Specifies whether the file contains double-byte character set (DBCS) data.
*NO: The file does not process DBCS data.
*YES: The inline file can contain DBCS data.
Examples for DATA
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.
Error messages for DATA
*ESCAPE Messages
CPF1753
Command cannot be run.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.