DEFINE FILE command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 42: Line 42:
<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>An equal sign (<tt>=</tt>) in single quotes indicates that the location is the client node, that is, the file is local. </p>
<p>
<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</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>
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>In the following example, the <var>DEFINE PROCESS</var> command includes: </p>
<p class="code">DESTINATION=(PGRP1,BOSTON)
<p class="code">DESTINATION=(PGRP1,BOSTON)
Line 66: 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 74: 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 94: 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>
   
   

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.