
SAVE_FILE_OBJECTS table function
The SAVE_FILE_OBJECTS table function returns information about the objects in a save file. Information about integrated file system objects is not returned.
The information returned is similar to the detail available through the Display Save File (DSPSAVF) CL command and the List Save File (QSRLSAVF) API.
- *USE authority to the library containing the save file, and
- *USE authority to the save file.
- save-file
- A character or graphic string expression that identifies the name of the save file containing the objects.
- save-file-library
- A character or graphic string expression that identifies the name of the library that contains
save-file.The string can contain the following special values:
- *CURLIB
- The current library is used.
- *LIBL
- The library list is used. This is the default.
- object-name-filter
- A character or graphic string expression that identifies the object name to be returned. The
name can be a generic name.The string can contain the following special value:
- *ALL
- All objects are returned.
If this parameter is not specified, information for all objects is returned.
- object-type-filter
- A character or graphic string expression that contains a system object type for the objects to
be returned.The string can contain the following special value:
- *ALL
- All object types are returned.
If this parameter is not specified, information for all object types is returned.
- detailed-info
- A character or graphic string expression that indicates the type of information to be returned.
- NONE
- Only information about the object is returned. This is the default.
- FILE
- Additional information is returned for *FILE objects. For every file, one row is returned for each member.
- OUTQ
- Additional information is returned for *OUTQ objects. For every output queue, one row is returned for each spooled file.
- ALL
- Additional information is returned for *FILE and *OUTQ objects.
- ignore-errors
- A character or graphic string expression that identifies what to do when an error is encountered.
The result of the function is a table containing multiple rows with the format shown in the following table. All the columns are nullable.
Column Name | Data Type | Description |
---|---|---|
SAVE_FILE_LIBRARY | VARCHAR(10) | Name of the library that contains the save file. |
SAVE_FILE | VARCHAR(10) | Name of the save file. |
LIBRARY_NAME | VARCHAR(10) | The name of the library from which the object was saved. |
OBJECT_NAME | VARCHAR(10) | The name of the saved object. Contains the system name for a DLO object. |
OBJECT_TYPE | VARCHAR(7) | The type of object. |
OBJECT_ATTRIBUTE | VARCHAR(10) | Extended information about the object type. Contains the null value if there is no object attribute. |
TEXT_DESCRIPTION | VARCHAR(50) | The text description of the object. Contains the null value if there is no text description. |
SAVE_TIMESTAMP | TIMESTAMP(0) | The date and time at which the object was saved. |
OBJECT_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 | VARCHAR(3) | Whether the data for this object was saved with the object.
|
OBJECT_OWNER | VARCHAR(10) | The owner of the object. |
DLO_NAME | VARCHAR(20) | 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 | VARCHAR(63) | 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 | INTEGER | The auxiliary storage pool (ASP) of the library when the object was saved. 1 indicates the system ASP. |
IASP_NAME | VARCHAR(10) | The name of the independent auxiliary storage pool (ASP) device of the library when the object was saved. |
Member information | ||
MEMBERS | INTEGER | The number of members saved for the file. Contains the null value if DETAILED_INFO is NO or OUTQ or if OBJECT_TYPE is not *FILE. |
MEMBER_NAME | VARCHAR(10) | The name of the file member that was saved. Contains the null value if DETAILED_INFO is NO or OUTQ or if OBJECT_TYPE is not *FILE. |
Spooled file information | ||
SPOOLED_FILE_NAME | VARCHAR(10) | The name of the spooled file. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_NAME is not an output queue. |
SPOOLED_FILE_NUMBER | INTEGER | The number of the spooled file in the job that owns it. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_TYPE is not *OUTQ. |
QUALIFIED_JOB_NAME | VARCHAR(28) | The fully-qualified job name that owns the spooled file. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_TYPE is not *OUTQ. |
JOB_NAME | VARCHAR(10) | The name of the job that owns the spooled file. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_TYPE is not *OUTQ. |
JOB_USER | VARCHAR(10) | The name of the user who owns the spooled file. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_TYPE is not *OUTQ. |
JOB_NUMBER | VARCHAR(6) | The number of the job that owns the spooled file. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_TYPE is not *OUTQ. |
SYSTEM_NAME | VARCHAR(8) | The name of the system where the job that owns the spooled file
ran. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_TYPE is not *OUTQ. |
CREATE_TIMESTAMP | TIMESTAMP(0) | The date and time when the spooled file was created. Contains the null value if DETAILED_INFO is NO or FILE or if OBJECT_TYPE is not *OUTQ. |
Example
- List all the spooled files saved in the MYLIB/SAVF1 save
file.
SELECT LIBRARY_NAME CONCAT '/' CONCAT OBJECT_NAME AS OUTPUT_QUEUE, SPOOLED_FILE_NAME, SPOOLED_FILE_NUMBER, CREATE_TIMESTAMP FROM TABLE (QSYS2.SAVE_FILE_OBJECTS(SAVE_FILE => 'SAVF1', SAVE_FILE_LIBRARY => 'MYLIB', OBJECT_TYPE_FILTER => '*OUTQ', DETAILED_INFO => 'ALL'));
