开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Understanding PDS in MVS 3.8


 

Hi :)

I am trying to understand how PDSs are allocated in a 3390.

Facts:

  • TSO001: 3390-1, 56,664 bytes/track
  • PDS directory block: 256 bytes/dirBlock
  • PDS EOF record: unknown

Sequential Data Set

With attributes:

  • Record format: FB
  • LRECL: 80
  • BLKSZ: 27,920
  • Primary space: 1 track
  • Secondary space: 0

My expectations:

  • Blocks per track: 2
    • 56,664 bytes/track / 27,920 bytes/block = 2.0295 blocks/track
  • Logical records per block: 349
    • 27,920 bytes/block / 80 bytes/record = 349 records/block
  • Max. logical records per track: 698
    • 349 records/block * 2 blocks = 698 records

I am able to confirm my expectations with the following card decks (please, find attached):

  • fill-seq-ds-rc0.jcl (Creates a sequential data set with 698 logical records. RC=0)
  • fill-seq-ds-sb37.jcl (Creates a sequential data set with 698 logical records, and ABENDs when inserting the logical record 699. SB37)

Partitioned Data Set

With attributes:

  • Record format: FB
  • LRECL: 80
  • BLKSZ: 27,920
  • Primary space: 1 track
  • Secondary space: 0
  • Directory blocks: 1

Directory Blocks Space

My expectations:

  • 1 dirBlock = 256 bytes
  • Min. dirEntry = 8+3+1=12
  • Max. entries = 21
    • 256 / 12 = 21.333

I am able to get 20 members with the following card decks (please, find attached):

  • fill-pds-dblk-rc0.jcl (Creates a PDS with 20 members, 1 logical record each. RC=0)
  • fill-pds-dblk-sb14.jcl (Creates a PDS with 20 members, and ABENDs when creating the 21st member. SB14)

Why 20 and not 21? What am I missing?

Member Space

My expectations:

  • Space taken by directory blocks: 4 records
    • 256 bytes / 80 bytes/record = 3.2 records
  • Seq. DS max. logical records = 698
  • PDS max. logical records = 694
    • 698 records/track - 4 records = 694 records

I am able to create one member with max. 667 records with the following card decks (please, find attached):

  • fill-pds-1member-rc0.jcl (Creates a PDS with 1 member with 667 records. RC=0)
  • fill-pds-1member-sb37.jcl (Creates a PDS but ABENDs adding the member with 668 records. SB37)

Why 31 records less? What am I missing?

I am only able to create 14 members with 460 records total. 13 members with 34 records and 1 member with 18 records (please, find attached):

  • fill-pds-20members-rc0.jcl (Creates a PDS with 14 members. RC=0)
  • fill-pds-20members-sb37.jcl (Creates a PDS with 13 members, but ABENDs adding the 14th member with 19 records. SB37)

Why 238 records less? What am I missing?

Kind Regards


 

开云体育

Each 256-byte directory block has a 2-byte field which indicates the length within the block of the entries it contains, so only 254 bytes may be used to hold the entries themselves - you should be doing 254 / 12 instead of 256 / 12.

That still gives 21, however.

I'm not an expert on the exact conditions, but entries can vary in length, so I suspect that for some reason your entries are more than 12 bytes long, as 12 bytes is the maximum entry length that will allow 21 entries to fit in one directory block.



On 10/30/24 10:49, Sergio wrote:

Hi :)

I am trying to understand how PDSs are allocated in a 3390.

Facts:

  • TSO001: 3390-1, 56,664 bytes/track
  • PDS directory block: 256 bytes/dirBlock
  • PDS EOF record: unknown

Sequential Data Set

With attributes:

  • Record format: FB
  • LRECL: 80
  • BLKSZ: 27,920
  • Primary space: 1 track
  • Secondary space: 0

My expectations:

  • Blocks per track: 2
    • 56,664 bytes/track / 27,920 bytes/block = 2.0295 blocks/track
  • Logical records per block: 349
    • 27,920 bytes/block / 80 bytes/record = 349 records/block
  • Max. logical records per track: 698
    • 349 records/block * 2 blocks = 698 records

I am able to confirm my expectations with the following card decks (please, find attached):

  • fill-seq-ds-rc0.jcl (Creates a sequential data set with 698 logical records. RC=0)
  • fill-seq-ds-sb37.jcl (Creates a sequential data set with 698 logical records, and ABENDs when inserting the logical record 699. SB37)

