Re: OT - GETSYI (was:Re: PHONE error - Invalid specification of node or person. Try again.)



Richard Maher wrote:

So getting back to my original point, is everyone happy with the following
$getsyi item code descriptions from the current VMS docs?

SYI$_NODENAME
Returns, as a character string, the name of the [scsnode?,decnet?,galaxy?]
node in the buffer specified
in the item list.
Because this name can include up to 15 [why 15?] characters, the buffer
length field
in the item descriptor should specify 15 (bytes).
SYI$_SCSNODE
Returns the Galaxy instance name. [Does it really?] Supported only on
AlphaServer systems that
support partitioning. [My system doesn't support partitioning, I'm stuffed!]

Ah, the disadvantages of languages that don't support dynamic strings.

I guess I'm a bit spoiled. Not trusting anything, I usually trim spaces, nulls, and such from any such data I retrieve, placing the result in a dynamic string. A simple built-in function in BASIC.

From the doc:

    nodename

       OpenVMS usage:process_name
       type:         character-coded text string
       access:       read only
       mechanism:    by 32- or 64-bit descriptor-fixed-length string
                     descriptor (Alpha)
       mechanism:    by 32-bit descriptor-fixed-length string descriptor
                     (VAX)
       Name of the node about which $GETSYI is to return information.
       The nodename argument is the 32-bit address (on VAX systems)
       or the 32- or 64-bit address (on Alpha systems) of a character
       string descriptor pointing to this name string.

There doesn't seem to be any limits, min or max, on the fixed length string. The system service doesn't return a byte count of what it actually placed into the buffer. If there is an overrun, I'm assuming the data is truncated. (Better be!) Since it's a fixed length string, you cannot get the length from the descriptor. I'm guessing that proper operation should fill with blanks, a printable character. Filling with nulls would, in my opinion, be inappropriate. It appears the docs do not specify what any fill characters are. No, I'm not happy with that lack in the docs.

--
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      Fax: 724-529-0596
DFE Ultralights, Inc.              E-Mail: davef@xxxxxxxxxxxxx
170 Grimplin Road
Vanderbilt, PA  15486
.



Relevant Pages

  • Re: Soft-hyphens or breakable points in a string
    ... I specify a table width of 100%, but otherwise no cell dimensions are specified. ... An E-mail address is basically an unbreakable string that must not contain whitespace. ... URL or E-mail address needs to be broken, the break should appear "between elements, after a colon, a slash, a double slash, or the symbol @ but before a period or any other punctuation or symbols". ... If you enter a soft hyphen character, MS Word treats it as yet another graphic character and displayes it in all occasions. ...
    (comp.infosystems.www.authoring.html)
  • Re: Question about Descriptors
    ... > manually differentiate between allocated and used values in a descriptor, ... Even null terminated strings are not ... anticipate the possibility that a string length may not be valid ... or a string terminated with a specific character or trailing ...
    (comp.os.vms)
  • Re: Which is better - a char type or a string of length one?
    ... data type but its strings have a terminating zero so C has to ... string of one character needs at least two cells. ... If you just specify a string type, you would need runtime checks to ...
    (comp.lang.misc)
  • Re: sed issue
    ... the log file, it truncates the file after the first line, and I have been ... unable to get it to read past the last character of the first line. ... This seems to be the only instance of the problematic string, but it is in every one of the expect log output files. ... You can also try to specify ...
    (comp.unix.shell)
  • Re: CLisp case sensitivity
    ... You have to specify an external format, ... with (string (code-char #x10000)). ... > character Allegro yet it will return 1 in CLISP and SBCL. ... Cats meow out of angst "Thumbs! ...
    (comp.lang.lisp)