Perform Miscellaneous File System Functions (QP0FPTOS) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Perform Miscellaneous File System Function (QP0FPTOS) API is used to perform a variety of file system functions. The first parameter defines the type of function that is requested. Other parameters are optional, depending on the selected function. The output from this API varies, based on the selected function. See the function descriptions for more details.


Authorities and Locks

To call this program you must have *SERVICE special authority, or be authorized to the Service Dump function of IBM® i through System i® Navigator's Application Administration support. The Change Function Usage (CHGFCNUSG) command or Change Function Usage Information (QSYCHFUI) API, with a function ID of QIBM_SERVICE_DUMP, also can be used to change the list of users allowed to perform dump operations.

Note: Adopted authority is not used.


Required Parameter Group

Required parameters vary according to the selected function. The selected function is identified by the first parameter on the call to the API.

Function Type
INPUT; CHAR(*)

The desired file system function to perform. Valid values follow:

(1) *DUMP
Creates a general file system dump in a spooled file with file name "QSYSPRT" and with "QP0FDUMP" in the User Data field. No other parameters are required or supported when *DUMP is specified.

(2) *DUMPALL
Creates a variety of file system dumps in a single spooled file with file name "QSYSPRT" and with "QP0FDUMP" in the User Data field. The following table describes the optional parameter when *DUMPALL is specified.


(3) *DUMPLFS
Creates a dump of logical file system data in a spooled file with file name "QSYSPRT" and with "QP0FDUMP" in the User Data field. The following table describes the optional parameter when *DUMPLFS is specified.


(4) *NFSFORCE
Sets various values and modes for the network file system. The following table describes the required parameters when *NFSFORCE is specified.


(5) *REBUILDDEVNULL
Attempts to create the /dev/null and dev/zero character special files. If an existing dev/null or dev/zero object exists that is not a character special file, then the object is renamed to /dev/null.prv or dev/zero.prv. If /dev/null.prv or /dev/zero.prv exists, then it it renamed to /dev/null.prv.001 or /dev/zero.prv.001, /dev/null.prv.002 or /dev/zero.prv.002, and so on, until a name is found for the object. If 999 is exceeded and the rename cannot be done, the object is not renamed and an informational message is issued and the QP0FPTOS program completes successfully. No other parameters are required or supported when *REBUILDDEVNULL is specified.

(6) *TRACE6ON or *TRACE6OFF
*TRACE6ON starts the logging of trace messages in the user job log for some network file system functions. *TRACE6OFF stops the logging of these messages.

(7) *TRACE8ON or *TRACE8OFF
*TRACE8ON starts the logging of trace messages to the QSYSOPR message queue for some network file system functions. *TRACE8OFF stops the logging of these messages.

(8) *TRACE9ON or *TRACE9OFF
*TRACE9ON starts the collection of some network file system statistics and resets the statistics. *TRACE9OFF stops the collection of these statistics.

(9) *DUMPNFSSTATS
Creates a file system dump of network file system (NFS) statistics (both client and server) in a spooled file with file name "QSYSPRT" and with "QP0FDUMP" in the User Data field. The information dumped comes from a window of time specified with the *TRACE9ON/OFF function. No other parameters are required or supported when *DUMPNFSSTATS is specified.

(10) *DUMPDIR
Creates a dump of the contents of a specified directory in a spooled file with the file name "QSYSPRT" and with "QP0FDUMP" in the User Data field. Each entry in the specified directory is printed in the current job CCSID and also in its hexadecimal Unicode representation. This representation can be used with the *RENAME function described below. Also, the presence and number of any problem characters in the entry is indicated. These are characters that might cause problems when attempting to use the entry name on various interfaces. The following characters are identified as problems: slash (/), backslash (\), tilde (~), asterisk (*), question mark (?), colon (:), single-quote or apostrophe ('), double-quote (") and blank ( ). Also, any characters that can not be represented in the current job CCSID are identified as problems. The following table describes the required and optional parameters when *DUMPDIR is specified.



(11) *RENAME
Rename a link in the current working directory. The following table describes the two required parameters when *RENAME is specified.

(12) *RENAMEPRB
Renames all objects in a specified directory or sub-tree that are affected by a specified "problem" as identified by the *DUMPDIR function. The link names are renamed such that the problem characters are changed to dashes (-). The activity of the function is recorded in a spool file. The following table describes the required parameter and two optional parameters when *RENAMEPRB is specified.

Function extension 1
INPUT; CHAR(*)

Function extension 1 is optional or required, based on the first parameter. Whenever it is valid, function extension 1 is described above along with a first parameter description. Function extension 1 is valid when the first parameter is listed below:

(1) *DUMPALL

(2) *DUMPLFS

(3) *NFSFORCE

(4) *DUMPDIR

(5) *RENAME

(6) *RENAMEPRB


Function extension 2
INPUT; CHAR(*)

Function extension 2 is optional or required, based on the first parameter. Whenever it is valid, function extension 2 is described above along with a first parameter description. Function extension 2 is valid when the first parameter is listed below:

(1) *NFSFORCE

(2) *DUMPDIR

(3) *RENAME

(4) *RENAMEPRB

Function extension 3
INPUT; CHAR(*)

Function extension 3 is optional or required, based on the first parameter. Whenever it is valid, function extension 3 is described above along with a first parameter description. Function extension 3 is valid when the first parameter is listed below:

(1) *RENAMEPRB<


Usage Notes

If this API is called without the first parameter that is required, then message CPFBC53 is issued to the caller. This message specifies a parameter that is not valid. To recover, the caller is pointed to the API documentation.


Error Messages



Examples

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.



API introduced: V5R2