Partitioned Data Set

With attributes:

  • Record format: FB
  • LRECL: 80
  • BLKSZ: 27,920
  • Primary space: 1 track
  • Secondary space: 0
  • Directory blocks: 1

Directory Blocks Space

My expectations:

  • 1 dirBlock = 256 bytes
  • Min. dirEntry = 8+3+1=12
  • Max. entries = 21
    • 256 / 12 = 21.333

I am able to get 20 members with the following card decks (please, find attached):

  • fill-pds-dblk-rc0.jcl (Creates a PDS with 20 members, 1 logical record each. RC=0)
  • fill-pds-dblk-sb14.jcl (Creates a PDS with 20 members, and ABENDs when creating the 21st member. SB14)

Why 20 and not 21? What am I missing?

Member Space

My expectations:

  • Space taken by directory blocks: 4 records
    • 256 bytes / 80 bytes/record = 3.2 records
  • Seq. DS max. logical records = 698
  • PDS max. logical records = 694
    • 698 records/track - 4 records = 694 records

I am able to create one member with max. 667 records with the following card decks (please, find attached):

  • fill-pds-1member-rc0.jcl (Creates a PDS with 1 member with 667 records. RC=0)
  • fill-pds-1member-sb37.jcl (Creates a PDS but ABENDs adding the member with 668 records. SB37)

Why 31 records less? What am I missing?

I am only able to create 14 members with 460 records total. 13 members with 34 records and 1 member with 18 records (please, find attached):

  • fill-pds-20members-rc0.jcl (Creates a PDS with 14 members. RC=0)
  • fill-pds-20members-sb37.jcl (Creates a PDS with 13 members, but ABENDs adding the 14th member with 19 records. SB37)

Why 238 records less? What am I missing?

Kind Regards


 

Hi,
?
A member entry in the directory block is at least 12 bytes long containing:
1. member name (8 bytes)
2. TTR (3 bytes)
3. C byte (1 byte), the last 5 bits containing the number of halfwords of the user data in the directory block.
4. userdata (minimum 0 bytes, maximum 62 bytes).
?
The maximum number of halfwords userdata is 31.? So the maximum entry length = 74 bytes.
Examples of userdata are:
ISPF stats in source members
Load modules stats of load modules, like module length, SSI information etc. This is mapped by the macro IHAPDS in SYS1.AMODGEN.
?
Cheers,
Rob


 

I recommend you to convert your disk from cckd to ckd(no compression) and then open it in HxD(free hex editor that supports EBCDIC).
That way you can see for yourself where data of your members starts and where it ends. To make things easier, fill lines of each member with different text strings.
Don't forget to change encoding from ANSI to EBCDIC.
?
Best wishes,
Andre


 

The last directory block of a PDS ends with a dummy 'end' marker with a member name of x'FFFFFFFFFFFFFFFF'.
?
James Campbell


 

Should have added - a PDS directory block is a keyed block.? So with one directory block, a track will look like:
- Directory CKD record
- Directory Key record - with the high member name in the following block
- Directory Data block - 256 bytes
- Directory EOF marker
- First data block of a member
etc
?
Each of those will have error correcting information and then be rounded up to a multiple of ??? bytes.? I forget the exact value of ??? - maybe 32 .? It's in a manual somewhere.?
?
James Campbell


 

On 31/10/2024 7:48 am, jacampbellaus via groups.io wrote:
Should have added - a PDS directory block is a keyed block.
Yes, to calculate the number of directory blocks that will fit on a track, you need to account for 256-byte data blocks each with an 8-byte key.

Also, to calculate the space required by a PDS (as compared to a sequential data set) you need to account for an EOF marker at the end of the PDS directory and an EOF marker at the end of every member.? Most of the time, meaning for most DASD types, when aiming for the PDS directory to occupy an integral number of tracks, the trick is to multiply the desired number of tracks by the number of PDS blocks per track (for that device type), and then subtract one to leave room for the EOF marker.

A sequential data set does not end with an EOF marker - although it could be read successfully if it did.

The VTOC entry of PS (and PO) data sets contains the TTR of the last record written.? With DISP=MOD (or OPEN EXTEND (or OUTINX) with DISP=OLD or DISP=SHR), the first block appended will be the block after the previous "last block written".? The track balance field in the VTOC informs the access method as to what size is the largest bock that will fit on the track with the previous last block. Accordingly, the first newly appended block will either fit on the previous last track or will be the first block on the next (relative) track.

