In the previous article, Tom Huntington of Help/Systems discussed how the last save date on many objects is not updated by the system during certain backup operations. For example, to see the date for your last SAVSYS operation, you display the last save date of a special data area named QSAVSYS.
If you use the command DSPOBJD QSAVSYS *DTAARA and examine the save date of the data area object, it will show the date and time of the last SAVSYS operation. Likewise, the last Save Configuration (SAVCFG) date and time is reflected in the QSAVCFG data area.
Please note that you cannot use the command Display Data Area (DSPDTAARA) to view the last save information; you must use Display Object Description (DSPOBJD).
In this article, I provide a CL program and display file that will display the last date of important save events, such as SAVSYS, SAVCFG, and so on. If you are at V5R4 or later, this program will also display the last date you ran Save System Information (SAVSYSINF). If you are not yet at V5R4, the date will display as zeros.
Here is a display of the information on my system:
12/01/08 Last Save Date Inquiry MYSYSTEM
16:35:34 DANRIEHL
Last SAVSYS Operation. . . . . 07/21/08
Last SAVCFG Operation. . . . . 11/01/08
Last SAVSECDTA Operation . . . 11/01/08
Last SAVLIB *NONSYS Operation. 07/21/08
Last SAVLIB *ALLUSR Operation. 07/21/08
Last SAVLIB *IBM Operation . . 07/21/08
Last SAVSTG Operation. . . . . 07/21/06
Last SAVSYSINF Operation . . . 11/03/08 V5R4 and later
F3=Exit
The downloadable code includes CL source (SAVEDATECL) and the DDS for a display file (SAVEDATED). First, create the display file, and then create the CL program. You can then invoke the utility using this command: CALL SAVEDATECL
Note: The CL program uses the DoWhile command, which was introduced in V5R3. If you are not yet at V5R3, simply remove the DoWhile and the last EndDo command from the source code before you compile the CL program.
I hope you find this little program useful.
The following source code is included:
SAVEDATECL CLP CL Program SAVEDATED DSPF Display File
You can download a zip file containing all the source code from the URL
http://www.systeminetwork.com/noderesources/code/clubtechcode/savedate.zip
Note: As with all new programs, test these routines thoroughly before placing them into a production environment. No warranty is expressed or implied.