DEFINE command: Difference between revisions
m (Automatically generated page update) |
No edit summary |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<b>Function</b> | |||
<br/>Defines a Model 204 entity | |||
<p> | |||
The <var>DEFINE</var> command performs the following functions:</p> | |||
<table class="thJustBold"> | |||
<tr class="head"> | |||
<th>Command</th><th>Specifies...</th> | |||
</tr> | |||
<tr> | |||
<th><var>[[DEFINE DATASET command|DEFINE DATASET]]</var></th> | |||
<td>Physical characteristics of a data set, file, or template, or identifies non-Model 204 files.</td> | |||
</tr> | |||
<tr><th><var>[[DEFINE FIELD command|DEFINE FIELD]]</var></th> | |||
<td>Field names and attributes.</td></tr> | |||
<tr><th><var>[[DEFINE FIELDGROUP command|DEFINE FIELDGROUP]]</var></th> | |||
<td>Field group contents, including associated fields and field groups.</td></tr> | |||
<tr><th><var>[[DEFINE FILE command|DEFINE FILE]]</var></th> | |||
<td>File synonym.</td></tr> | |||
<tr><th><var>[[DEFINE LINK command: Overview of intersystem network links|DEFINE LINK]]</var></th> | |||
<td>Defines a network connection (used for Model 204 intersystem | |||
connections).</td></tr> | |||
<tr><th><var>[[DEFINE PRINTER command|DEFINE PRINTER]]</var></th> | |||
<td>Output definition to direct printed output.</td></tr> | |||
<tr><th><var>[[DEFINE PROCESS command: Overview of intersystem network process|DEFINE PROCESS]]</var></th> | |||
<td>Process for reference by User Language statements, and the attributes of the process (used for Model 204 intersystem connections).</td></tr> | |||
<tr> | |||
<th nowrap><var>[[DEFINE PROCESSGROUP command: Overview of intersystem network processgroup|DEFINE PROCESSGROUP]]</var></th> | |||
<td>Processgroup (used for Model 204 intersystem connections).</td></tr> | |||
<tr><th><var>[[DEFINE PUNCH command|DEFINE PUNCH]]</var></th> | |||
<td>Output definition to direct punched output.</td></tr> | |||
<tr><th><var>[[DEFINE REMOTE command|DEFINE REMOTE]]</var></th> | |||
<td>Remote LU (used for Horizon CNOS connections).</td></tr> | |||
<tr><th><var>[[DEFINE SESSIONGROUP command|DEFINE SESSIONGROUP]]</var></th> | |||
<td>Sessiongroup (used for Horizon CNOS connections).</td></tr> | |||
<tr><th><var>[[DEFINE STREAM command|DEFINE STREAM]]</var></th> | |||
<td>Sequential I/O streams.</td></tr> | |||
</table> | |||
===General format of the DEFINE command=== | |||
The syntax of the <var>DEFINE</var> command is as follows: | |||
<p class="syntax">DEFINE | |||
{ DATASET | FIELD | FILE | LINK | PRINTER | PROCESS | |||
| PROCESSGROUP | PUNCH | REMOTE | SESSIONGROUP | STREAM } | |||
<span class="term">name</span> [LIKE <span class="term">previousname</span>] [WITH SCOPE=SYSTEM] | |||
[<span class="term">options</span> [<span class="term">options</span>]...] | |||
</p> | |||
<b>Where:</b> | <b>Where:</b> | ||
<table> | <table> | ||
<tr> | <tr> | ||
<th>name</th> | <th>name</th> | ||
<td> | <td>The <var class="product">Model 204</var> name of the entity defined. The name in a data set, link, printer, process, processgroup, punch, or stream definition can be up to 8 characters in length. Field names can be up to 255 characters in length.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<th><var>LIKE</var></th> | <th><var>LIKE</var></th> | ||
<td> | <td>Gives the entity that you are currently defining the attributes of a previously defined entity or template specified by the phrase <code>LIKE <i>previousname</i></code>. <var>LIKE</var> is not supported for field definitions.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<th>previousname</th> | <th>previousname</th> | ||
<td> | <td>The name of the previously defined entity or template. | ||
<p>Used by itself, LIKE copies all the attributes of the entity defined by a previous DEFINE command. When used with WITH, the options listed in the WITH phrase override the attributes of the entity specified by the LIKE phrase. </p> | <p>Used by itself, <var>LIKE</var> copies all the attributes of the entity defined by a previous <var>DEFINE</var> command. When used with <var>WITH</var>, the options listed in the <var>WITH</var> phrase override the attributes of the entity specified by the LIKE phrase. </p> | ||
</td> | </td> | ||
</tr> | </tr> | ||
Line 21: | Line 80: | ||
<tr> | <tr> | ||
<th><var>SCOPE=SYSTEM</var></th> | <th><var>SCOPE=SYSTEM</var></th> | ||
<td> | <td>Required, and indicates that the definition is available to all users for the entire run. </td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<th>options</th> | <th>options</th> | ||
<td> for the particular forms of the DEFINE command are described | <td>Options for the particular forms of the <var>DEFINE</var> command, such as <var>DEFINE DATASET</var>, are described on the page for each command form. Options must be separated by commas or by one or more blanks.</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
==Syntax notes== | ==Syntax notes== | ||
Certain rules concerning options are checked at a point later than the time of definition. Refer to the following example: | Certain rules concerning options are checked at a point later than the time of definition. Refer to the following example: | ||
<p class=" | <p class="code">DEFINE PRINTER P1 WITH - | ||
SCOPE=SYSTEM | SCOPE=SYSTEM | ||
ROUTER=VM - | ROUTER=VM - | ||
ID=PRIIINTER1 | ID=PRIIINTER1 | ||
</p> | </p> | ||
<p>In the example, the correct ID specification PRINTER1 is misspelled. However, the DEFINE command | <p> | ||
<p>The example also shows the use of the hyphen (-) as a continuation character. A continuation character preceded by a space is required at the end of an input line, if the command parameters continue onto the next line.</p> | In the example, the correct ID specification <code>PRINTER1</code> is misspelled. However, the <var>DEFINE</var> command runs. An error occurs if an attempt is made subsequently to run a <code>USE P1</code> command that accesses the incorrect <var>DEFINE PRINTER</var> definition. </p> | ||
<p> | |||
The example also shows the use of the hyphen (<tt>-</tt>) as a continuation character. A continuation character preceded by a space is required at the end of an input line, if the command parameters continue onto the next line.</p> | |||
==Usage notes== | ==Usage notes== | ||
< | <ul> | ||
< | <li>You can create a template and assign it a name with the <var>DEFINE</var> command (except for <var>DEFINE FIELD</var>). The template can contain all the attributes needed to create a new template. You can refer to the template name in a <var>DEFINE</var> command or in an <var>ALLOCATE</var> command where a <var>DEFINE DATASET</var> command previously defined the template. The attributes of a template override those of the previously defined entity.</li> | ||
< | |||
<li>The definition of any entity can be replaced by entering a <var>DEFINE</var> command, the previously defined entity name, and any attributes to be altered. Issuing a <var>DEFINE</var> command with the same name as one presently in use overrides the current template definition. You, therefore, might unintentionally replace an existing entity definition, because <var class="product">Model 204</var> does not check if the entity name entered is unique. </li> | |||
<li>When it processes a <var>DEFINE</var> command, <var class="product">Model 204</var> ends any current SOUL update unit and begins a non-backoutable update unit. If a <var class="product">Model 204</var> command non-backoutable update unit is in progress, the <var>DEFINE</var> command is included in that [[File integrity and recovery#Update units and transactions|update unit]]. </li> | |||
<li><var>DEFINE</var> commands that contain invalid or mutually exclusive options are rejected by <var class="product">Model 204</var>. </li> | |||
</ul> | |||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 21:32, 6 April 2017
Function
Defines a Model 204 entity
The DEFINE command performs the following functions:
Command | Specifies... |
---|---|
DEFINE DATASET | Physical characteristics of a data set, file, or template, or identifies non-Model 204 files. |
DEFINE FIELD | Field names and attributes. |
DEFINE FIELDGROUP | Field group contents, including associated fields and field groups. |
DEFINE FILE | File synonym. |
DEFINE LINK | Defines a network connection (used for Model 204 intersystem connections). |
DEFINE PRINTER | Output definition to direct printed output. |
DEFINE PROCESS | Process for reference by User Language statements, and the attributes of the process (used for Model 204 intersystem connections). |
DEFINE PROCESSGROUP | Processgroup (used for Model 204 intersystem connections). |
DEFINE PUNCH | Output definition to direct punched output. |
DEFINE REMOTE | Remote LU (used for Horizon CNOS connections). |
DEFINE SESSIONGROUP | Sessiongroup (used for Horizon CNOS connections). |
DEFINE STREAM | Sequential I/O streams. |
General format of the DEFINE command
The syntax of the DEFINE command is as follows:
DEFINE { DATASET | FIELD | FILE | LINK | PRINTER | PROCESS | PROCESSGROUP | PUNCH | REMOTE | SESSIONGROUP | STREAM } name [LIKE previousname] [WITH SCOPE=SYSTEM] [options [options]...]
Where:
name | The Model 204 name of the entity defined. The name in a data set, link, printer, process, processgroup, punch, or stream definition can be up to 8 characters in length. Field names can be up to 255 characters in length. |
---|---|
LIKE | Gives the entity that you are currently defining the attributes of a previously defined entity or template specified by the phrase LIKE previousname . LIKE is not supported for field definitions. |
previousname | The name of the previously defined entity or template.
Used by itself, LIKE copies all the attributes of the entity defined by a previous DEFINE command. When used with WITH, the options listed in the WITH phrase override the attributes of the entity specified by the LIKE phrase. |
SCOPE=SYSTEM | Required, and indicates that the definition is available to all users for the entire run. |
options | Options for the particular forms of the DEFINE command, such as DEFINE DATASET, are described on the page for each command form. Options must be separated by commas or by one or more blanks. |
Syntax notes
Certain rules concerning options are checked at a point later than the time of definition. Refer to the following example:
DEFINE PRINTER P1 WITH - SCOPE=SYSTEM ROUTER=VM - ID=PRIIINTER1
In the example, the correct ID specification PRINTER1
is misspelled. However, the DEFINE command runs. An error occurs if an attempt is made subsequently to run a USE P1
command that accesses the incorrect DEFINE PRINTER definition.
The example also shows the use of the hyphen (-) as a continuation character. A continuation character preceded by a space is required at the end of an input line, if the command parameters continue onto the next line.
Usage notes
- You can create a template and assign it a name with the DEFINE command (except for DEFINE FIELD). The template can contain all the attributes needed to create a new template. You can refer to the template name in a DEFINE command or in an ALLOCATE command where a DEFINE DATASET command previously defined the template. The attributes of a template override those of the previously defined entity.
- The definition of any entity can be replaced by entering a DEFINE command, the previously defined entity name, and any attributes to be altered. Issuing a DEFINE command with the same name as one presently in use overrides the current template definition. You, therefore, might unintentionally replace an existing entity definition, because Model 204 does not check if the entity name entered is unique.
- When it processes a DEFINE command, Model 204 ends any current SOUL update unit and begins a non-backoutable update unit. If a Model 204 command non-backoutable update unit is in progress, the DEFINE command is included in that update unit.
- DEFINE commands that contain invalid or mutually exclusive options are rejected by Model 204.