DISP=MOD and OPEN EXTEND are not allowed for PDSes (or even for PDSEs).

IBM's ISPF option 3.2 always did an OPEN/CLOSE cycle on a newly allocated sequential data set.? We used to say that it wrote an EOF marker, but probably what it really ended up doing was erasing all blocks on the first track.? Compare this to a PGM=IEFBR14 (or any other program) step that creates a new sequential data set with JCL.? Make the block size big enough and you can read any residual data that previously occupied those tracks (assuming no RACF erase-on-scratch facility or similar).

Later on, SMS-managed sequential data sets allocated by JCL also got the EOF marker or first track erased thing done.

RFE option 3.2 does not do an open/close cycle when allocating new sequential data sets.
Rob can tell us what happens with the equivalent case when using RPF.

Cheers,
Greg


 

On Thu, Oct 31, 2024 at 03:32 AM, Greg Price wrote:
Rob can tell us what happens with the equivalent case when using RPF.
Yes: I do an OPEN/CLOSE for sequential data sets in RPF 3.2.
?
Cheers,
Rob


 

Hi :)

Thank you all.

I was able to verify what happens inside the directory block by creating my own uncompressed 3390 disk and inspecting it with an hexadecimal editor.

PDS Directory block

I was able to confirm the "end marker” inside the 254 bytes for directory entires. That end marker takes 8 bytes, all Bytes 0xFF, ie. 0xFFFFFFFFFFFFFFFF.

I also found out that:

  • when creating a PDS member using with JCL DD, it uses the minimal 12-Bytes-long directory entries, so it fits 20 members created by JCL DD.
  • when creating PDS members using ISPF (M.1.2 or 2), it uses 42-Bytes-long directory entries, so it fits 5 members created via ISPF.

PDS Member records

Between the directory block and the first member, there is a 16-Bytes-long separator (END marker?).

eg.

00 00 00 02 02 00 00 00 00 00 00 02 03 00 05 A0
             |                       |
             |                       '- First record of member 1 (as in TTR)
             '- Last record of Directory blocks area (as in TTR)

There is also a 16-Bytes-long separator between each member (EOF marker?)

eg.

00 00 00 02 04 00 00 00 00 00 00 02 05 00 05 A0
             |                       |
             |                       '- First record of next member (as in TTR)
             '- Last record of previous member (as in TTR)

And after the last member

00 00 00 02 2C 00 00 00 FF FF FF FF FF FF FF FF
             |
             |
             '- Last record of last member (as in TTR)

Number of records per member

What I still cannot understand is the number of records per member. I can see that the space is available in the track.

Do you know where should I look?


Kind Regards

Sergio Lindo Mansilla


 

On Sat, Nov 2, 2024 at 05:44 PM, Sergio wrote:
when creating PDS members using ISPF (M.1.2 or 2), it uses 42-Bytes-long directory entries, so it fits 5 members created via ISPF.
Or 52 byte long directory entries if one of the counters in the ISPF stats exceeds 64K.
RPF and REVIEW/RFE also writes ISPF stats in the directory entries.
?
Cheers,
Rob


 

What I still cannot understand is the number of records per member. I can see that the space is available in the track.

You are looking at the way the emulated disk stores data, not the way an actual physical
3390 disk stored them. Each has different sets of overheads on the data. While you don't
see the overheads that 3390s had, the algorithim writing data records has to take account of
them.

The available space that you see in the track is the space that a physical 3390 would have
used for its overheads. A simple comparision of the largest possible block size (56664) and
2xlargest 1/2 track block size (27998) shows that the overhead of that second block is 334
bytes.

If you want to understand what you are looking at in an emulated disk


The format of a CKD header is
nn - record # on track.
kk - length of key field (00 if none)
dd dd - length of data

kk dd dd = 00 00 00 is an EOF merker


James Campbell


On 2 Nov 2024 at 17:44, Sergio via groups.io wrote:

Hi :)

Thank you all.

I was able to verify what happens inside the directory block by creating my own uncompressed 3390 disk and inspecting it with an hexadecimal editor.

### PDS Directory block

I was able to confirm the "end marker" inside the 254 bytes for directory entires. That end marker takes 8 bytes, all Bytes 0xFF, ie. `0xFFFFFFFFFFFFFFFF`.

I also found out that:

