|
Hi all, I would like to make a SAVCHGOBJ on *ALLUSR libraries to disk, not to tape. Goal is to send it to a backup system. To save into files, I have to create a file per library because SAVCHGOBJ *ALLUSR doesn't work when saving on file. So I wrote a CL that first lists *ALLUSR libraries, then creates a file with the name of the library to save and then saves. Here it is : PGM DCLF FILE(SAVES/LSTLIB) DSPOBJD OBJ(*ALLUSR) OBJTYPE(*LIB) OUTPUT(*OUTFILE) + OUTFILE(SAVES/LSTLIB) LECTURE: RCVF MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(FIN)) IF COND(%SST(&ODOBNM 1 3) *EQ 'SAV') THEN(GOTO + CMDLBL(LECTURE)) CRTSAVF FILE(SAVES/&ODOBNM) MONMSG MSGID(CPF7302) SAVCHGOBJ OBJ(*ALL) LIB(&ODOBNM) DEV(*SAVF) + SAVF(SAVES/&ODOBNM) CLEAR(*ALL) SAVACT(*LIB) MONMSG MSGID(CPF0001 CPF3702) GOTO CMDLBL(LECTURE) FIN: ENDPGM It works fine, but I would like to know if something has been saved into file to delete it if not. I see 2 ways : - When SAVCHGOBJ saves some objects, completion message CPC3723 is sent, and when nothing is saved, message CPC3708 is sent. But basic MONMSG doesn't work. - DLTF save file before creating it and test if file is empty after SAVCHGOBJ. But how ? It must be so simple, but I have no idea. Some idea ? Thanks. Best Regards.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.