Run Backup based on objects count
2 posters
Page 1 of 1
Run Backup based on objects count
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
How this can be done?
Help me out with this!
Thanks.
Raj
rajkumar400- Posts : 59
Join date : 2010-12-25
Re: Run Backup based on objects count
First create a SAVF and after creating *savf,
then,
SAVLIB LIB(PMS90) DEV(*SAVF) SAVF(PMS90/SOUNDHAR)
then,
SAVLIB LIB(PMS90) DEV(*SAVF) SAVF(PMS90/SOUNDHAR)
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Re: Run Backup based on objects count
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.
****************************************************
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
Similar topics
» How to get the record based on key
» Record Positioning
» Selection based on part of char field
» What are the access paths on which Print file can be based on?
» Backing up and restoring IBM i (AS/400) objects via a PC
» Record Positioning
» Selection based on part of char field
» What are the access paths on which Print file can be based on?
» Backing up and restoring IBM i (AS/400) objects via a PC
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|