Changing a view in a window

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.

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.

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:

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.