- when creating a PDS member using with JCL DD, it uses the minimal 12-Bytes-long directory entries, so it fits 20 members created by JCL DD.
- when creating PDS members using ISPF (M.1.2 or 2), it uses 42-Bytes-long directory entries, so it fits 5 members created via ISPF.

### PDS Member records

Between the directory block and the first member, there is a 16-Bytes-long separator (END marker?).

eg.

```
00 00 00 02 02 00 00 00 00 00 00 02 03 00 05 A0
| |
| '- First record of member 1 (as in TTR)
'- Last record of Directory blocks area (as in TTR)
```

There is also a 16-Bytes-long separator between each member (EOF marker?)

eg.

```
00 00 00 02 04 00 00 00 00 00 00 02 05 00 05 A0
| |
| '- First record of next member (as in TTR)
'- Last record of previous member (as in TTR)
```

And after the last member

```
00 00 00 02 2C 00 00 00 FF FF FF FF FF FF FF FF
|
|
'- Last record of last member (as in TTR)
```

### Number of records per member

What I still cannot understand is the number of records per member. I can see that the space is available in the track.

Do you know where should I look?

---

Kind Regards

Sergio Lindo Mansilla


 

PDS directory structure is very well defined.

The access method for PDS is called BPAM. To build a directory list, you use the BLDL macro.?

image.png

image.png

image.png
image.png
Then you use FIND,POINT, READ to get the data from the PDS.



Joe

On Sat, Nov 2, 2024 at 7:44?PM Sergio via <sergiolindo.empresa=[email protected]> wrote:

Hi :)

Thank you all.

I was able to verify what happens inside the directory block by creating my own uncompressed 3390 disk and inspecting it with an hexadecimal editor.

PDS Directory block

I was able to confirm the "end marker” inside the 254 bytes for directory entires. That end marker takes 8 bytes, all Bytes 0xFF, ie. 0xFFFFFFFFFFFFFFFF.

I also found out that:

  • when creating a PDS member using with JCL DD, it uses the minimal 12-Bytes-long directory entries, so it fits 20 members created by JCL DD.
  • when creating PDS members using ISPF (M.1.2 or 2), it uses 42-Bytes-long directory entries, so it fits 5 members created via ISPF.

PDS Member records

Between the directory block and the first member, there is a 16-Bytes-long separator (END marker?).

eg.

00 00 00 02 02 00 00 00 00 00 00 02 03 00 05 A0
             |                       |
             |                       '- First record of member 1 (as in TTR)
             '- Last record of Directory blocks area (as in TTR)

There is also a 16-Bytes-long separator between each member (EOF marker?)

eg.

00 00 00 02 04 00 00 00 00 00 00 02 05 00 05 A0
             |                       |
             |                       '- First record of next member (as in TTR)
             '- Last record of previous member (as in TTR)

And after the last member

00 00 00 02 2C 00 00 00 FF FF FF FF FF FF FF FF
             |
             |
             '- Last record of last member (as in TTR)

Number of records per member

What I still cannot understand is the number of records per member. I can see that the space is available in the track.

Do you know where should I look?


Kind Regards

Sergio Lindo Mansilla


 

You can also look here, beginning on page 75:?

Joe

On Mon, Nov 4, 2024 at 12:28?AM Joe Monk via <joemonk64=[email protected]> wrote:
PDS directory structure is very well defined.

The access method for PDS is called BPAM. To build a directory list, you use the BLDL macro.?

image.png

image.png

image.png
image.png
Then you use FIND,POINT, READ to get the data from the PDS.



Joe

On Sat, Nov 2, 2024 at 7:44?PM Sergio via <sergiolindo.empresa=[email protected]> wrote:

Hi :)

Thank you all.

I was able to verify what happens inside the directory block by creating my own uncompressed 3390 disk and inspecting it with an hexadecimal editor.

PDS Directory block

I was able to confirm the "end marker” inside the 254 bytes for directory entires. That end marker takes 8 bytes, all Bytes 0xFF, ie. 0xFFFFFFFFFFFFFFFF.

I also found out that:

  • when creating a PDS member using with JCL DD, it uses the minimal 12-Bytes-long directory entries, so it fits 20 members created by JCL DD.
  • when creating PDS members using ISPF (M.1.2 or 2), it uses 42-Bytes-long directory entries, so it fits 5 members created via ISPF.

PDS Member records

Between the directory block and the first member, there is a 16-Bytes-long separator (END marker?).

eg.

