Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)
196 Chapter 10
Technical Articles
CI Enhancements
endif
if word(FSYNTAX(a_file)) = "MPE" then
# MPE filename
elseif word(FSYNTAX(a_file)) = "POSIX" then
# POSIX filename
else
# error
if pos("WILD", FSYNTAX(another_file)) > 0 then
# wildcarded MPE or POSIX filename
XWORD
XWORD()—returns a string less 'word'. String function.
Syntax
XWORD(str[,delims][,nth][,end_var][,start])
This new function locates the nth word from str beginning at start,
delimited by one of the characters in delims, and places the index of the
delimiter that terminated the word in a CI variable named by the
end_var argument. It returns str minus the located word and minus the
word delimiter. It is syntactically equivalent to word(), but opposite in
semantics.
The arguments for xword() are identical to the word() parameters.
Please refer to word() for details. HELP word and HELP xword are
available.
xword() is useful for removing a token from a command line string
since the token and its delimiter are not returned.
The same examples used for the word() function in an earlier article are
repeated below for xword():
xword('file a=bb,old;rec=40,,f,ascii') returns:
'a=bb,old;rec=40,,f,ascii'
xword('file a=bb,old;rec=40,,f,ascii',,2) returns:
'file bb,old;rec=40,,f,ascii'
xword('file a=bb,old;rec=40,,f,ascii',";,",,j,8) returns:
'file a=old;rec=40,,f,ascii' and J=10
xword('file a=bb,old;rec=40,,f,ascii',,-4,j) returns:
'file a=bb,old;rec=,f,ascii' and J=18
It may be illustrative to execute the above examples substituting word
in place of xword(), or refer the word() examples referenced above.
Summary of CI Enhancements in C.55.03
• The LISTF and LISTFILE commands allow users to discover who is
accessing files on their system, including remote accessors.
LISTFILE output can now be filtered by selecting files based on
access type or file code.
• Two new CI variables were added: HPLASTSPID and HPSPOOLID.
Both contain the spoolfile ID in the form: Onnnnnnn.