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


Changing a view in a window

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

To change the view in a window so you can view a different part of the same object or view a different object, you must first terminate the current view. To terminate the view, whether the view was mapped by CSRVIEW or CSREVW, call CSRVIEW and supply a value of END for operation_type. You must also identify the object, identify the window, identify the blocks you are currently viewing, and specify a disposition for the data that is in the window. For a description of CSRVIEW parameters and return codes, see CSRVIEW — View an object.

To identify the object, supply an object identifier for object_id. The value supplied for object_id must be the value you supplied when you established the view.

To identify the window, supply the window name for window_name. The value supplied for window_name must be the same value you supplied when you established the view.

To identify the blocks you are currently viewing, supply values for offset and span. The values you supply must be the same values you supplied for offset and span when you established the view.

To specify a disposition for the data you are currently viewing, supply a value for disposition. The value determines what data will be in the window after the CALL to CSRVIEW completes.
  • For a permanent object that has no scroll area:
    • To retain the data that is currently in the window, supply a value of RETAIN® for disposition.
    • To discard the data that is currently in the window, supply a value of REPLACE for disposition. After the operation completes, the window contents are unpredictable.

    For example, assume that a window is mapped to one block of a permanent object that has no scroll area. The window contains the character string AAA……A and the block to which the window is mapped contains BBB……B. If you specify a value of RETAIN, upon completion of the CALL, the window still contains AAA……A, and the mapped block contains BBB……B. If you specify a value of REPLACE, upon completion of the CALL, the window contents are unpredictable and the mapped block still contains BBB……B.

  • For a permanent object that has a scroll area or for a temporary object:
    • To retain the data that is currently in the window, supply a value of RETAIN for disposition. CSRVIEW also updates the mapped blocks of the scroll area or temporary object so that they contain the same data as the window.
    • To discard the data that is currently in the window, supply a value of REPLACE for disposition. Upon completion of the operation, the window contents are unpredictable.

    For example, assume that a window is mapped to one block of a temporary object. The window contains the character string AAA……A and the block to which the window is mapped contains BBB……B. If you specify a value of RETAIN, upon completion of the CALL, the window still contains AAA……A and the mapped block of the object also contains AAA……A. If you specify a value of REPLACE, upon completion of the CALL, the window contents are unpredictable and the mapped block still contains BBB……B.

CSRVIEW ignores the values you assign to the other parameters.

When you terminate the view of an object, the type of object that is mapped and the value you specify for disposition determine whether CSRVIEW updates the mapped blocks. CSRVIEW updates the mapped blocks of a temporary object or a permanent object’s scroll area if you specify a disposition of RETAIN. In all other cases, to update the mapped blocks, call the appropriate service before terminating the view:
  • To update a temporary object, or to update the scroll area of a permanent object, call CSRSCOT.
  • To update an object on DASD, call CSRSAVE.

Upon successful completion of the CSRVIEW operation, the content of the window depends on the value specified for disposition. The window is no longer mapped to a scroll area or to an object, however. The storage used for the window is available for other use, perhaps to use as a window for a different part of the same object or to use as a window for a different object.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014