Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)
Chapter 10 195
Technical Articles
CI Enhancements
CALC fqualify('a')
A.GROUP.ACCOUNT # when the CWD is your logon group or
/CWD/A # when the CWD is a directory
CALC fqualify('a.b')
A.B.ACCOUNT
CALC fqualify('a.b.c')
A.B.C
CALC fqualify('./a')
/ACCOUNT/GROUP/a
CALC fqualify('./A')
A.GROUP.ACCOUNT # when the CWD is your logon group or
/CWD/A # when the CWD is a directory
CALC fqualify('/a/b/c')
/a/b/c
CALC fqualify('*a')
*A
CALC fqualify('$null')
$NULL
CALC dirname(fqualify('./a'))
/ACCOUNT/GROUP # when the CWD is your logon group or
/CWD # when the CWD is a directory
FSYNTAX
FSYNTAX() returns the syntax of the passed filename argument. String
function.
Syntax
FSYNTAX(filename_str)
This new function accepts an MPE or POSIX style filename and
evaluates the filename's syntax, if wildcard characters are present,
lockwords, back reference to a file equation, remote environment IDs
and system defined files. If an error occurs the error number, following
the word "ERROR" is returned. Possible return values are:
• "MPE" "MPE;WILD" "MPE;LOCK" "MPE;FEQ" "MPE;$FILE"
"MPE;REMOTE" and combinations where appropriate, for example,
"MPE;LOCK,REMOTE"
• "POSIX" "POSIX;WILD"
• "ERROR=nnn" for syntax error nnn
Examples
fsyntax('a.b.c')
MPE
fsyntax('/a/b/c')
POSIX
fsyntax('./ab@/c')
POSIX;WILD
fsyntax('$null')
MPE;$FILE
fsyntax('a.b.c.d')
ERROR=426
if word(setvar(_error, FSYNTAX(myfile))) = "ERROR" then
echo Syntax error: ![word(_error,,-1)]