DEFINE FILE command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
 
(9 intermediate revisions by 3 users not shown)
Line 4: Line 4:
<dd>System manager, User 0
<dd>System manager, User 0
<dt>Function
<dt>Function
<dd>Defines a file synonym, a symbolic name for referencing a Parallel Query Option/204 remote file
<dd>Defines a file synonym, a symbolic name for referencing a [[PQO:_Overview_of_Parallel_Query_Option/204|Parallel Query Option/204]] [[Files,_groups,_and_reference_context#Remote_files|remote file]]
</dl>
</dl>
==Syntax==
==Syntax==
<p class="syntax">DEFINE FILE name [LIKE previousname] WITH SCOPE=SYSTEM  
<p class="syntax">DEFINE FILE <span class="term">name</span> [LIKE <span class="term">previousname</span>] WITH SCOPE=SYSTEM  
   FILENAME=actualfilename  
   FILENAME=<span class="term">actualfilename</span>
   LOCATION={locationname |'='}
   LOCATION={<span class="term">locationname</span> |'='}
</p>
</p>
   
   
Line 15: Line 16:
<ul>  
<ul>  
<li>
<li>
<p>name is required and is the symbolic name (file synonym) assigned to the file. The name must be from one to eight characters in length. If name is already in use as a file synonym for this copy of <var class="product">Model&nbsp;204</var>, DEFINE FILE name gives<var> name</var> a new definition.</p>
<p><var class="term">name</var> is required and is the symbolic name (file synonym) assigned to the file. The name must be from one to eight characters in length. If the name is already in use as a file synonym for this copy of <var class="product">Model&nbsp;204</var>, <code>DEFINE FILE <i>name</i></code> gives <var class="term">name</var> a new definition.</p>
<p>
For additional details about file name requirements, see the [[Creating a file#filename|CREATE FILE syntax]] discussion. </p>
</li>
</li>
   
   
<li>
<li>
<p><var>LIKE</var> is optional and gives the file synonym currently being defined the attributes of the file referred to by previousname, where previousname is a symbolic name that was previously defined. </p>
<p><var>LIKE</var> is optional and gives the file synonym currently being defined the attributes of the file referred to by <var class="term">previousname</var>, where <var class="term">previousname</var> is a symbolic name that was previously defined. </p>
<p> If used, <var>LIKE previousname</var> assigns an additional file synonym, and the FILENAME and LOCATION parameters are not required.</p>
<p>
If used, <code>LIKE <i>previousname</i></code> assigns an additional file synonym, and the <var>FILENAME</var> and <var>LOCATION</var> parameters are not required.</p>
</li>
</li>
   
   
Line 28: Line 32:
   
   
<li>
<li>
<p>A <var>FILENAME</var> setting is required, if <var>LIKE previousname</var> is not specified in the definition. actualfilename is the file's name as specified in a <var class="product">Model&nbsp;204</var> CREATE FILE command on the INE node to which the file belongs. </p>
<p>A <var>FILENAME</var> setting is required, if <code>LIKE <i>previousname</i></code> is not specified in the definition. <var class="term">actualfilename</var> is the file's name as specified in a <var class="product">Model&nbsp;204</var> <var>CREATE FILE</var> command on the INE node to which the file belongs. </p>
</li>
</li>
   
   
<li>
<li>
<p><var>LOCATION</var> is required, if <var>LIKE previousname</var> is not specified in the definition. locationname refers to the location of the remote node on which the actual file resides. </p>
<p><var>LOCATION</var> is required, if <code>LIKE <i>previousname</i></code> is not specified in the definition. <var class="term">locationname</var> refers to the location of the remote node on which the actual file resides. </p>
</li>
</li>
   
   
<li>
<li>
<p>An equal sign (=) in single quotes indicates that the location is the client node, that is, the file is local. </p>
<p>An equal sign (<tt>=</tt>) in single quotes indicates that the location is the client node, that is, the file is local. </p>
<p>The location name also might be required to match a value that is specified in the DESTINATION parameter of a local (client) DEFINE PROCESS command. If the DESTINATION name is specified in processgroup-symbolic name format, locationname must match a specified symbolic name. </p>
<p>
<p>In the following example, the DEFINE PROCESS command includes: </p>
The location name also might be required to match a value that is specified in the <var>DESTINATION</var> parameter of a local (client) <var>[[DEFINE_PROCESS_command:_Overview_of_intersystem_network_process|DEFINE PROCESS]]</var> command. If the <var>DESTINATION</var> name is specified in processgroup-symbolic name format, <var class="term">locationname</var> must match a specified symbolic name. </p>
<p>In the following example, the <var>DEFINE PROCESS</var> command includes: </p>
<p class="code">DESTINATION=(PGRP1,BOSTON)
<p class="code">DESTINATION=(PGRP1,BOSTON)
</p>
</p>
<p>The system manager then defines a synonym for a remote file by specifying the following location name in a file definition:</p>
<p>
The system manager then defines a synonym for a remote file by specifying the following location name in a file definition:</p>
<p class="code">LOCATION=BOSTON  
<p class="code">LOCATION=BOSTON  
</p>
</p>
</li>
</li>
</ul>
</ul>
 
==Example==
==Example==
In the following example, DEFINE FILE specifies the synonym CARS for the file VEHICLES:  
In the following example, <var>DEFINE FILE</var> specifies the synonym <code>CARS</code> for the file VEHICLES:  
<p class="code">DEFINE FILE CARS WITH -
<p class="code">DEFINE FILE CARS WITH -
   SCOPE=SYSTEM -
   SCOPE=SYSTEM -
   FILENAME=VEHICLES -
   FILENAME=VEHICLES -
   LOCATION=BOSTON
   LOCATION=BOSTON
</p>
</p>
==Usage notes==
==Usage notes==
<p>Useful only for PQO users, the DEFINE FILE command maps a file synonym defined by a local user against the actual name of a local or remote file, using the location where the file resides. Once the DEFINE FILE command has been issued, local users can refer to the file using the synonym name. </p>
<p>Useful only for PQO users, the DEFINE FILE command maps a file synonym defined by a local user against the actual name of a local or remote file, using the location where the file resides. Once the DEFINE FILE command has been issued, local users can refer to the file using the synonym name. </p>
Line 58: Line 66:
<ul>  
<ul>  
<li>
<li>
<p>In the CCAIN User 0 stream of the client copy of <var class="product">Model&nbsp;204</var></p>
<p>In the [[Defining_the_runtime_environment_(CCAIN)|CCAIN]] User 0 stream of the client copy of <var class="product">Model&nbsp;204</var></p>
</li>
</li>
   
   
Line 66: Line 74:
   
   
<li>
<li>
<p>In a User Language procedure (with the necessary privileges) </p>
<p>In a User Language [[Procedures|procedure]] (with the necessary privileges) </p>
</li>
</li>
  </ul>
  </ul>
Line 86: Line 94:
   
   
<li>
<li>
<p>Issue a new CREATE GROUP command.</p>
<p>Issue a new <var>[[CREATE_command:_Permanent_group|CREATE GROUP]]</var> command.</p>
</li>
</li>
   
   
Line 92: Line 100:
<p>Open the group again.</p>
<p>Open the group again.</p>
</li>
</li>
</ol>
</ol>
 
==See also==
<p>For general syntax and usage notes that apply to all forms of the <var>DEFINE</var> command, see <var>[[DEFINE command]]</var>.</p>
 
[[Category: System manager commands]]
[[Category: System manager commands]]
[[Category:Commands]]
[[Category:Commands]]

Latest revision as of 13:07, 12 February 2019

Summary

Privileges
System manager, User 0
Function
Defines a file synonym, a symbolic name for referencing a Parallel Query Option/204 remote file

Syntax

DEFINE FILE name [LIKE previousname] WITH SCOPE=SYSTEM FILENAME=actualfilename LOCATION={locationname |'='}

Where:

  • name is required and is the symbolic name (file synonym) assigned to the file. The name must be from one to eight characters in length. If the name is already in use as a file synonym for this copy of Model 204, DEFINE FILE name gives name a new definition.

    For additional details about file name requirements, see the CREATE FILE syntax discussion.

  • LIKE is optional and gives the file synonym currently being defined the attributes of the file referred to by previousname, where previousname is a symbolic name that was previously defined.

    If used, LIKE previousname assigns an additional file synonym, and the FILENAME and LOCATION parameters are not required.

  • SCOPE=SYSTEM is required and indicates that this definition is available to all users of this copy of Model 204 for the entire length of the run.

  • A FILENAME setting is required, if LIKE previousname is not specified in the definition. actualfilename is the file's name as specified in a Model 204 CREATE FILE command on the INE node to which the file belongs.

  • LOCATION is required, if LIKE previousname is not specified in the definition. locationname refers to the location of the remote node on which the actual file resides.

  • An equal sign (=) in single quotes indicates that the location is the client node, that is, the file is local.

    The location name also might be required to match a value that is specified in the DESTINATION parameter of a local (client) DEFINE PROCESS command. If the DESTINATION name is specified in processgroup-symbolic name format, locationname must match a specified symbolic name.

    In the following example, the DEFINE PROCESS command includes:

    DESTINATION=(PGRP1,BOSTON)

    The system manager then defines a synonym for a remote file by specifying the following location name in a file definition:

    LOCATION=BOSTON

Example

In the following example, DEFINE FILE specifies the synonym CARS for the file VEHICLES:

DEFINE FILE CARS WITH - SCOPE=SYSTEM - FILENAME=VEHICLES - LOCATION=BOSTON

Usage notes

Useful only for PQO users, the DEFINE FILE command maps a file synonym defined by a local user against the actual name of a local or remote file, using the location where the file resides. Once the DEFINE FILE command has been issued, local users can refer to the file using the synonym name.

Issue the DEFINE FILE command in any of the following ways:

  • In the CCAIN User 0 stream of the client copy of Model 204

  • At the user terminal (with the necessary privileges)

  • In a User Language procedure (with the necessary privileges)

You can use DEFINE FILE to define multiple synonyms for the same file, and reissue DEFINE FILE with the same name in the same Online or batch run. However, you cannot use multiple synonyms for the same file in a group or subsystem definition.

Because Model 204 maps file synonyms when the first user opens a permanent or temporary group, changes to file synonyms have no effect on permanent groups previously opened in the run or temporary groups previously opened in the session.

To redefine a file synonym for a member of an already open group, follow these steps:

  1. Issue a new DEFINE FILE command.

  2. Close the group.

  3. Delete the group.

  4. Issue a new CREATE GROUP command.

  5. Open the group again.

See also

For general syntax and usage notes that apply to all forms of the DEFINE command, see DEFINE command.