Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Deconcatination of data sets and open every DD
Ok, my last message was a little briefy.

I have a bunch of data sets, not only on one volume. In my example
master2 is on another volume (Sequential Data Set). I shall get the
the right position (TTR, OFFSET) in member X.
I shall use EXCP. So I can read a whole track.

The only problem is, our customers shall use concatinated data sets as
before.
So I must the decontanation in my programm, to get the right position.
I think EOV doesn't work. I must jump in every data set in time.

Now I try to copy the JFCB's. After this I try to open the data sets.

This time I get an S413/4

-No device is available for mounting the volume containing the data
set to be
-opened (dsn), or the allocated device is not available for one of
these
-reasons:
-  a.. The volume already on the allocated device, identified in the
ser
-field of the message text, is permanently resident, reserved, or
enqueued.
-  b.. The request volume is in use elsewhere.
-  c.. Another DCB is open on the device and the device is a magnetic
tape.
-  d.. The device type is incompatible with the DSORG in the DCB.

-Specify another device in the UNIT parameter of the DD statement.




My Data sets in the concatination are on different volumes.


RECINDD  DD  DSN=MASTER1,DISP=SHR     ok
DD  DSN=MASTER2,DISP=SHR     here I get the error
DD  DSN=MASTER8,DISP=SHR
DD  ...
DD  ...

Master1 is on another volume as Master2


***code cut for breavity
*----------------------------------------------------------
*  Get all JFCB's in concatination
*----------------------------------------------------------
Alloc    MVI    ARLOPT1,ARLLANY   GET STORAGE ABOVE 16 MB
RDJFCB (DUMMY)
LTR    R15,R15
BNZ    Fehler            IF NOT DEFINED
*
L      R3,ARLAREA        ADDRESS OF ALLOCATION RETRIEVAL
XR     R5,R5
***      ICM    R5,B'1100',ARLRTRVD
LH     R5,ARLRTRVD        NUMBER OF DATA SETS
STH    R5,NORTRVD
*
*  CALCULATE AMOUNT OF STORAGE FOR JFCB'S
*
SR     R0,R0           PREPARE
LR     R0,R5           GET NUMBER OF DATA SETS
MH     R0,=H'176'      MULT BY JFCB   LENGTH
STORAGE OBTAIN,LENGTH=(R0),LOC=(BELOW,ANY)
LR     R9,R1           POINT TO AREA FOR FIRST DSNAME
ST     R9,JFCBADDR
*
*  copy JFCB in Storage
*
LOOP     MVC    0(176,R9),4(R3)
LA     R9,176(,R9)

LA     R3,224(,R3)     SHIFT TO NEXT
BCT    R5,LOOP
*LOOP END
XR     R5,R5
ICM    R5,B'0111',ARLRLEN
XR     R3,R3
IC     R3,ARLPOOL
STORAGE  RELEASE,LENGTH=(R5),SP=(R3),ADDR=ARLAREA

LTR    R15,R15
BNZ    FEHLER


*----------------------------------------------------------------
*  OPEN EVERY DD IN CONCATINATED DATA SETS
*----------------------------------------------------------------
OPENCAT  RDJFCB RECIN          READ THE JFCB
LTR    R15,R15
BNZ    FEHLER         IF NOT DEFINED

* CALCULATE AMOUNT OF STORAGE
SR     R0,R0           PREPARE
LH     R0,NORTRVD      GET NUMBER OF DATASETS
LR     R3,R0           SAVE NUMBER OF VOLS
*
MH     R0,=Y(RECINLN) MULT BY EXCP DCB LENGTH
STORAGE  OBTAIN,LENGTH=(R0),LOC=(BELOW,ANY),ADDR=
DCBADDRL
LR     R4,R1           POINT TO AREA FOR FIRST DCB
XC     IDTDCBA,IDTDCBA
ST     R4,IDTDCBA      SAVE PTR TO FIRST DCB

L      R5,JFCBADDR
OPENLO1  MVC    JFCB(176),0(R5)  COPY JFCB
LA     R5,176(,R5)      POINT TO NEXT JFCB

