>> As long no one ever uses DISP=MOD

...or checkpoints. Checkpoints can cause short blocks to be written.

(My knowledge is with IMS/DB GSAM checkpoints.)

-----Original Message-----
From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> On Behalf 
Of Jon Perryman
Sent: Sunday, November 12, 2023 5:18 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Is True Skip-Sequential Processing Possible with RECFM=FB,DSORG=PS?

Everyone is making this far more complicated than it needs to be. Positioning a 
file is about you designing a method that can calculate a position on the disk 
that meets your requirements. z/OS, Unix, CMS, z/VSE and MS-Windows have file / 
dataset positioning because it greatly reduces I/O. There are many designs to 
available to calculate position.

Specifically asked was z/OS RECFM=FB. As long no one ever uses DISP=MOD, then 
the calculation is simple because number of records per block and blocks per 
track is consistent. You simply divide record number by records per block 
giving the block number used in the point and remainder is the number of 
records you must read after the point. Not quite correct but you get the idea.

If you need DISP=MOD functionality, then you must create the functionality. All 
programs needing DISP=MOD must open the file for update, position to the last 
block and read until EOF.

The simpler solution is VSAM RRDS or ESDS which allows you to position to a 
specific record number without the worry of DISP=MOD problems.

As I said before, there are many solutions and your requirements will determine 
which solution best fits your needs.

Suggestions have been made for a USS file. The advantage is that positioning is 
at the byte level instead of block. The calculation is greatly simplified to 
records times record size and DISP=MOD is greatly simplified because Unix does 
an append to the end of the file. The drawback is that the read record size 
must be handled by the programmer.

Most of the suggestions are viable solutions. You could even maintain an index 
file but then RRDS already does this for you. The important thing is a 
consistent method for POINT is determining the block and record for positioning.

On Sun, 12 Nov 2023 12:17:12 -0700, Paul Gilmartin <paulgboul...@aim.com> wrote:
>what does the EXECIO linenum option do?
>
>EXECIO arose on CMS and antedates REXX.  CMS files are indexed by
>line number.  I'd expect EXECIO on CMS to do True Skip-Sequential
>Processing.  Less likely on z/OS, even for RECFM=FBS.

As for CMS files, It's very doubtful they are indexed because there is no real 
benefit when the majority of files are processed sequentially. Records in a CMS 
file are probably stored in what z/OS people would think of as RECFM=VBS where 
blocksize is probably track size.

I doubt that CMS files have line number associations. CMS edit has number 
on/off but it has a different use. More likely is that CMS keeps a counter with 
the record number.


Reply via email to