Start Job Session Exit Program


  Required Parameter Group:

1 Operation (INIT) Input Char(5)
2 File system job handle Output Char(16)
3 File system name Input Char(10)

Before applications can use the HFS APIs with your file system, you must supply a Start Job Session exit program for the file system.

The Start Job Session exit program controls access to the file system as a whole for each job in which that file system is used. The first time an application refers to a specific file system within a job by calling any HFS API, the HFS API performs these operations before performing its own function:

  1. Checks the application's authority to the Start Job Session exit program. Authority to the Start Job Session exit program provides authority to all other exit programs that are registered for use with the file system.
  2. Locks the Start Job Session exit program in shared read (*SHRRD) mode to keep the file system from being deregistered while in use.
  3. Calls the Start Job Session exit program. The Start Job Session exit program sets up a 16-byte area called a job handle for the file system to use during the job, and returns the job handle to the HFS API. The file system can use the job handle to store a pointer to a separate work area or as a work area in itself.

Authorities and Locks

None.


Required Parameter Group

The following shows the input parameters that the API passes to your exit program and the output parameter that the exit program must pass back to the API:

Operation (INIT )
INPUT; CHAR(5)

The abbreviation for the operation being performed (the letters INIT, for initialize, followed by a blank).

File system job handle
OUTPUT; CHAR(16)

The work area or job handle for use by the file system. The file system returns the job handle to HFS on the Start Job Session. On all subsequent API calls, HFS returns the job handle to the file system.

The file system can keep whatever you choose in the job handle. For example, the job handle might contain a pointer giving the address of another work area or a control block used by the file system.

File system name
INPUT; CHAR(10)

The name of the file system received from the application in the call to the HFS API. This parameter specifies which name the file system should use when it issues exceptions.


Error Messages for Exit Program Use

This section lists the messages that the exit program can return to the API.

Message ID Error Message Text
CPF1F75 E Error occurred during start-job-session function.


Exit Program Introduced: V2R1
Top | Hierarchical File System APIs | APIs by category