Exit Program for Move Stream File (QHFMOVSF) API


  Required Parameter Group:

1 Operation (MOVSF) Input Char(5)
2 File system job handle Input Char(16)
3 Reserved Input Char(20)
4 Source file path name Input Char(*)
5 Source file path name length Input Binary(4)
6 Target file path name Input Char(*)
7 Target file path name length Input Binary(4)
8 File system names Input Char(20)

Before applications can use the Move Stream File (QHFMOVSF) API with your file system, you must:

  1. Write an exit program that performs the move stream file operation on behalf of the API. For a detailed description of the API and its calling parameters, see Move Stream File (QHFMOVSF) API.

  2. Give the exit program's name when you register the file system with the Register File System (QHFRGFS) API. In the registration-information parameter of the QHFRGFS API, indicate whether this exit program can be used for move operations involving two different file systems.

After that, when an application calls the QHFMOVSF API, the API calls your exit program and passes it the parameters specified by the application. Your exit program performs the work and returns any data to the API. The API passes the data back to the calling application.


Authorities and Locks

None.


Required Parameter Group

The API passes this information to your exit program:

Operation (MOVSF)
INPUT; CHAR(5)

The abbreviation for the operation being performed (MOVSF).

File system job handle
INPUT; CHAR(16)

The work area or job identifier for use by the file system.

Reserved
INPUT; CHAR(20)

Reserved for future use. This parameter is set to blanks.

Except as noted, the following parameters are the same as the parameters for the API.

Source file path name
INPUT; CHAR(*)

The API removes the file system name before passing the path name to the exit program.

Source file path name length
INPUT; BINARY(4)

Target file path name
INPUT; CHAR(*)

The API removes the file system name before passing the path name to the exit program.

Target file path name length
INPUT; BINARY(4)

File system names
INPUT; CHAR(20)

This is not an API parameter. The API derives this information from its source and target file path name parameters. The first 10 characters contain the name of the source file system, and the second 10 characters contain the name of the target file system.


API Functions

The QHFMOVSF API performs the standard functions described in Standard HFS API Functions.

When the source and target file systems are different, the API performs additional functions so that the file is moved by the most efficient means available. The processing steps are the same as those described for the Copy Stream File exit program in API Functions, with these exceptions:


Exit Program Requirements

You must create an exit program that performs the standard functions described in Standard HFS Exit Program Requirements and these additional functions:


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
CPF1F01 E Directory name not valid.
CPF1F02 E Directory not found.
CPF1F03 E New directory name same as old directory name.
CPF1F06 E Directory in use.
CPF1F07 E Authority not sufficient to access directory.
CPF1F08 E Damaged directory.
CPF1F21 E File name not valid.
CPF1F22 E File not found.
CPF1F24 E File name already exists.
CPF1F26 E File in use.
CPF1F27 E Authority not sufficient to access file.
CPF1F28 E Damaged file.
CPF1F29 E Use of reserved file name not allowed.
CPF1F41 E Severe error occurred while addressing parameter list.
CPF1F48 E Path name not valid.
CPF1F61 E No free space available on media.
CPF1F62 E Requested function failed.
CPF1F63 E Media is write protected.
CPF1F66 E Storage needed exceeds maximum limit for user profile &1.
CPF1F71 E Exception specific to file system occurred.
CPF1F73 E Not authorized to use command.
CPF1F74 E Not authorized to object.
CPF1F75 E Error occurred during start-job-session function.
CPF1F77 E Severe parameter error occurred on call to file system.
CPF1F88 E Unable to complete copy or move operation.

Note: You can use message CPF1F88 only when trying to perform cross-file-system move operations. If you use it when moving files within a single file system, an Internal file system error message is returned to the application. You can use the exit program's file-system-names parameter to determine whether the move is across file systems.

Because this message does not always indicate an error, the application calling the QHFMOVSF API does not receive it. It is used only to communicate between the file system's exit program and the API.


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