00 00 00 02 02 00 00 00 00 00 00 02 03 00 05 A0
             |                       |
             |                       '- First record of member 1 (as in TTR)
             '- Last record of Directory blocks area (as in TTR)

There is also a 16-Bytes-long separator between each member (EOF marker?)

eg.

00 00 00 02 04 00 00 00 00 00 00 02 05 00 05 A0
             |                       |
             |                       '- First record of next member (as in TTR)
             '- Last record of previous member (as in TTR)

And after the last member

00 00 00 02 2C 00 00 00 FF FF FF FF FF FF FF FF
             |
             |
             '- Last record of last member (as in TTR)

Number of records per member

What I still cannot understand is the number of records per member. I can see that the space is available in the track.

Do you know where should I look?


Kind Regards

Sergio Lindo Mansilla


 

It is not that easy to see what Sergio is asking about, so i made a visualization.
When PDS has only one member with size of one track, oddly enough there is some space left at the end.
What its purpose remains unknown...
Best wishes,
Andre


 

开云体育

Dear all,

?

Let’s go back to the 60s where the CKD DASD Devices were developed. At that time a lot of constraints existed, especially concerning main storage. Supervisor functions had to work in a couple of hundred bytes, no space was available to read blocks of 4K or even more into storage.

Concerning PDS Files the directory was designed with 256 data byte and a key of 8 bytes containing the key of the last entry in the block. (Note that a directory is always in alphabetical order. New members are ‘stowed’ in the corresponding place). Key and data area headed by a count field of 8 bytes with CCHHRKLL where K is key length and LL the data length. To summarize: A directory block consists of a 8-byte Count field, a 8-byte key field and a 256-byte data field.

?

Now jump into a simplified channel program to locate the correct directory block:

CCW 1: Search key equal or high

CCW 2: TIC *-8

CCW 3: Read Data

?

The first command compares the key given by the program with the key read from disk, if the key from disk is lower, the channel continues with the next command which is a branch back to the first command (TIC = Transfer in channel). But if the key is equal or high the channel skips the next command and executes the third command to read the data.

Now this all happens in real time while the read head ‘travels’ over the CKD fields on the disk. The channels electronics takes some microseconds to take this decision after receiving the key. Keep in mind that the read head is now just behind the key area. To give the channel a chance to react accordingly a space is necessary between key and data so that when CCW 3 is sent to the device the read head is still before the data field so that the data can be read in.

With this simple channel program and multitrack operation, it’s possible to search for the correct block in a PDS directory who has the size of one cylinder with one channel program.

?

So the “gaps” between the CKD field had to be big enough for slowest CPU where the Disk Model was supposed to be attachable.

?

Bottom line: The shorter you make the blocks and if maybe you add keys the less data can be

stored on a track due to this ‘gaps’ that were necessary with this design and constraints.

?

Best,

Silvio

?

?

?

?

?

From: [email protected] <[email protected]> On Behalf Of Andre via groups.io
Sent: Monday, 4 November 2024 12:55
To: [email protected]
Subject: Re: [H390-MVS] Understanding PDS in MVS 3.8

?

It is not that easy to see what Sergio is asking about, so i made a visualization.

When PDS has only one member with size of one track, oddly enough there is some space left at the end.

What its purpose remains unknown...

Best wishes,

Andre


 

" To summarize: A directory block consists of a 8-byte Count field, a 8-byte key field and a 256-byte data field."

image.png

As you can see, the DASD count field is unused. The key field contains the name of the last entry in this directory block. The reason the count field is unused is that all TTRs in a PDS are relative, so that a PDS can be moved without having to re-calc all of the TTRs in the directory. The PDS directory count field (first 2 bytes of the entry) specify the length?of this directory block.
image.png

So, you search the keys (the FIND macro) until you come to the correct directory block. Then you read and process the directory block to locate the TTR of the member. Since you should know the LRECL and BLKSIZE from the DCB, you can get the next TTR, and do the arithmetic?to tell you how many tracks you need to read to get the member data. (TTR of first record of this member, subtracted from TTR of the first record of next member, will give you the number of tracks to read).? ?

The PDS is described by macro IHAPDS.

Joe

On Mon, Nov 4, 2024 at 7:04?AM Silvio Losa via <silvio.losa=[email protected]> wrote:

Dear all,

?

Let’s go back to the 60s where the CKD DASD Devices were developed. At that time a lot of constraints existed, especially concerning main storage. Supervisor functions had to work in a couple of hundred bytes, no space was available to read blocks of 4K or even more into storage.

