Determine when an object was last saved

If a library contains an object, you can use the Display Object Description (DSPOBJD) command to find out when the server saved the object. If the QSYS library contains an object, you can use the DSPOBJD command to display the appropriate data area that is shown in Data areas that contain save history.

You can also use the DSPOBJD command to obtain the save history for document library objects (DLO) in libraries. Use the Display Document Library Object Name (DSPDLONAM) command to find the system object name and the ASP ID of the DLO. On the DSPOBJD command, specify the system object name on the OBJ parameter. In the library name field, specify QDOCxxxx where xxxx is the ASP ID. For example, for auxiliary storage pool (ASP) 2 the library name would be QDOC0002.
Note: For ASP 1, the system ASP, the library name is QDOC, not QDOC0001.
For objects that you store in directories, you can use the output from the SAV command to maintain save history information. To use the output, you must elect to keep the save history information when you issue the SAV command. To keep the save history information, specify either *PRINT or a stream file or user space path name on the OUTPUT parameter of the SAV command.
Note: The output from the SAV command does not store the last saved data for objects in directories. See Save changed objects in directories for instructions to save only changed objects.

The following commands do not update the save history information for the individual objects that the server saves:

For some save operations, the server updates history information in a data area. In some cases, the server updates the data area instead of updating the individual objects. In other cases, the server updates the data area in addition to the individual objects.

Beginning with V5R1, when you install the operating system, the server will update the data areas. However, the data areas will appear as if you used RSTOBJ to restore them. The server does not support the QSAVDLOALL data area.

The following table shows these commands and the associated data areas:

Table 1. Data areas that contain save history
Command Associated Data Area Individual Objects Updated?
SAVCFG QSAVCFG No
SAVLIB *ALLUSR QSAVALLUSR Yes1
SAVLIB *IBM QSAVIBM Yes1
SAVLIB *NONSYS QSAVLIBALL Yes1
SAVSECDTA QSAVUSRPRF No
SAVSTG QSAVSTG No
SAVSYS QSAVSYS, QSAVUSRPRF, QSAVCFG No
SAVSYSINF QSYSINF No
1
If you specify UPDHST(*NO), the server does not update the Date last saved field in either the object or the data area.

The server uses the save history information when you save objects that have changed since the last save operation.

Related reference
Save only changed objects