Call CSREVW if you reference data in a sequential pattern and you
want to:
- Map a window to one or more blocks (4096 bytes) of a data object.
If you specified scrolling when you called CSRIDAC to identify the
object, CSREVW maps the window to the blocks in the scroll area and
maps the scroll area to the object.
- Specify how many blocks window services is to bring into the window
each time CSREVW needs more data from the object.
Mapping a data object enables your program to access the data that
is viewed through the window the same way it accesses other data in
your storage.
The CSREVW and CSRVIEW services differ on how to specify sequential
access:
- If you use CSRVIEW and specify sequential, when you reference
data that is not in your window, window services reads 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 the availability of central storage.
- If you use CSREVW, you can specify the number of additional consecutive
blocks that window services reads into the window at one time. The
number ranges from 0 through 255.
Use CSREVW if your program has sequential access and can benefit
from having more than 16 blocks come into a window at one time, or
fewer than 16 blocks at one time.
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 CSREVW uses to obtain input values, assign appropriate
values. For parameters that CSREVW ignores, assign any value that
is valid for the particular parameter’s data type.
CALL statement |
Parameters |
---|
CALL CSREVW
|
(operation_type
,object_id
,offset
,span
,window_name
,usage
,disposition
,pfcount
,return_code
,reason_code)
|
- operation_type
- Specify BEGIN to request that CSREVW map a data object.
- ,object_id
- Specifies the object identifier. Supply the object identifier
that CSRIDAC returned when you obtained access to the object.
Define object_id as
character data of length 8.
- ,offset
- Specifies the offset of the view into the object. Specify the
offset in blocks of 4096 bytes.
Define offset as
integer data of length 4.
- ,span
- Specifies the window size in blocks of 4096 bytes.
Define span as
integer data of length 4.
- ,window_name
- Specifies the symbolic name you assigned to the window in your
address space.
- ,usage
- Specify SEQ to tell CSREVW that the expected pattern of references
to data in the object will be sequential.
Define this field as
character data of length 6. Pad the string on the right with 1 blank.
- ,disposition
- Defines how CSREVW is to handle data that is in the window when
you begin a view. When you specify CSREVW BEGIN and a disposition
of:
- REPLACE
- The first time you reference a block to which the window is mapped,
CSREVW replaces the data in the window with the data from the referenced
block.
- RETAIN®
- When you reference a block to which the window is mapped, the
data in the window remains unchanged. When you call CSRSAVE to save
the mapped blocks, CSRSAVE saves all of the mapped blocks because
CSRSAVE considers them changed.
Define disposition as character
data of length 7. If you specify RETAIN,
pad the string on the right with 1 blank.
- ,pfcount
- Specifies the number of additional blocks you want window services
to bring into the window each time your program references data that
is not already in the window. The number you specify is added to
the minimum of one block that window services always brings in. That
is, if you specify a value of 20, window services brings in a total
of 21. The number of additional blocks ranges from zero through 255.
Define pfcount as
integer data of length 4.
- ,return_code
- When CSREVW completes, return_code contains
the return code. Define return_code as integer
data of length 4.
Return codes and reason codes are explained under Return codes and reason codes.
- ,reason_code
- When CSREVW completes, reason_code contains
the reason code. Define reason_code as integer
data of length 4.
Return codes and reason codes are explained under Return codes and reason codes.