On Sat, 12 Nov 2016 17:07:53 -0600, Paul Gilmartin
(0000000433f07816-dmarc-requ...@listserv.ua.edu) wrote about "Re: BPAM"
(in <4952142150671732.wa.paulgboulderaim....@listserv.ua.edu>):

> On Sat, 12 Nov 2016 20:27:13 +0000, David W Noon wrote:
>>
>> The traditional way to do this was to use a spill file, thus:
>>
> (But you use the past tense.  Is there a better way now?)

I don't think there is a new way specific to PDSE libraries.

>>  OPEN   (PDS,INPUT),(SPILL,OUTPUT)
>>  FIND   PDS,<member>
>>
>> loop:
>>  READ   PDS
>>  WRITE SPILL
>>
>> end loop:
>>  WRITE SPILL with additional records
>>
> Why was it not traditional at this point simply to:
>    STOW SPILL,<member>,R

The spill file was usually a sequential dataset on a scratch unit,
typically VIO. There was no need for the overheads of BPAM (directory
management, etc.).

>>  CLOSE  PDS,SPILL
>>  <snip>
>>
> ... and avoid the remaining code?

Having 2 or more DCB's open on the same PDS was a recipe for data
corruption when at least 1 was opened for output. This is because BPAM
uses the DS1LSTAR field of the format-1 DSCB to determine end-of-data at
open time, but any DCB that writes to the PDS will move the end-of-data
address without updating the DSCB and without notifying any other DCB
operating on the same PDS. The format-1 was finally updated during the
CLOSE macro.

>> This would not facilitate the appending of data to an existing member.
>> The serialization mechanism would not provide additional space to hold
>> additional records within a member.
>>
> That's what secondary extents are for.

Not so.

A member cannot be in discontiguous space. Thus, a member that occurs
early in the seek addresses of a PDS cannot receive additional space on
the end of the dataset.

> I strongly doubt that PDSE stores the pages of a member contiguously,
> which you seem to assume is the reason for the restriction.

I would not be too certain about that. BPAM still has to support NOTE
and POINT macros for random access, and these assume that each member is
in contiguous disk space so that the seek addresses are sequential.

To change that would require a major re-architecture of both BPAM and
BSAM as regards NOTE and POINT processing. This would have to be
transparent to older code that has used NOTE and POINT for decades. It
might be possible, but it would be a serious challenge.

>> If you use a STOW immediately after opening a PDS for output, you will
>> create a member with no records in it.
>>
> Yet ISPF LMMREP, which I assume is LM's wrapper for STOW, requires a
> preceding LMPUT.

You would have to ask IBM about that.

One possibility is that LMMREP does not perform an OPEN; it expects to
have an already opened DCB in the TSO address space and for that some
previous operation that will open a DCB is necessary.
-- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
david.w.n...@googlemail.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to