Page 1 of 2

File Open issue

PostPosted: Tue Sep 03, 2013 8:23 pm
by sumeendar
I am trying to open (thru' cobol program as input) 2 files that resides on same tape volume . The 1st file is correctly opened, however the 2nd file failed to open giving file status 90.
How can i resolve this? I tried a search in google for a possible solution, but in vain.

Any help is appreciated

Re: File Open issue

PostPosted: Tue Sep 03, 2013 8:40 pm
by Akatsukami
I recommend that you code UNIT=AFF=ddname1 on the DD statement for the second file.

Re: File Open issue

PostPosted: Tue Sep 03, 2013 8:51 pm
by sumeendar
here ddname1, should it be the name of 1st file ddname, correct me if i am wrong

Re: File Open issue

PostPosted: Tue Sep 03, 2013 8:57 pm
by Akatsukami
That is correct.

Re: File Open issue

PostPosted: Tue Sep 03, 2013 9:04 pm
by dick scherrer
Hello and welcome to the forum,

You do realize that you should not try to open both of them at the same time . . .

Re: File Open issue

PostPosted: Tue Sep 03, 2013 9:06 pm
by Akatsukami
dick scherrer wrote:Hello and welcome to the forum,

You do realize that you should not try to open both of them at the same time . . .

Good point; I didn't think of that :oops:

Re: File Open issue

PostPosted: Tue Sep 03, 2013 9:10 pm
by dick scherrer
Someone here tried this only recently. . . .

Thought this might be similar ;)

d

Re: File Open issue

PostPosted: Tue Sep 03, 2013 9:21 pm
by c62ap90
Example for multiple dataset tapes on same tape drive (same DD):

//ABC      EXEC PGM=XYZ
//DDNAME1  DD DSN=TAPE1.DATASET,
//            DISP=SHR,
//            UNIT=TAPE
//         DD DSN=TAPE2.DATASET,
//            DISP=SHR,
//            UNIT=AFF=DDNAME1

Re: File Open issue

PostPosted: Tue Sep 03, 2013 9:29 pm
by dick scherrer
Hello,

From the post, i don't know if this was/is a concatenation issue or 2 different ddnames entirely. . .

Re: File Open issue

PostPosted: Tue Sep 03, 2013 9:50 pm
by c62ap90
dick scherrer wrote:Hello,

From the post, i don't know if this was/is a concatenation issue or 2 different ddnames entirely. . .

I was thinking that too.

…or 2 different files on the same tape!
// LABEL=(1,SL) {1st FILE ON TAPE}
// LABEL=(2,SL) {2ND FILE ON TAPE}