AS/400 HELP    

                                     "LASTSAVE" 

 

LASTSAVE  prints a lists of objects in one or more libraries showing date of last save as well as date of last change, last used  and date object was created.

Enter today’s date to list any objects NOT saved during  last night’s backup routine.

Use  tomorrow’s date to list all objects. 

LASTSAVE   uses the QUSLOBJ  API  via a user space in qtemp.

Since dates  retrieved  are in internal system format the  QWCCVTDT API is used to convert the dates to YYYYMMDD  HHMMSSS format.   I found zero dates were converted to  19280823 so the program simply zeroes out such dates. (let me know of any other way) I checked with IBM Toronto and they agreed with my logic and warned me that V5R1 users will need PTF SI02230 for this situation. V5R2 includes this fix.

The status field returns the following;  blank=ok  A=no info returned D=damaged object   L=object locked   P=info returned but object is partially damaged.   LASTSAVE should be used by a user with the operator authority otherwise  the ‘A’ status may appear

See documentation on the QUSLOBJ and QWCCVTDT for more info.

LASTSAVE was written on  a  V4R5 machine and re compiled  and saved on  a  V3R7 machine.  

PC INSTRUCTIONS:

Download "LASTSAVE” to your PC.

Go to a DOS session and enter the following;

FTP SYSTEM                                        (system = your AS/400’s name or IP address)

Enter a valid user id and password

CD QGPL

LCD C:\DIRECTORY (directory= the directory on your pc where you downloaded “lastsave.savff”

QUOTE    SITE     NAMEFMT   1

BIN

PUT       LASTSAVE.SAVF

QUOTE   RCMD   RSTLIB   SAVLIB(LASTSAVE)   DEV(*SAVF)   SAVF(QGPL/LASTSAVE)

 Note:  If there is a security problem restoring all objects with the command above,  sign on to your as/400 as Qsecofr and run RSTLIB  from the command line.

   DOWNLOAD lastsave.savf                          

 

 

AS/400 INSTRUCTIONS:

ADDLIBLE LASTSAVE

LASTSAVE

 

NOTE:    If you  enter *ALL or QSYS as the LIBRARY to list be prepared to wait  awhile (quite awhile)

NOTE2:  LASTAVE is just a report. What’s on your backup tapes is what really matters. 

NOTE3:   Use the command WRKOBJ  option 8  to verify  any  object  in question on the list.

NOTE4:  As with any API, subsequent releases of OS/400 may enlarge the formats. You may have to modify LASTSAVE  to work  on your As/400