*
MVC    0(RECINLN,R4),RECIN  BUILD A DCB
OPEN   ((R4),INPUT),TYPE=J  USE TYPE=J TO CHANGE JFCB
LTR    R15,R15
BNZ    FEHLER
LA     R4,RECINLN(,R4)   POINT TO NEXT DCB
BCT    R3,OPENLO1
BR     R6



RECIN    DCB    DSORG=PS,MACRF=(E),EODAD=DATAEND,EXLST=E
XITL,
DDNAME=RECINDD
RECINLN  EQU   *-RECIN             LÄNGE INPUT DCB
*
RECOUT   DCB   DSORG=PS,MACRF=PM,DDNAME=RECOUTD
*
DUMMY    DCB   DSORG=PS,MACRF=(E),EXLST=INEXLST,
DDNAME=RECINDD


Jörg

Report this thread to moderator Post Follow-up to this message
Old Post
j?rg brehe
04-28-05 01:56 PM


Re: Deconcatination of data sets and open every DD
j?rg brehe wrote:
> This time I get an S413/4

Hmmm, I think either I'm missing something fundamental in trying to
understand your scenario, or you're missing something fundamental.

A DD (Data Definition) name is what we (in OS-cum-MVS circles) call
a file name.  Computer scientists might call it a logical file name.

A data set name is a physical file name.  When a file is OPENed the
logical file (the thing the program knows about) is bound to the
physical file (the thing the file system knows about).

So, we OPEN a DDname (or file) which is allocated to a data set.
As a result the data set is opened.  BUT, a file can be a concatenation
of data sets, and so we come to your particular situation.  In JCL, the
DDname of each (non-first) file in a concatenation is blank.

So what?

So, you cannot OPEN each data set in a concatenation with individual
OPEN macros because you do not have a DDname to supply OPEN with for
each data set in the concatenation.

All you have is the DDname of the first data set which actually refers
to ALL data sets in the concatenation.

If you are not dynamically allocating a new DD to each data set and
saving the DDname for later use in OPEN macros then you cannot OPEN
each data set in separate OPENs.

I did not analyze you code in detail, but I do not see any allocation
calls.  AFAICT each OPEN in the loop opens the file called RECINDD.
You can have more than one DCB open for a given file, but it seems
you do not want multiple files open for RECINDD, you want one DCB
open for each data set in the RECINDD concatenation.

But OPEN does not know about data sets, it only knows about DDs.

If you want to treat each data set as a separate file, then each data
set needs it own (unique) DDname.

Do we agree on this?

BTW, are we talking DASD or TAPE files here?  I am assuming DASD, but
a definitive statement from you would remove any doubt on this.
(Perhaps you wish to handle both, or even a mixture.  After all, both
device class can have sequential files.)

One could ask why you need a separate DD open for each data set, but
then you could say "because I want to".

You seem to be saying that you have customers who have concatenated
data sets in a file, and that the data sets are sequential.  Further,
you need to receive control when a data set change occurs.

Would Jerry Peters' suggestion of setting the UNLIKE concatenation
bit in the DCB achieve what you need?  This would certainly be
easier that allocating each data set in the concatenation, I think.

Cheers,
Greg

Report this thread to moderator Post Follow-up to this message
Old Post
Greg Price
04-28-05 08:57 PM


Re: Deconcatination of data sets and open every DD
Greg Price <grogon@groginon.com> wrote:
> j?rg brehe wrote: 
>
> Hmmm, I think either I'm missing something fundamental in trying to
> understand your scenario, or you're missing something fundamental.
>
> A DD (Data Definition) name is what we (in OS-cum-MVS circles) call
> a file name.  Computer scientists might call it a logical file name.
>
> A data set name is a physical file name.  When a file is OPENed the
> logical file (the thing the program knows about) is bound to the
> physical file (the thing the file system knows about).
>
> So, we OPEN a DDname (or file) which is allocated to a data set.
> As a result the data set is opened.  BUT, a file can be a concatenation
> of data sets, and so we come to your particular situation.  In JCL, the
> DDname of each (non-first) file in a concatenation is blank.
>
> So what?
>
> So, you cannot OPEN each data set in a concatenation with individual
> OPEN macros because you do not have a DDname to supply OPEN with for
> each data set in the concatenation.
>
> All you have is the DDname of the first data set which actually refers
> to ALL data sets in the concatenation.
>
> If you are not dynamically allocating a new DD to each data set and
> saving the DDname for later use in OPEN macros then you cannot OPEN
> each data set in separate OPENs.
>
> I did not analyze you code in detail, but I do not see any allocation
> calls.  AFAICT each OPEN in the loop opens the file called RECINDD.
> You can have more than one DCB open for a given file, but it seems
> you do not want multiple files open for RECINDD, you want one DCB
> open for each data set in the RECINDD concatenation.
>
> But OPEN does not know about data sets, it only knows about DDs.

