|
Yes. we are storing the available tape drives names in the data area and once the point of backup is reached, send a message to the operator using SNDUSRMSG to load the tape drives and specify its name. In the VALUES section of the command we specify all the valid tape drive names. Once the tape drive name is entered, use CPYTPTAP to save the file information. This was the exact code: CPYTOTAP FROMFILE(&lib1/&file1) > TOFILE(QTAPE) TOSEQNBR(*END) TOLABEL(&savefile1) TODEV(&tape1)
TOENDOPT(*LEAVE) TOEXPDATE(*PERM)
The reply from the operator is stored in the variable &tape1. &tape1 shows as *N in the joblog though the operator replied some tape drive names. rob@xxxxxxxxx wrote: *N is no longer an option on V5R4. On V5R4 you have to enter a device or *TAPF. *TAPF will use the device specified in the tape file description. The reason it defaults to that in the first place is that you can do a CHGTAPF FILE(QTAPE) DEV(TAP01) and change it from the default of *NONE to an existing device. Now I don't know what the common practice is out there. I suspect it's one of two options. One either do a CHGTAPF or specify the device in the CPYTOTAP. Sounds like your shop had a standard to do a CHGTAPF. Now, since you have to change all of your CL, is a time to re-evaluate. If you want to bandage that you could create your own custom CPYTOTAP command, put it in a custom library and put that custom library tops in your system library list. In your custom command have it execute the QSYS/CPYTOTAP command but change the *N to *TAPF. Or, instead of *TAPF have it go to the device there also. Then again, you may not. Then if you do a CHGTAPF also to support those using *TAPF you'll have to modify the custom command also when you change from TAP01 to TAP02. Me, I'd change to the device name in the CL. Now, if you have multiple CL names I'd store the device name in a dataarea, retrieve that, and use that in the CPYTOTAP. Understand? Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.