bpi.form.openpath()
This subroutine is provided to allow cross-platform (unidata/uniVerse/etc) open path capability. Unidata does not have the rich OPENPATH directive. So, this subroutine, which can be used on all MultiValue hosts and allows for coding in a cross-platform way.
Subroutine Syntax
CALL bpi.form.openpath( path, prefix, remove, handle, verbose, status, message)
Parameters
Param |
Direction |
Description |
path |
passed |
full path to directory or file to open |
prefix |
passed |
On unidata, prefix text to use when establishing a temporary VOC pointer to access path (required for UniData) |
remove |
passed |
On uniData, if @TRUE then the temporary VOC pointer is removed after the open directive succeeds or fails |
handle |
returned |
A handle to the opened file (if open is successful) |
verbose |
passed |
level of verbosity |
status |
returned |
@FALSE if successful open, otherwise integer indicating error |
message |
returned |
error message if open fails, otherwise return from unix file command |
Example
path= "/path/to/my/directory"
bpi.form.openpath( path, "", @TRUE, hdl.path, 1, status, message)
IF (status) THEN
CRT \There was an error when opening \: path
END ELSE
CRT \successfully opened \:path
END