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

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

Join the forum, it's quick and easy

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

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Run Backup based on objects count

2 posters

Go down

Run Backup based on objects count Empty Run Backup based on objects count

Post  rajkumar400 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

Back to top Go down

Run Backup based on objects count Empty Re: Run Backup based on objects count

Post  soundhar 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

Back to top Go down

Run Backup based on objects count Empty Re: Run Backup based on objects count

Post  soundhar 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

Back to top Go down

Run Backup based on objects count Empty Re: Run Backup based on objects count

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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