Does anyone knows a process or CL that uses DSPLIB to display the contents of a library and their attributes, such as their size and last used date, followed by creating a file that I can query against?
My goal is to first list the name, last used date and size of all objects in a production library and delete objects that have not been used in more than a year.
You can do this by using:
DSPOBJD OBJ(MYLIBRARY/*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE)OUTFILE(QTEMP/MYFILE)
Where:
MYLIBRARY - the desired library.
MYFILE - Outfile Filename.
You can use these fields as reference:
ODLBNM - Libray
ODOBNM - Object Name
ODOBTP - Object Type
ODOBSZ - Object Size
ODCDAT - Creation Date
ODCTIM - Creation Time
ODOBOW - Object Owner
ODLDAT - Change Date
ODLTIM - Change Time
I hope this will help you.
Thanks OSS4!
ReplyDelete