z/OS MVS Programming: Callable Services for High-Level Languages
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


CSRIRP — Define a reference pattern

z/OS MVS Programming: Callable Services for High-Level Languages
SA23-1377-02

Call CSRIRP to define a reference pattern for a large data area, such as an array, that you are about to reference. Through CSRIRP, you identify the data area and describe the reference pattern. Additionally, you tell the system how many bytes of data you want it to bring into central storage on a page fault (that is, each time the program references data that is not in central storage). This action might significantly improve the performance of the program.

Two parameters define the reference pattern:
  • unitsize refers to a reference unit — a grouping of consecutive bytes that the program references.
  • gapsize refers to a gap — a grouping of consecutive bytes that the program repeatedly skips over; when a pattern has a gap, reference units and gaps alternate throughout the data area.

Reference units and gaps must each be uniform in size and appear throughout the data area at repeating intervals.

Another parameter, units, allows you to specify how many reference units you want the system to bring into central storage each time the program references data that is not in central storage.

When you end the reference pattern in that data area, call the CSRRRP service.

Code the CALL following the syntax of the high-level language you are using and specifying all parameters in the order shown below. For parameters that CSRIRP uses to obtain input values, assign appropriate values.

On entry to CSRIRP, register 1 points to the reference pattern service parameter list. Note that when a FORTRAN program calls CSRIRP, and it is running in access register (AR) mode, register 1 does not point to the reference pattern service parameter list; it points to a list of parameter addresses. Each address in this list points to the data in the corresponding parameter of the reference pattern service parameter list. To use reference pattern services in this environment, the caller must provide an assembler interface routine to convert the FORTRAN parameter list to the form expected by reference services.

Assign values, acceptable to CSRIRP, to low_address, size, direction, unitsize, gapsize, and units. CSRIRP returns values in return_code and reason_code.

CALL statement Parameters

 
CALL CSRIRP

 
(low_address
,size
,direction
,unitsize
,gapsize
,units
,return_code
,reason_code)
 

The parameters are explained as follows:
low_address
Specifies the beginning point of the data to be referenced.

low_address is the name of the data that resides at the beginning of the data area. When the direction is forward and a gap exists, low_address must identify the beginning of a reference unit.

,size
Identifies the size, in bytes, of the data area to be accessed. When direction is backward and a gap exists, the value of size must be such that the first data element the program references is the high-address end of a reference unit.

Define size as integer data of length 4.

,direction
Indicates the direction of reference, either "+1" for forward or "-1" for backward.

Define direction as integer data of length 4.

,unitsize
Specifies the size of a reference unit.

If the pattern does not have a gap, define the reference unit as a logical grouping according to the structure of the data array. Examples are: one row, a number of rows, one element, or one page (4096 bytes). If the pattern has a gap, define unitsize as the grouping of bytes that the program references and gap as the grouping of bytes that the program skips over.

Define unitsize as integer data of length 4.

,gapsize
Specifies the size, in bytes, of a gap. If the pattern has a gap, define the gap as the grouping of bytes that the program skips over. If the pattern does not have a gap, use the value "0".

Define gapsize as integer data of length 4.

,units
Indicates how many reference units the system is to bring into central storage each time the program needs data that is not in central storage.

Define units as integer data of length 4.

,return_code
When CSRIRP completes, return_code contains the return code. Define return_code as integer data of length 4.
,reason_code
When CSRIRP completes, reason_code contains the reason code. Define reason_code as integer data of length 4.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014