In this section: |
The FOCUS Database Server can issue error messages. In addition, you can query the server to generate a list of users on the server.
If the server encounters a problem in processing your FOCUS request, it sends you an error message. The most common problem is that the server is not active. This can happen because:
When you send a request or transaction to a server that is not operating, you receive one of the following error messages:
If the server is shut down normally while you are in the middle of executing a MODIFY or Maintain request, all your transactions are written to the database. If the server stops abnormally, some of your last transactions may be lost (to minimize these losses, see Protecting FOCUS Database Server Transactions).
If you use an alternate Master File on the server and the READ keyword is not included in the USE list, the following error message is issued:
(FOC896) READ OPTION REQUIRED ON USE STATEMENT WITH AS AND ON OPTIONS
How to: |
You can see who is logged on to a FOCUS Database Server and the ddnames of the databases they are using.
Issue the following command at the FOCUS command level:
? SU ddname
where:
Is the ddname you allocated to the communication data set for the FOCUS Database Server. This is a convenient way for SU administrators to monitor user activities.
Assume user WIBMLH allocated the communication data set for a FOCUS Database Server to ddname SYNCA. To query active users on the server, the user issues the following query command from TSO ID WIBMLH:
? SU SYNCA
If there are active users on the server, the output will be similar to the following:
USERID FILEID QUEUE WIBMLH EMPLOYEE WIBJBP CAR
This output shows that WIBMLH made the request and that user ID WIBJBP is now using the CAR database on that server. If there were no database users on the server, FOCUS would return the following message:
There Are No Users Connected to Server SYNCA
If SYNCA is not operating, one of the error messages described in Error Messages would display.
You can use the ? SU query to test the return code variable &RETCODE in FOCEXEC procedures. When ? SU is executed, the query results determine the value stored in &RETCODE. Query results and their corresponding values are:
Query Result |
&RETCODE Value |
---|---|
Users are active on the server. |
0 |
No users are active on the server. |
8 |
The server is not running. |
16 |
You can later test the &RETCODE value in a -IF command. For example, this procedure tests whether the server is available before starting a MODIFY or Maintain procedure:
? SU ddname -RUN -IF &RETCODE EQ 16 GOTO BAD; -INCLUDE myproc -BAD -EXIT
where:
Is the ddname allocated to the communication data set of the FOCUS Database server.
Is the name of your MODIFY or Maintain procedure.
If the value of &RETCODE is 0 or 8, the specified MODIFY or Maintain procedure will be executed.
Information Builders |