SEARCHPATH
The SEARCHPATH instruction defines the set of file paths used during OPEN, PREP, and CHAIN. The set of directories may be modified and deleted. The instruction uses the following format:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
mode
Required. One of the valid modes from the table below.
path
Required. A previously defined Character String Variable or a string Literal that specifies or receives the search path information based upon the mode.
tcpip id:port
Optional. String literal data that contains the IP address
and port number of the server executing the Data Manager where the instruction is executed.
Flags Affected: EOS, OVER
Note the following:
The supported operations are:
ADD
Add a directory to the search path
GET
Retrieve the search path
REMOVE
Delete a directory from the search path
SET
Initialize the search path
The default set of paths is initialized to the PLB_PATH environment variable found string in the User Environment Table or in the PLBWIN.INI file. This instruction may modify the default set of paths.
The SET operation defines a complete set of directories searched. Any information that was previously defined is lost. Each directory must be separated by a semi-colon character (;). A semi-colon is automatically placed as the first character. If {path} is null, the directory set is cleared. Care must be taken as the original information retrieved from the PLB_PATH environment variable may be erased.
The ADD operation defines another directory that is added to the search path. The path string information is automatically separated from the previous pathing fields by the semi-colon character (;). If {path} is a Null String, nothing is done.
The REMOVE operation removes a directory from the path string. The directory removed must match exactly and is case sensitive.
The GET operation retrieves the current setting of the search path. Both the default search path defined by PLB_PATH and the additional path defined by the user program are returned.
The OVER flag is set if the internal buffer for maintaining the directory information would not hold all of the information placed in it. In that case, the directory information is not changed. It is also set if an attempt is made to remove a directory that is not present in the path string.
The EOS flag is set if there is not enough room to retrieve the entire search path information.
The SEARCHPATH instruction allows operations at the Sunbelt Data Manager when the DM_ALLOWPATH keyword is enabled in the Data Manager configuration file. If the keyword is not enabled, attempts to use the SEARCHPATH instruction at the Data Manager will result in an I82 subcode 33 error.
When the {tcpip id:port} address is provided as part of the {path} variable or literal, the instruction is executed at the server where the Data Manager is executing. In this case, the instruction logs on to the Data Manager, performs the operation, and logs off from the Data Manager for a GET action. However, when the SEARCHPATH ADD, REMOVE, or SET actions are executed successfully, the instruction does not log off from the Data Manager.
Warning: If a SEARCHPATH ADD, REMOVE, or SET action takes affect, the client program logs on to the SUNDM Data Manager and the connection to the SUNDM Data Manager remains connected indefinitely. This connection remains active until the program is terminated or until the 'SETMODE *DMKEEPACTIVE=0' instruction is executed. Please note that a CHAIN instruction does not cause this connection to be disconnected. See the GETMODE and SETMODE *DMKEEPACTIVE description for more information.
See Also: Example Code, PATH, System Interface Instructions
![]() |