HSI Reference Manual Chapter 4: HSI Responses

For every request there is a response from HSI. HSI is used primarily as an interactive system with one response for each request entered. The response is either normal, which indicates successful completion of a request, or it is an error response, which includes some reason for the failure.

The basic format of a normal response is

For commands that display output (LS, SET), the presence of the response itself denotes that the request was successful. For other requests that have been successfully executed, the action that was taken is stated and, if a path was involved, it is included in the response. The complete path is displayed, even if a working directory was used in the actual request. If the request involved a file transfer, the name of the localfile, the number of bytes transferred (in decimal) and such information as the transfer rate, are also given with the response.

Error conditions may be detected by HSI as the request is interpreted and executed. The basic format of an error response is

where

***HSI is the standard prefix for all HSI error messages. Depending on the error, a pathname may or may not be included.

localfile, as interpreted by HPSS, could be present for error responses involving file transfers. A colon (:) separates the local filename (localfile from the HPSS path (hpsspath) in the response.

text is an explanation of the error and may contain relevant information from your input. Very long user input text may be shortened, and some of the text may be replaced with "...".

Appendix A: HSI Return Codes contains HSI exit codes and an explanation for each one.


4.1 Handling Error Responses

When you work with HSI interactively or when you run a script that must handle responses from HPSS, you should be aware of some of the characteristics of error responses. One of these is shown with an example in the following paragraph:

Ellipsis (...) in an Error Response

An ellipsis (...) in an error response indicates that long user input has been shortened, as shown in the following example.


4.2 Response Handling for UNIX-Based Systems

The last response from HSI on UNIX systems provides an "exit status" whose use is oriented toward shell script programmers and internal systems usage by utilities. This status is the translation of the HSI return code into an exit code (a zero exit code if the request was successful) and is used by the HSI utility on your computer to provide a locally meaningful return status for the HSI request.

If a one-liner contains only one request, the response from HSI contains the exit code equivalent of the HSI return code for that request, so that you can use your local operating system's commands and utilities to react appropriately to the exit status. For example, a shell script could test the status on a UNIX system to determine the course of action after a HSI request.

For an interactive session or a one-liner containing multiple requests, the exit code in the last HSI response is the highest exit code that was generated by any of the requests. Documentation for your system provides more information on the values and usage of these exit codes.

All output on UNIX-based systems is written to standard error (STDERR) or the current "OUT" file. In addition, if a LOG file is active, a time-stamped history of commands and responses is written.

Return to Table of Contents

Go to Chapter 5