Using NS3000/iX Network Services (36920-90008)

56 Chapter 3
Remote File Access
FPARSC Intrinsic
vectors (output) Array of 16-bit integers, by reference. Gives offset and
length information that indicates the parse of the file
string. Each element of the array is a 16-bit integer;
each pair of elements corresponds to a portion of the
string, in the same order as the items in the items array.
The first 16-bit integer of each pair is the byte offset of
the item (from the start of the string to the start of the
item), and the second 16-bit integer is the item’s length
in bytes. A zero value (in both 16-bit integers) means
that the item is not present in the file string.
For the last element of the vectors array, which
corresponds to item code 0 in the items array, the second
16-bit integer is the total length of the file string. The
first 16-bit integer of this element is zero unless the
result parameter indicates that the file is a system
file; in that case the value is the file’s default designator
type as defined for the FOPEN foptions parameter
0 = non-system filename
1 = $STDLIST
2 = $NEWPASS
3 = $OLDPASS
4 = $STDIN
5 = $STDINX
6 = $NULL
In case of a syntax error in the file designator string, the
first word of the first 16 bits of the vectors array returns
the byte offset of the invalid item in the string. The
second 16 bits will be zero.
Description
The FPARSE intrinsic parses a file designator and indicates whether or
not the string is syntactically correct. You can employ this intrinsic to
check a formal designator representing a remote file before attempting
to open the file via FOPEN. The optional items and vectors arrays enable
you to acquire parsing information for the file designator, namely, the
length of each item and its position in the string. The possible items are
file name, lockword, group name, account name, and environment ID.
The environment ID is treated as a single item; it is not parsed into
environment name, domain, and organization.
Following are examples of the items (input) and vectors (output) arrays.
Remember that the order of entries in the vectors array corresponds to
the (arbitrary) order of items in the items array. Also, the last pair of
entries of the vectors array has a different meaning from that of the
other pairs: the second 16 bits gives the total length of the file string,
and the first 16 bits gives a system file code when applicable.
In the first example the file string is:
FILENAME/LOCKWORD.GROUP.ACCOUNT:CASH.ACCTNG.FINANCE.