1 | Request type | Input | Char(10) |
2 | Error code | I/O | Char(*) |
The Control Office Services (QOCCTLOF) API makes requests of the office services. Office services accepts the following actions:
An office services block is defined as a time during an application that the application knows that it will be using more office commands. By starting an office services block, the application is informing office that it will do several office tasks. The application will also inform office when to close the office files, destroy the working spaces, and so forth. It closes the files by ending an office services block. The application uses the QOCCTLOF to start and end an office services block.
For example, assume you have a program that issues 10 calendar CL commands. Each CL command must open office files and create work spaces that it needs before processing the request. The CL command must then close the office files that were opened and destroy the work spaces created before exiting. In this case, the files would be opened and closed and the work spaces created and destroyed 10 times, once for each CL command. With the QOCCTLOF API, you can improve the performance of this program by starting an office services block at the beginning of the program, issuing the CL commands and then ending the office services block. This enables the files to be opened and closed and the work spaces to be created and destroyed only once.
With the QOCCTLOF API, you can improve the performance of this program as follows:
All calendar CL commands can make use of this API.
None.
The request that the application makes of the office services. The following are the possible values:
*START | Start an office services block. An office services block is the time during the running of an application when more office commands will be used. Office services leaves the job in such a state as to maximize the performance of subsequent office services use. This includes leaving the office files open and leaving working spaces created and already initialized. It is the responsibility of the application to end the office services block. |
*END | End an office services block. No further office services will be used. The files will be closed and all working spaces deleted. |
*CHECK | Determine if an office services block is active. An error will be returned if an office services block has not been previously started or has already ended. |
The structure in which to return error information. For the format of the structure, see Error Code Parameter.
Message ID | Error Message Text |
---|---|
CPF3C90 E | Literal value cannot be changed. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
OFCFD01 E | Office services session is already active. |
OFCFD02 E | Office services session request failed. |
OFCFD03 E | Office services session is not active. |
OFCFD04 E | Office services session request is not correct. |
OFCFD05 E | Number of bytes provided for the error code is not correct. |
Top | Office APIs | APIs by category |