Set up work:
CRTLIB DELETEME
CRTPF DELETEME/DELETEME RCDLEN(10)

Sample commands
SAVLIBBRM LIB(DELETEME) DEV(*NONE) MEDPCY(SAVF) SAVF(*MEDPCY) OBJDTL(*OBJ)
First time I ever tried it.
Message ID . . . . . . : CPC3722
1 objects saved from library DELETEME.
Data was saved from library DELETEME to save file Q957840406 in Q1ABRMSF01
at 12/29/21 14:04:05. If UPDHST(*YES) was specified, the save/restore
history information was updated for each saved object.

Shows up in
WRKOBJ OBJ(Q1ABRMSF01/*ALL) OBJTYPE(*FILE)
Important note! With BRMS you do not need to know the name of this file. Bear with me. However you may want to know so that you can transfer these to your NAS.

WRKOBJBRM OBJ(DELETEME/*ALL)
Note: Remember I used OBJDTL(*OBJ) in the SAVLIBBRM above.

Now lets move these to tape.
SAVSAVFBRM CTLGRP(*NONE) LIB(DELETEME) MEDCLS(ULTRIUM5)
PERIOD((*AVAIL *CURRENT)) DEV(*MEDCLS) MEDPCY(VKTUE_FRI)
Note these entries from the joblog:
Selecting devices with density *ULTRIUM5.
Devices KDVLVTL are used for save file processing.
Cartridge G00358 volume G00358 mounted on device KDVLVTL.
Objects in save file Q957840406 in Q1ABRMSF01 saved to media.
Save file Q957840406 in library Q1ABRMSF01 cleared.
Object Q957840406 in Q1ABRMSF01 type *FILE deleted.
Transfer of save files to media on devices KDVLVTL is complete.

BRMS automatically knows what save files hold what library. You do not need to track this. Then, based on the default parameters I selected, it cleared and deleted the save file when done.

WRKOBJBRM OBJ(DELETEME/*ALL)
Will show you what tape holds that library and you can selected an option to restore it right from there.

Want a little more automation?
In the job which does the SAVLIBBRM try this:
Select
MESSAGE_TOKENS
from table(qsys2.joblog_info('*')) A
where message_id='CPC3722'
order by ordinal_position desc
fetch first row only;
You can parse out the save file from the message tokens. Ship that off to your NAS. If you want to CRTDUPOBJ and give it a name you like before sending it off to your NAS go ahead.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.