He's using RDJFCB, modifying the dsn and doing OPEN TYPE=J, which
_does_ know about datasets. The problem is that the DD statement that
he's "modifying" using this technique has an associated UCB, that of
the first dataset. Open is complaining that the volume for the second
dataset is permanently mounted and/or that the first dataset's volume
is permanently mounted, hence open can't mount volume 2 on the unit
for volume 1. If all of the datasets were on the same volume it would
work. Since they're not, he needs to use dynamic allocation the way
he's going about it.

It would also be nice to know what the heck he's trying to do, and if
he really cares about the dsnames. If he's just trying to read the
concatenation with excp, there are other ways to accomplish that,
without using openj or dynamic allocation.

---snip----

Jerry

Report this thread to moderator Post Follow-up to this message
Old Post
Jerry Peters
04-29-05 01:55 AM


Re: Deconcatination of data sets and open every DD
On Thu, 28 Apr 2005 20:30:35 GMT Jerry Peters <jerry@example.invalid> wrote:

:>Greg Price <grogon@groginon.com> wrote:
:>> j?rg brehe wrote:
:>>> This time I get an S413/4

:>> Hmmm, I think either I'm missing something fundamental in trying to
:>> understand your scenario, or you're missing something fundamental.

:>> A DD (Data Definition) name is what we (in OS-cum-MVS circles) call
:>> a file name.  Computer scientists might call it a logical file name.

:>> A data set name is a physical file name.  When a file is OPENed the
:>> logical file (the thing the program knows about) is bound to the
:>> physical file (the thing the file system knows about).

:>> So, we OPEN a DDname (or file) which is allocated to a data set.
:>> As a result the data set is opened.  BUT, a file can be a concatenation
:>> of data sets, and so we come to your particular situation.  In JCL, the
:>> DDname of each (non-first) file in a concatenation is blank.

:>> So what?

:>> So, you cannot OPEN each data set in a concatenation with individual
:>> OPEN macros because you do not have a DDname to supply OPEN with for
:>> each data set in the concatenation.

:>> All you have is the DDname of the first data set which actually refers
:>> to ALL data sets in the concatenation.

:>> If you are not dynamically allocating a new DD to each data set and
:>> saving the DDname for later use in OPEN macros then you cannot OPEN
:>> each data set in separate OPENs.

:>> I did not analyze you code in detail, but I do not see any allocation
:>> calls.  AFAICT each OPEN in the loop opens the file called RECINDD.
:>> You can have more than one DCB open for a given file, but it seems
:>> you do not want multiple files open for RECINDD, you want one DCB
:>> open for each data set in the RECINDD concatenation.

:>> But OPEN does not know about data sets, it only knows about DDs.

:>He's using RDJFCB, modifying the dsn and doing OPEN TYPE=J, which
:>_does_ know about datasets. The problem is that the DD statement that
:>he's "modifying" using this technique has an associated UCB, that of
:>the first dataset. Open is complaining that the volume for the second
:>dataset is permanently mounted and/or that the first dataset's volume
:>is permanently mounted, hence open can't mount volume 2 on the unit
:>for volume 1. If all of the datasets were on the same volume it would
:>work. Since they're not, he needs to use dynamic allocation the way
:>he's going about it.

:>It would also be nice to know what the heck he's trying to do, and if
:>he really cares about the dsnames. If he's just trying to read the
:>concatenation with excp, there are other ways to accomplish that,
:>without using openj or dynamic allocation.

My question as well.

If he is using EXCP, he can just go directly to that extent. Why play with
re-opening the dataset?

--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

Report this thread to moderator Post Follow-up to this message
Old Post
Binyamin Dissen
04-29-05 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASM370 archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:07 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.