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