next up previous contents
Next: Prompt for Hexadecimal Up: Prompted Input Subprograms Previous: Prompt for Double

Prompt for Filename

This Subprogram will prompt for the Operator to supply a valid Filename. The file itself need not exist, but the correct syntax will be enforced. The specified Prompt will only be issued if the Operator has not anticipated the input request.

Short Name Calling Sequence

         STATUS = UIGTFI(PROMPT,FILNAM[,LENGTH,EXISTS])

Long Name Calling Sequence

         STATUS = UI_GET_FILENAME(...)

Input Arguments

         PROMPT (Character)     Prompt Text
         FILNAM (Character)     Default Filename

Output Arguments

         FILNAM (Character)     Response Filename
         LENGTH (Integer)       Filename Length (Optional)
         EXISTS (Logical)       File Exists Flag (Optional)

Function Value

UI__SUCCESS ) Success UISUCC )

UI__NOT_INITIALIZED ) Package not Initialized UININI )

UI__DEFAULTED ) Input Defaulted UIDFLT )

UI__TRUNCATED ) Input Filename UITRUN ) Truncated

UI__INPUT_ABORTED ) Input Aborted (Ctrl-Z) UIABRT )

UI__NO_INPUT ) No Input present UINOIN )

UI__END_OF_FILE ) End-of-File detected UIEOF ) in Batch Mode Note:

  1. The response filename must conform to the syntax for a file specification on the particular computer system. For VAX systems a Logical Name specification that translates to a filename is also acceptable.
  2. All text is converted to upper case unless it is in the form of a quoted text string, in which case the case as typed is maintained.
  3. The UI__TRUNCATED Function Value signifies that the filename was longer than the FILNAM Argument and that truncation has taken place.
  4. The LENGTH Argument is optional and, if present, will return the length (in characters) of the filename (ignoring trailing spaces or tabs) after truncation.
  5. The EXISTS Argument is optional and, if present, will indicate whether the file exists or not.
  6. The UI__DEFAULTED Function Value indicates that the User just accepted the default value (by typing RETURN only).
  7. The UI__INPUT_ABORTED Function Value indicates that the User typed Ctrl-Z to abort input. This is only implemented on a VAX/VMS system. It is an informational function value only, no error message will be reported.
  8. UI__NO_INPUT will only be returned in Asynchronous Mode (if both UI_INPUT_MODE and UI_GET_MODE have signified Asynchronous Input Mode) and indicates that the User has not yet specified any Input. The Application Program should poll by either calling this Subprogram repeatedly or by calling UI_TEST_INPUT repeatedly until this indicates that some Input has been received. In the latter case (UI_TEST_INPUT called) this Subprogram should be recalled in order to decode the input. UIPACK is setup by default such that this subprogram always acts synchronously unless a prior call to UI_GET_MODE has been made within the Application Program.
  9. The UI__END_OF_FILE Function Value indicates that an End-of-File was detected on the main Input Stream in Batch or non-interactive mode where Input is not taken from a terminal but rather from a file. It is a severe error and therefore causes an error to be reported (unless this has been inhibited by a prior call to UI_ERROR_LEVEL).
  10. If the Default filename does not conform to specifications the User will be forced to override the default and specify a valid filename.
  11. The Prompt string will only be issued if the response is not already present in the input line. Thus this subprogram may be used by itself to accept input values, as part of the general decoding of a Command Line to prompt for Parameters associated with the present Verb, or to prompt for and pickup the value associated with a Qualifier.
  12. The format of the Prompt is:-

    Prompt String [xxx]:
    

    where ``xxx" is the current default filename as specified by the FILNAM Argument on entry to this subprogram.



next up previous contents
Next: Prompt for Hexadecimal Up: Prompted Input Subprograms Previous: Prompt for Double



Liz Buckle
Fri Jan 13 17:33:22 CST 1995