File Open issue



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

Re: File Open issue

Postby BillyBoyo » Tue Sep 03, 2013 10:37 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: File Open issue

Postby NicC » Wed Sep 04, 2013 12:06 am

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
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: File Open issue

Postby dick scherrer » Wed Sep 04, 2013 1:28 am

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.
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 steve-myers » Wed Sep 04, 2013 10:11 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: File Open issue

Postby sumeendar » Wed Sep 04, 2013 10:56 am

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

Re: File Open issue

Postby BillyBoyo » Wed Sep 04, 2013 11:45 am

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: File Open issue

Postby dick scherrer » Wed Sep 04, 2013 7:36 pm

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.
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 NicC » Wed Sep 04, 2013 8:38 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post