Concerning PDS Files the directory was designed with 256 data byte and a key of 8 bytes containing the key of the last entry in the block. (Note that a directory is always in alphabetical order. New members are ‘stowed’ in the corresponding place). Key and data area headed by a count field of 8 bytes with CCHHRKLL where K is key length and LL the data length. To summarize: A directory block consists of a 8-byte Count field, a 8-byte key field and a 256-byte data field.

?

Now jump into a simplified channel program to locate the correct directory block:

CCW 1: Search key equal or high

CCW 2: TIC *-8

CCW 3: Read Data

?

The first command compares the key given by the program with the key read from disk, if the key from disk is lower, the channel continues with the next command which is a branch back to the first command (TIC = Transfer in channel). But if the key is equal or high the channel skips the next command and executes the third command to read the data.

Now this all happens in real time while the read head ‘travels’ over the CKD fields on the disk. The channels electronics takes some microseconds to take this decision after receiving the key. Keep in mind that the read head is now just behind the key area. To give the channel a chance to react accordingly a space is necessary between key and data so that when CCW 3 is sent to the device the read head is still before the data field so that the data can be read in.

With this simple channel program and multitrack operation, it’s possible to search for the correct block in a PDS directory who has the size of one cylinder with one channel program.

?

So the “gaps” between the CKD field had to be big enough for slowest CPU where the Disk Model was supposed to be attachable.

?

Bottom line: The shorter you make the blocks and if maybe you add keys the less data can be

stored on a track due to this ‘gaps’ that were necessary with this design and constraints.

?

Best,

Silvio

?

?

?

?

?

From: [email protected] <[email protected]> On Behalf Of Andre via
Sent: Monday, 4 November 2024 12:55
To: [email protected]
Subject: Re: [H390-MVS] Understanding PDS in MVS 3.8

?

It is not that easy to see what Sergio is asking about, so i made a visualization.

When PDS has only one member with size of one track, oddly enough there is some space left at the end.

What its purpose remains unknown...

Best wishes,

Andre


 

开云体育

Hi Joe,

?

Thanks for the illustration.

Just to make it clear. A Count field in a CKD device is always there by architecture and contains as I wrote CCHHRKLL. In detail the Cylinder, Head, Record, key length and data length. This holds true for whatever block you write.? The key field is optional. You find block with keys in VTOC (44 byte DSN), PDS Directory (8-byte Member Name), ISAM Files and keyed DAM files.

?

Silvio

?

?

?

From: [email protected] <[email protected]> On Behalf Of Joe Monk
Sent: Monday, 4 November 2024 17:08
To: [email protected]
Subject: Re: [H390-MVS] Understanding PDS in MVS 3.8

?

" To summarize: A directory block consists of a 8-byte Count field, a 8-byte key field and a 256-byte data field."

?

As you can see, the DASD count field is unused. The key field contains the name of the last entry in this directory block. The reason the count field is unused is that all TTRs in a PDS are relative, so that a PDS can be moved without having to re-calc all of the TTRs in the directory. The PDS directory count field (first 2 bytes of the entry) specify the length?of this directory block.


So, you search the keys (the FIND macro) until you come to the correct directory block. Then you read and process the directory block to locate the TTR of the member. Since you should know the LRECL and BLKSIZE from the DCB, you can get the next TTR, and do the arithmetic?to tell you how many tracks you need to read to get the member data. (TTR of first record of this member, subtracted from TTR of the first record of next member, will give you the number of tracks to read).? ?

The PDS is described by macro IHAPDS.

?

Joe

?

On Mon, Nov 4, 2024 at 7:04?AM Silvio Losa via <silvio.losa=[email protected]> wrote:

Dear all,

?

Let’s go back to the 60s where the CKD DASD Devices were developed. At that time a lot of constraints existed, especially concerning main storage. Supervisor functions had to work in a couple of hundred bytes, no space was available to read blocks of 4K or even more into storage.

Concerning PDS Files the directory was designed with 256 data byte and a key of 8 bytes containing the key of the last entry in the block. (Note that a directory is always in alphabetical order. New members are ‘stowed’ in the corresponding place). Key and data area headed by a count field of 8 bytes with CCHHRKLL where K is key length and LL the data length. To summarize: A directory block consists of a 8-byte Count field, a 8-byte key field and a 256-byte data field.

?

