On Sat, Nov 11, 2023 at 08:59:07AM -0500, David S. wrote:
> ... I'd like to find out if there's any way to achieve *true*
> Skip-Sequential processing with a Fixed Block Sequential File with a fairly
> short record length (i.e. DCB=(DSORG=PS,RECFM=FB,LRECL=80)?

> question is a DSORG=PS *Sequential* file, *not* VSAM. This is a rock-solid
> requirement and cannot be changed. 

> Sequential processing *must* begin at specified starting point and
> there can be *no* reading of any records prior to that point.

I take this to mean that the support routines may read a few other records
or blocks but they should not be returned to the application program.

  (VSAM skip-sequential is going to read the whole CI which might include
  records before the one requested...)

> My gut feeling is it *cannot* be done - at least not with RECFM=FB. 

I'm assuming that the DSORG=PS RECFM=FB file is huge.  If the process
which creates the input file could be changed to make it FBS then previous
answers have covered what's necessary to calculate the correct block to
start the sequential reads via BSAM using point. 

If it is only FB and not FBS then it's a bit harder.  Perhaps it's 
been written DISP=MOD and thus is likely to have some short blocks.

Possible plans:

A. build an index of record number to position in the file and
   then use this to find where to start reading.

   If the index was kept around the huge file could be skip-seq read
   several times without rebuilding the index.  The index might be pretty
   small as it only needs to keep the record number for say each track
   or cylinder.

   The index could be built by reading the whole input file or the data
   transfer could be minimized by using EXCP with read count CCWs to
   collect block sizes and locations.  This might also minimize the real
   time as I'd expect that some "virtual disk" boxes might even be able
   to execute the read count CCWs without waiting for disk revolutions
   (and of course, not transfering the data, just the count fields).

B. guess where the record might be and adjust the guess as needed

   If the records have some identifying information in them so that the
   position in the file (record number) record number isn't really the
   only way to find the correct record, then it should be possible to
   guess a likely location and search the blocks around there.  If there
   are only few short blocks this might only involve reading a block or
   two more than the FBS case.

----------------------------------------------------------------------
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