Start of change

SAVE_FILE_OBJECTS view

The SAVE_FILE_OBJECTS view returns information about the objects in a save file. Information about Integrated File System objects is not returned.

The SAVE_FILE_OBJECTS table function can be used to return detailed information about database file (*FILE) members and output queue (*OUTQ) spooled files that were saved.

The information returned is similar to the detail available through the Display Save File (DSPSAVF) CL command and the List Save File (QSRLSAVF) API.

Authorization: The caller must have:
  • *USE authority to the library containing the save file, and
  • *USE authority to the save file.

The following table describes the columns in the view. The system name is SAVF_OBJ. The schema is QSYS2.

Table 1. SAVE_FILE_OBJECTS view
Column Name System Column Name Data Type Description
SAVE_FILE_LIBRARY SAVF_LIB VARCHAR(10) Name of the library that contains the save file.
SAVE_FILE SAVF VARCHAR(10) Name of the save file.
LIBRARY_NAME LIBNAME VARCHAR(10) The name of the library from which the object was saved.
OBJECT_NAME NAME VARCHAR(10) The name of the saved object. Contains the system name for a DLO object.
OBJECT_TYPE OBJ_TYPE VARCHAR(7) The type of object.
OBJECT_ATTRIBUTE OBJ_ATTR VARCHAR(10)
Nullable
Extended information about the object type.

Contains the null value if there is no object attribute.

TEXT_DESCRIPTION TEXT VARCHAR(50)
Nullable
The text description of the object.

Contains the null value if there is no text description.

SAVE_TIMESTAMP SAVED TIMESTAMP(0) The date and time at which the object was saved.
OBJECT_SIZE OBJ_SIZE BIGINT The size of the object, in bytes. This value will be a rounded value for an object larger than 999,999,999 bytes.
DATA_SAVED DATA VARCHAR(3) Whether the data for this object was saved with the object.
NO
The data was not saved. The object's storage was freed by a previous save command before this save operation.
YES
The data was saved. The object's storage was not freed by a previous save command before this save operation.
OBJECT_OWNER OBJ_OWNER VARCHAR(10) The owner of the object.
DLO_NAME DLO_NAME VARCHAR(20)
Nullable
The name of the document, folder, or mail object that was saved.

Contains the null value if there is no document library object.

FOLDER_PATH FOLDER VARCHAR(63)
Nullable
The name of the folder that was saved.

Contains the null value if this is not a *FLR or *DOC object, or if there is no folder path.

IASP_NUMBER IASPNUMBER INTEGER The auxiliary storage pool (ASP) of the library when the object was saved.
IASP_NAME IASP_NAME VARCHAR(10) The name of the independent auxiliary storage pool (ASP) device of the library when the object was saved.

Example

  • Find all the save files used to save any *FILE objects with names that begin with 'CUST'. Since this can be a long-running query, submit it as a batch job. The RUNSQL CL command is used to run the SQL statement and return the results in a table in MYLIB.
    SBMJOB CMD(RUNSQL
    SQL('CREATE TABLE MYLIB.SAVF_CUST AS (
         SELECT SAVE_FILE_LIBRARY, SAVE_FILE, LIBRARY_NAME, OBJECT_NAME, SAVE_TIMESTAMP 
            FROM QSYS2.SAVE_FILE_OBJECTS 
            WHERE OBJECT_NAME LIKE ''CUST%'') WITH DATA') 
    COMMIT(*NONE)) JOB(SAVFLIST)
End of change