Now jump into a simplified channel program to locate the correct directory block:

CCW 1: Search key equal or high

CCW 2: TIC *-8

CCW 3: Read Data

?

The first command compares the key given by the program with the key read from disk, if the key from disk is lower, the channel continues with the next command which is a branch back to the first command (TIC = Transfer in channel). But if the key is equal or high the channel skips the next command and executes the third command to read the data.

Now this all happens in real time while the read head ‘travels’ over the CKD fields on the disk. The channels electronics takes some microseconds to take this decision after receiving the key. Keep in mind that the read head is now just behind the key area. To give the channel a chance to react accordingly a space is necessary between key and data so that when CCW 3 is sent to the device the read head is still before the data field so that the data can be read in.

With this simple channel program and multitrack operation, it’s possible to search for the correct block in a PDS directory who has the size of one cylinder with one channel program.

?

So the “gaps” between the CKD field had to be big enough for slowest CPU where the Disk Model was supposed to be attachable.

?

Bottom line: The shorter you make the blocks and if maybe you add keys the less data can be

stored on a track due to this ‘gaps’ that were necessary with this design and constraints.

?

Best,

Silvio

?

?

?

?

?

From: [email protected] <[email protected]> On Behalf Of Andre via
Sent: Monday, 4 November 2024 12:55
To: [email protected]
Subject: Re: [H390-MVS] Understanding PDS in MVS 3.8

?

It is not that easy to see what Sergio is asking about, so i made a visualization.

When PDS has only one member with size of one track, oddly enough there is some space left at the end.

What its purpose remains unknown...

Best wishes,

Andre


 

Sergio,
?
It looks like only i was able to reproduce your problem, and understand what you were talking about.
I confirm that when PS dataset is created it is possible to use whole allocated space and add 698 lines of text to it,
but when PO(PDS) dataset is used, somehow there is lots of free space left, even more if number of members increased.
It is visible with hex editor, and i was looking for explanation everywhere. No one really knows why, and it is NOT documented.
As you have pointed out, with only one member it is the space for almost 31 full lines of text at the end of dataset - completely empty.
Did you find any information about cause of it?
?
Best wishes,
Andre


 

开云体育

Hi Andre,

I haven’t found the reason. I still don’t know the cause.

Kind Regards
--
Sergio Lindo Mansilla
Software developer with DevOps?tendencies
Portfolio:?https://binary-sequence.github.io/

El 16.11.2024, a las 20:34, Andre via groups.io <procritic@...> escribió:

Sergio,
?
It looks like only i was able to reproduce your problem, and understand what you were talking about.
I confirm that when PS dataset is created it is possible to use whole allocated space and add 698 lines of text to it,
but when PO(PDS) dataset is used, somehow there is lots of free space left, even more if number of members increased.
It is visible with hex editor, and i was looking for explanation everywhere. No one really knows why, and it is NOT documented.
As you have pointed out, with only one member it is the space for almost 31 full lines of text at the end of dataset - completely empty.
Did you find any information about cause of it?
?
Best wishes,
Andre


 

It was explained in this post from November 4th
??
The interblock gap (big)?is what is taking the space. I don’t remember how big it is on a 3390. A sequential data set only has them between each data block. A pds has 256 byte blocks with a gap between each block. Then there is one block that makes end of file of the directory. The number of directory blocks is set when the dataset is allocated.?

The gap is not data just reserved by the disk drive and the control unit.


LaddievHsnus




On Saturday, November 16, 2024, 1:56 PM, Sergio via groups.io <sergiolindo.empresa@...> wrote:

Hi Andre,

I haven’t found the reason. I still don’t know the cause.

Kind Regards
--
Sergio Lindo Mansilla
Software developer with DevOps?tendencies
Portfolio:?https://binary-sequence.github.io/

El 16.11.2024, a las 20:34, Andre via groups.io <procritic@...> escribió:

Sergio,
?
It looks like only i was able to reproduce your problem, and understand what you were talking about.
I confirm that when PS dataset is created it is possible to use whole allocated space and add 698 lines of text to it,
but when PO(PDS) dataset is used, somehow there is lots of free space left, even more if number of members increased.
It is visible with hex editor, and i was looking for explanation everywhere. No one really knows why, and it is NOT documented.
As you have pointed out, with only one member it is the space for almost 31 full lines of text at the end of dataset - completely empty.
Did you find any information about cause of it?
?
Best wishes,
Andre