
Following on from my save21 article last month it transpires that there are some more system data areas worth knowing about in relation to save/restore date/time/media information.
If you needed to know
when a file was last saved on the system you would run command
DSPOBJD OBJ(LIBRARY/FILE) OBJTYPE(*FILE) Then taking option 5 to display the
full attributes and paging down to the final screen you would see the last save
date and time together with the tape volume ID or save file used to save the
object. This is standard stuff which I’m sure you already know about.
However, there are a number of data areas in QSYS which come into play when you run certain save commands. The table below is a list of the data areas and which IBM i save command updates them.
Data Area Updated in QSYS | Command |
QSAVSYS, QSAVUSRPRF, QSAVCFG | SAVSYS |
QSAVALLUSR | SAVLIB *ALLUSR |
QSAVLIBALL | SAVLIB *NONSYS |
QSAVIBM | SAVLIB *IBM |
QSAVCFG | SAVCFG |
QSAVUSRPRF | SAVSECDTA |
QSAVSTG | SAVSTG |
QSYSINF | SAVSYSINF |
If you display any of the above using the DSPDTAARA command you will be disappointed to see that, unlike the QSRSAV21 data area in last months article https://powerwire.co.uk/how-long-is-that-save-21-going-to-take, the data area has nothing in it! Using SAVLIB *ALLUSR as the example. DSPDTAARA QSYS/QSAVALLUSR looks like this

So how can you use them to determine when the last save was done and to what media? The answer is by using the DSPOBJD command on the data area object. For example to determine the last time a SAVLIB *ALLUSR was run and to what media you would enter the command DSPOBJD OBJ(QSYS/QSAVALLUSR) OBJTYPE(*DTAARA)

then take option 5 to display the full attributes and Page Down to the final screen. From the screen shot below you can see that the last time a SAVLIB *ALLUSR was run was on 24/02/2020 at 20:23 onto tape media volume 09MO

IBM have done a great job in giving us rock solid save/restore procedures. Using these data areas can help you to better understand and manage your system save strategy.
ProTip: Remember that if you specify UPDHST(NO) on the SAVLIB *IBM, SAVLIB *ALLUSR or SAVLIB *NONSYS commands the system does not update the save date/time on the QSAVIBM, QSAVALLUSR and QSAVLIBALL data areas.
Leave a Reply