Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

more than 1 input on the same tape unit

Status
Not open for further replies.

darb5427

Programmer
May 12, 2003
14
0
0
US
Hi I'm on IBM VSE using Cobol. My program is supposed to have tha ability to read multiple input tapes on the same unit. It works ok, but when I respond that I have another input, the same tape stays up and reads again. If I manually unload the tape and load up the next one its fine, but this would obviuosly not work to well for operations.

I've tried a couple things that had some measure of success but ultimately didn't do what I was hoping for.

1. I changed my close statements to close with lock. This did cause the first tape to come down after reading, but died immediately after, before attempting to read a 2nd tape. Is there something I could add to the open after the close with lock, to unlock the file ?

2. I added a // MTC RUN,SYS006 to the JCL. This however only works after all tapes are read in, and the job is ending.

Thank You
 
Darb -

If you have a tape manager, I think you can include a TLBL for the tape (even if it's not standard labelled) and can code the rewind-and-unload parameter on it:

//TLBL INPUT,'MY.FILE.HERE',,,,,,02 <--02=RUN

Glenn
 
Our option here for that looks like this
// TLBL TAPEOUT,'OUTPUT.503643',5,FIOPT=(RUN)

with run being the command that unloads the tape. But I tried that and it doesn't unload the tape.

I also tried the close reel/unit for removal option, but that, just like the close with lock, unloaded the first tape, but dumped when I tried to reopen the next tape.
 
Darb -

Do you only have DYNAM/FI, or do you have DYNAM/T as well? (I can't imagine you don't have DYNAM/T if you have FI.) Assuming you have DYNAM/T, why don't you try:

// TLBL TAPEOUT,'OUTPUT.503643',5,,,,,02

with a simple COBOL CLOSE and see what happens? (Perhaps FI is not being invoked because of LE.)

If you also wish to retain the same assignment for further opens, change the 02 to 10 (02 + 08). Otherwise, DYNAM should prompt the operator for a mount somewhere for the 2nd and subsequent files.

Regards.

Glenn
 
Glenn,

I honestly don't know if we have DYNAM/T, but I already had tried // TLBL TAPEOUT,'OUTPUT.503643',5,,,,,02 and the cobol close and it didn't unload the tape.
But I do have some good news (place geico insurance joke here) When I came in today someone from work familiar with my dilema found something on IBM's support pages to try. &quot; Customer testing has shown that this sequence
CLOSE filename UNIT FOR REMOVAL.
CLOSE filename.
OPEN INPUT filename.
does actually rewind and unload a cartridge on a D/T3480
with the Automatic Cartridge Load feature and allow the next
cartridge to be loaded and OPENed successfully.
If only CLOSE filename UNIT FOR REMOVAL is used, a subsequent
OPEN fails with SK41 indicating that the file is already OPEN.&quot;

So I used the above sequence and I was able to read multiple tapes on the same unit, and all the tapes unloaded when they were done reading. And there was great rejoicing.

Thank You

Darb

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top