ASSIGN command: Difference between revisions
m (Automatically generated page update) |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
<dd>User | <dd>User | ||
<dt>Function | <dt>Function | ||
<dd>Assigns an alias for the name of a procedure | <dd>Assigns an alias for the name of a [[Procedures|procedure]] | ||
</dl> | </dl> | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">ASSIGN procname,alias | <p class="syntax">ASSIGN <var class="term">procname</var>,<var class="term">alias</var> | ||
</p> | </p> | ||
Line 19: | Line 20: | ||
<tr> | <tr> | ||
<th>alias</th> | <th>alias</th> | ||
<td> is the new alias to be added to the procedure definition (1 to 255 characters). The alias cannot begin with a minus sign or a zero. | <td> is the new alias to be added to the procedure definition (1 to 255 characters). The alias cannot begin with a minus sign or a zero. The alias can consist of any alphanumeric characters, but not the following punctuation and keyboard characters: | ||
<table> | <table> | ||
Line 50: | Line 51: | ||
</table> | </table> | ||
===Syntax notes=== | ===Syntax notes=== | ||
A comma is required between procname and alias. | A comma is required between <var class="term">procname</var> and <var class="term">alias</var>. | ||
==Example== | ==Example== | ||
<p class="code">ASSIGN EMPLOYEE, EMP | <p class="code">ASSIGN EMPLOYEE, EMP | ||
</p> | </p> | ||
==Usage notes== | ==Usage notes== | ||
A procedure can have more than one name: an official name and any number of alternative names or aliases. You can specify an alias when you define the procedure (in the PROCEDURE command) or at a later time (in the ASSIGN command). | A procedure can have more than one name: an official name and any number of alternative names or aliases. You can specify an alias when you define the procedure (in the <var>[[PROCEDURE_command|PROCEDURE]]</var> command) or at a later time (in the ASSIGN command). | ||
<p>If a group contains multiple procedure files, then the ASSIGN command does not execute in group context. In this case, aliases must be assigned in file context.</p> | <p>If a [[Files,_groups,_and_reference_context#File_groups|group]] contains multiple procedure files, then the ASSIGN command does not execute in group context. In this case, aliases must be assigned in file context.</p> | ||
<p>After the ASSIGN command has been executed, the official name and all old aliases remain in effect. An alias remains in effect until it is deassigned | <p>After the ASSIGN command has been executed, the official name and all old aliases remain in effect. An alias remains in effect until it is deassigned with the <var>[[DEASSIGN command|DEASSIGN]]</var> command.</p> | ||
<p class="note"><b>Note:</b> | <p class="note"><b>Note:</b> | ||
<br/>The DISPLAY command (ALIAS option) can be used to display the existing aliases for one or more procedure names. | <br/>The <var>[[DISPLAY_command|DISPLAY]]</var> command (ALIAS option) can be used to display the existing aliases for one or more procedure names. | ||
<br/>When it processes ASSIGN, <var class="product">Model 204</var> ends any current User Language 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, ASSIGN is included in that update unit. For more information about <var class="product">Model 204</var> update units, see | <br/>When it processes ASSIGN, <var class="product">Model 204</var> ends any current User Language 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, ASSIGN is included in that update unit. For more information about <var class="product">Model 204</var> update units, see [[File integrity and recovery#Update units and transactions|Update units and transactions]].</p> | ||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 14:41, 6 February 2019
Summary
- Privileges
- User
- Function
- Assigns an alias for the name of a procedure
Syntax
ASSIGN procname,alias
Where:
procname | is the name or the alias of an existing Model 204 procedure. | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
alias | is the new alias to be added to the procedure definition (1 to 255 characters). The alias cannot begin with a minus sign or a zero. The alias can consist of any alphanumeric characters, but not the following punctuation and keyboard characters:
|
Syntax notes
A comma is required between procname and alias.
Example
ASSIGN EMPLOYEE, EMP
Usage notes
A procedure can have more than one name: an official name and any number of alternative names or aliases. You can specify an alias when you define the procedure (in the PROCEDURE command) or at a later time (in the ASSIGN command).
If a group contains multiple procedure files, then the ASSIGN command does not execute in group context. In this case, aliases must be assigned in file context.
After the ASSIGN command has been executed, the official name and all old aliases remain in effect. An alias remains in effect until it is deassigned with the DEASSIGN command.
Note:
The DISPLAY command (ALIAS option) can be used to display the existing aliases for one or more procedure names.
When it processes ASSIGN, Model 204 ends any current User Language update unit and begins a non-backoutable update unit. If a Model 204 command non-backoutable update unit is in progress, ASSIGN is included in that update unit. For more information about Model 204 update units, see Update units and transactions.