FORTRAN Reference Manual

Utility Routines
FORTRAN Reference Manual528615-001
15-39
GETASSIGNTEXT Routine
GETASSIGNTEXT Routine
The GETASSIGNTEXT routine retrieves a specified part of an ASSIGN message as
text and assigns it to a string variable. The assignment is done according to the
FORTRAN rules for a CHARACTER variable assignment.
result
is an integer variable in which GETASSIGNTEXT returns the result of the
operation. See Considerations on page 15-40.
portion
is a character expression with a value of 'LOGICALNAME', 'TANDEMNAME' or
'*ALL*' that specifies the part of the ASSIGN message to retrieve. The first unused
character position of portion, if any, must be a blank. Any characters including
and following a blank are ignored.
You can specify '*ALL*' to retrieve the entire ASSIGN message.
text
is a character variable into which the retrieved message text is placed.
If the value of portion is 'LOGICALNAME', the text contains the program unit
name and the logical file name, formatted as “programunit.filename”, and can have
a maximum of 63 characters. If the logical name part does not include the program
unit name component, the text is just “filename”.
If the value of portion is 'TANDEMNAME', the text is the HP file name and can
have a maximum of 34 characters. The name can be all blanks.
If the value of portion is '*ALL*', the text contains the entire ASSIGN message.
The maximum length of text in this case is 108 characters. Note that text can
be a RECORD name, which FORTRAN treats as a character variable with a length
equal to the sum of the length of its components.
messagenumber
is an integer constant, variable, or expression that identifies the specific ASSIGN
message from which to retrieve text. messagenumber must be a positive integer.
result = GETASSIGNTEXT ( portion, text, messagenumber )