FORTRAN Reference Manual
Utility Routines
FORTRAN Reference Manual—528615-001
15-40
GETASSIGNVALUE Routine
Considerations
•
Values returned by GETASSIGNTEXT
•
If you do not name GETASSIGNTEXT in a GUARDIAN directive, you must enclose 
messagenumber in back slashes so that it will be passed by value.
Example
?GUARDIAN GETASSIGNTEXT
INTEGER error
CHARACTER *63 new name
error = GETASSIGNTEXT ('LOGICALNAME', new name, 2)
GETASSIGNVALUE Routine
The GETASSIGNVALUE routine retrieves a specified part of an ASSIGN message as 
an integer and assigns it to a numeric variable.
result
is an integer variable in which GETASSIGNVALUE returns the result of the 
operation. See Considerations on page 15-41.
portion
is a character expression that identifies the particular part of the message to 
retrieve. The string value must be the name of an ASSIGN message portion that 
has an integer value. The first unused character position in portion, if any, must 
be a blank. Any characters including and following a blank are ignored.
Return Value Meaning
≥0 A non-negative value (zero or a positive integer) indicates a string of 
that many characters, before truncation or padding, is returned to text. 
GETASSIGNTEXT returns zero if the file name is all blanks and you 
request TANDEMNAME.
-1 Indicates a failure due to a logic error. Nothing is returned in text. 
Possible logic errors are:
•
messagenumber is not a positive integer.
•
The specified message does not exist.
•
LOGICALNAME or TANDEMNAME does not identify the defined 
text part of an ASSIGN message, or identifies a portion that does 
not exist in the specified message.
result = GETASSIGNVALUE ( portion, val, messagenumber )










