PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Run Backup based on objects count

View previous topic View next topic Go down

Run Backup based on objects count

Post  rajkumar400 on Mon Dec 27, 2010 12:20 pm

I have a requiremet that I need to run a savlib command if the particular library has more than 100 objects.
How this can be done?

Help me out with this!

Thanks.
Raj

rajkumar400

Posts : 59
Join date : 2010-12-25

View user profile

Back to top Go down

Re: Run Backup based on objects count

Post  soundhar on Fri Dec 31, 2010 12:13 pm

First create a SAVF and after creating *savf,

then,

SAVLIB LIB(PMS90) DEV(*SAVF) SAVF(PMS90/SOUNDHAR)

soundhar

Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai

View user profile

Back to top Go down

Re: Run Backup based on objects count

Post  soundhar on Wed Jan 12, 2011 10:11 pm

You could also use DSPOBJD yourlib/*ALL to an outfile.
DSPOBJD OBJ(PMS90/*ALL) OBJTYPE(*ALL) +
OUTPUT(*OUTFILE) OUTFILE(QTEMP/OUTF3)
Then either count the number of objects in that outfile using rtvmbrd on outf3 and check for a condition if nbrcurrcd > 100 do ur savlib
SAVLIB LIB(PMS90) DEV(*SAVF) SAVF(PMS90/SOUNDHAR)
or
do a DSPFD of that outfile to a 2nd outfile and read that 2nd outfile which could give you the record count.

****************************************************





soundhar

Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai

View user profile

Back to top Go down

Re: Run Backup based on objects count

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum