Defining the expected reference pattern

You must tell window services whether you intend to reference the blocks of an object sequentially or randomly. An intention to access randomly tells window services to transfer one block (4096 bytes) of data into the window at a time. An intention to access sequentially tells window services to transfer more than one block into your window at one time. The performance gain is in having blocks of data already in central storage at the time the program needs to reference them. You specify the intent on either CSRVIEW or CSREVW, two services that differ on how to specify sequential access.
  • CSRVIEW allows you a choice between random or sequential access.

    If you specify RANDOM, when you reference data that is not in your window, window services brings in one block — the one that contains the data your program references.

    If you specify SEQ for sequential, when you reference data that is not in your window, window services brings in up to 16 blocks — the one that contains the data your program requests, plus the next 15 consecutive blocks. The number of consecutive blocks varies, depending on the size of the window and availability of central storage. Use CSRVIEW if you are going to do one of the following:
    • Access randomly
    • Access sequentially, and you are satisfied with a maximum of 16 blocks coming into the window at a time.
  • CSREVW is for sequential access only. It allows you to specify the maximum number of consecutive blocks that window services brings into the window at one time. The number ranges from one block through 256 blocks. Use CSREVW if you want fewer than 16 blocks or more than 16 blocks at one time. Programs that benefit from having more than 16 blocks come into a window at one time reference arrays that are greater than one megabyte. Often these programs perform significant amounts of numerically intensive computations.

To specify the reference pattern on CSRVIEW, supply a value of SEQ or RANDOM for usage.

To specify the reference pattern on CSREVW, supply a number from 0 through 255 for pfcount. pfcount represents the number of blocks window services will bring into the window, in addition to the one that it always brings in.

Note that window services brings in multiple pages differently depending on whether your object is permanent or temporary and whether the system has moved pages of your data from central storage to make those pages of central available for other programs. The rule is that SEQ on CSRVIEW and pfcount on CSREVW apply to:
  • A permanent object when movement is from the object on DASD to central storage
  • A temporary object when your program has scrolled the data out and references it again.

SEQ and pfcount do not apply after the system has moved data (either changed or unchanged) to auxiliary or expanded storage, and your program again references it, requiring the system to bring the data back to central storage.

End the view whether established with CSRVIEW or CSREVW, with CSRVIEW END.