File Open issue



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

File Open issue

Postby sumeendar » Tue Sep 03, 2013 8:23 pm

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
sumeendar
 
Posts: 6
Joined: Fri Apr 13, 2012 5:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: File Open issue

Postby Akatsukami » Tue Sep 03, 2013 8:40 pm

I recommend that you code UNIT=AFF=ddname1 on the DD statement for the second file.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: File Open issue

Postby sumeendar » Tue Sep 03, 2013 8:51 pm

here ddname1, should it be the name of 1st file ddname, correct me if i am wrong
sumeendar
 
Posts: 6
Joined: Fri Apr 13, 2012 5:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: File Open issue

Postby Akatsukami » Tue Sep 03, 2013 8:57 pm

That is correct.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: File Open issue

Postby dick scherrer » Tue Sep 03, 2013 9:04 pm

Hello and welcome to the forum,

You do realize that you should not try to open both of them at the same time . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: File Open issue

Postby Akatsukami » Tue Sep 03, 2013 9:06 pm

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:
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: File Open issue

Postby dick scherrer » Tue Sep 03, 2013 9:10 pm

Someone here tried this only recently. . . .

Thought this might be similar ;)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: File Open issue

Postby c62ap90 » Tue Sep 03, 2013 9:21 pm

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
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Re: File Open issue

Postby dick scherrer » Tue Sep 03, 2013 9:29 pm

Hello,

From the post, i don't know if this was/is a concatenation issue or 2 different ddnames entirely. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: File Open issue

Postby c62ap90 » Tue Sep 03, 2013 9:50 pm

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}
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 7 times

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post