Page 2 of 2

Re: File Open issue

PostPosted: Tue Sep 03, 2013 10:37 pm
by BillyBoyo
The issue needn't be the JCL.

If there are two different files on the same tape, they just can't both be open at once. I have no idea what FILE STATUS code that would give, as it wouldd not even be worth trying.

If you need to read two files from the sme tape at the same time, you'll have to copy one to DASD/disk first.

Re: File Open issue

PostPosted: Wed Sep 04, 2013 12:06 am
by NicC
From the first post...
2 files that resides on same tape volume

it might help if peeps read what is posted - I know that most times it is what is NOT posted that is important :D

Re: File Open issue

PostPosted: Wed Sep 04, 2013 1:28 am
by dick scherrer
Hello,

But, if they are completely different datasets (i.e. lrecl, blksize) there should be 2 different ddnames rather than one.

Depending on if they are cataloged, the label parameter might not be needed for input.

Re: File Open issue

PostPosted: Wed Sep 04, 2013 10:11 am
by steve-myers
It is not physically possible to have two data sets open on a single tape volume at the same time. The attempt to open the second data set usually results in an ABEND.

A couple of people talked about data set concatenation. This is perfectly possible and reasonable because, in essence, the data sets are opened one after the other. It is quite common to concatenate and open PDS libraries, but the PDS data sets are on disk, not tape, so it is reasonable to expect the data sets to be opened simultaneously.

Re: File Open issue

PostPosted: Wed Sep 04, 2013 10:56 am
by sumeendar
It is two different files having 2 different ddnames. However both these files resides in same tape volume
Sample below

//BILL DD DSN=BILL.FILE1,DISP=SHR
//REAS DD DSN=REAS.FILE2,DISP=SHR

I tried as below, but still gave file Status 90 when tried to open REAS file.

//BILL DD DSN=BILL.FILE1,DISP=SHR
//REAS DD DSN=REAS.FILE2,DISP=SHR,UNIT=AFF=BILL

Let me know if there is any way to resolve file status issue

Thanks

Re: File Open issue

PostPosted: Wed Sep 04, 2013 11:45 am
by BillyBoyo
Altough I have never tried it, or even thought of trying it, I really strongly doubt you can read two datasets from the same physical tape at the same time.

This has been mentioned a number of times so far. Just as a test, copy one of the datasets to DASD/disk, make the appropriate change to your JCL and see what happens.

Re: File Open issue

PostPosted: Wed Sep 04, 2013 7:36 pm
by dick scherrer
Hello,

As has been mentioned multiple times - you CANNOT use both files on that tape at the same time. . .

You need to copy one or both files to DASD and try again.

Re: File Open issue

PostPosted: Wed Sep 04, 2013 8:38 pm
by NicC
or use one, close it and then start on the other - you may have to use DEFER on the second file so that there will be no attemt to allocate it at the same time as the first. You can only have one file on a particular tape allocated at one time.