You can use the Fileshare Manager (fsmgr) to automate some of Fileshare's supervisor mode functions by writing a COBOL program to call it. The Fileshare Manager can be called to instruct a Fileshare server to:
The Fileshare Manager program (fsmgr) is called from a COBOL program as follows:
call "fsmgr" using parameter-block
|0||Function completed successfully|
|1||Communications error. A Fileshare server of the name specified in
fileshare-name could not be contacted on the network using the specified communications protocol. This error is also returned if a network
failure occurs during the execution of the function but after the initial connection was made.
Check that fileshare-name is specified correctly and that the Fileshare Handling Redirection module (FHRedir) is configured to use the correct communications protocol.
File error during initial connection.
To connect to Fileshare, the Fileshare Manager opens a file called fsmgr.ctl. This file should not already exist and the Fileshare Manager does not actually create it. If it does exist, this status is returned if there is a subsequent error in closing the file.
|3||Invalid password specified in
Ensure that Fileshare is running with a password file and that the contents of supervisor-password match the supervisor password entry in the password file. Note that Fileshare passwords are case sensitive.
See Supervisor Mode in the chapter Security for more information.
|4||Invalid value specified in function-code - must be within the range one to five|
|5||No Fileshare log file.
You have attempted to backup the log file on a Fileshare server that is running without a recovery log file.
|6||Function 2 or 3 could not complete.
While attempting to log off all Fileshare's clients (function 3), it is possible for other clients to log on before the logging off operation completes. For example, the Fileshare Manager has to send a "logoff client n" request four times if there are four clients logged on. If, however, a new client logs on before all four original clients have been logged off, the Fileshare Manager retries the "logoff client n" request in order to log off the new client. It retries 10 times and if new clients are still logging on, it returns error 6. A similar situation can occur during processing of a function 2 (close all data files) if new files are continuously being opened at the same time.