ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/data.htm

196 lines
8.2 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Data (DATA)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="DATA.Top_Of_Page"></a>
<h2>Data (DATA)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>
<ul><li>Batch job (*BATCH)</li>
</ul><b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#DATA.PARAMETERS.TABLE">Parameters</a><br>
<a href="#DATA.COMMAND.EXAMPLES">Examples</a><br>
<a href="#DATA.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="DATA"></a>
<p>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.
</p>
<p><b>Restrictions</b>
</p>
<ol>
<li>The DATA command cannot be run from a work station.
</li>
<li>The DATA command must have two slashes (//) in positions 1 and 2 of the data record.
</li>
<li>Blanks can separate the slashes from the command name (//DATA).
</li>
</ol>
</div>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="DATA.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#DATA.FILE"><b>FILE</b></a></td>
<td valign="top">Input file</td>
<td valign="top"><i>Name</i>, <b><u>QINLINE</u></b></td>
<td valign="top">Optional, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#DATA.FILETYPE"><b>FILETYPE</b></a></td>
<td valign="top">File type</td>
<td valign="top"><b><u>*DATA</u></b>, *SRC</td>
<td valign="top">Optional, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#DATA.ENDCHAR"><b>ENDCHAR</b></a></td>
<td valign="top">Characters for end of data</td>
<td valign="top"><i>Character value</i>, <b><u>'//'</u></b></td>
<td valign="top">Optional, Positional 3</td>
</tr>
<tr>
<td valign="top"><a href="#DATA.IGCDTA"><b>IGCDTA</b></a></td>
<td valign="top">User specified DBCS data</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="DATA.FILE"></a>
<h3>Input file (FILE)</h3>
<p>Specifies the name of the inline data file. This name is also specified in the program that processes the file.
</p>
<dl>
<dt><b><u>QINLINE</u></b></dt>
<dd>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 *YES on the <b>Spool the data (SPOOL)</b> parameter is opened for input. Unnamed inline files can be used only once by the job.
</dd>
<dt><b><i>name</i></b></dt>
<dd>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. Named inline data files can be accessed more than once by the job.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="DATA.FILETYPE"></a>
<h3>File type (FILETYPE)</h3>
<p>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.
</p>
<dl>
<dt><b><u>*DATA</u></b></dt>
<dd>The inline data is not in the standard format for source files. The data file is passed to the program, which uses it in the data format.
</dd>
<dt><b>*SRC</b></dt>
<dd>The inline data is numbered in sequence; it is a source file that can be used to create another file or a program.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="DATA.ENDCHAR"></a>
<h3>Characters for end of data (ENDCHAR)</h3>
<p>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.
</p>
<dl>
<dt><b><u>'//'</u></b></dt>
<dd>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.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>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 <b>Characters for end of data (ENDCHAR)</b> parameter, reader commands can be safely embedded in the data. The reader ignores all other data while searching for the specified string, including reader commands.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="DATA.IGCDTA"></a>
<h3>User specified DBCS data (IGCDTA)</h3>
<p>Specifies whether the inline data following this command may contain double-byte character set (DBCS) data.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>The inline file does not contain any DBCS data.
</dd>
<dt><b>*YES</b></dt>
<dd>The inline file may contain DBCS data.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="DATA.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Inline Data File in Data File Format</b>
</p>
<p>
<pre>
//DATA FILE(FILE1)
</pre>
</p>
<p>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).
</p>
<p><b>Example 2: Specifying an End Character String</b>
</p>
<p>
<pre>
//DATA FILE(FILE2) ENDCHAR('STOPIT')
</pre>
</p>
<p>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.
</p>
<p><b>Example 3: Specifying a File Containing DBCS Data</b>
</p>
<p>
<pre>
//DATA FILE(FILE3) IGCDTA(*YES)
</pre>
</p>
<p>This command assigns the name FILE3 to the data that follows it. This file can contain DBCS data.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="DATA.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF1753</b></dt>
<dd>Command cannot be run.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#DATA.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>