Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

DIV function: RESET

The RESET function can be used to undo changes in window pages which belong to a region defined by SPAN and OFFSET.

This is done by setting each modified page to the initial state so that the page will be read from the file when accessed. If the page belongs to a window that is defined with DISPOS=*UNCHNG, it will be read from the file upon access only if it has already been written to the file with SAVE; otherwise, it is initialized with X'00'.

Specifying RELEASE=*YES resets not only unmodified pages, but all pages of the defined region to the initial state. This allows file pages that have been updated by a parallel write-authorized user to be displayed in the window.

The RESET function evaluates only the function operands described below.

Format FCT=*RESET

Operation

Operands

DIV

[,FCT = *RESET / adr / (r)]

[,ID = adr / (r)]

[,OFFSET = number / adr / *equ / (r)]

[,SPAN = number / adr / *equ / (r)]

[,RELEASE = *NO / *YES / adr / (r)]

MF = L

MF = E,PARAM = adr / (r)

MF = D[,PREFIX = D / pre]

MF = C / M

[,PREFIX = D / pre]

[,MACID = IVP / macid]

Operand descriptions

FCT

Specifies the DIV function to be executed.

Only a direct specification is allowed for the MF=L form.

= *RESET
The DIV function RESET is used to undo changes in window pages that belong to a file region defined by SPAN and OFFSET (for further details, see "DIV function: RESET").

= addr
Symbolic address of a 1-byte field containing the value for the RESET function (field DIVPRES, see the layout of the parameter list on "DIV function: CLOSE").

= (r)
Register containing the value for the RESET function.

ID

Specifies the OPEN for which the RESET function is to be executed.

If the same parameter list is used as in the OPEN, the ID need not be specified, since the ID of OPEN will already be in the parameter list.

If a different parameter list is used than the one for OPEN, the ID can be specified here and be transferred to the new parameter list by using the MF=M form of the DIV macro.

ID cannot be specified with the MF=L form.

= addr
Symbolic address of an 8-byte field containing the identification.

= (r)
Register containing the address of the 8-byte field.

MACID

See the description under the format FCT=*OPEN on "DIV function: OPEN".

MF

The forms of the MF operands are described in detail in the appendix ("Macro types").

OFFSET

OFFSET and SPAN specify the file region (in the window) for which window pages are to be reset to their initial state.

  • OFFSET specifies the first 4K page of the file region; SPAN specifies the length of that region in 4K pages.

  • SPAN defines the number of 4-Kbyte blocks in the file region (i.e. the length of the region).

The RESET function applies to all window pages in the file region defined by SPAN and OFFSET.

Default value:

OFFSET = 0

If no value is specified for SPAN (or SPAN = 0), the file region is selected so as to enable the last page of the last window to be included in the region. If neither OFFSET or SPAN is specified, all pages of all windows defined for the OPEN are taken into account.

Only a direct specification is allowed for the MF=L form.

= number
Specifies the first block of the file region to be mapped in 4KB blocks. The value of OFFSET is limited by the maximum size of a file in 4-KB pages minus 1:

0 <= number <= 8388606 for LARGE_FILE=*FORBIDDEN

0 <= number <= 1073741823 for LARGE_FILE=*ALLOWED

= addr
Symbolic address of a 4-byte field containing the length of the file region in 4K blocks (binary).

= *equ
Equate that specifies the length of the file region in 4K blocks (binary). The '*' character must precede the name of the equate.

= (r)
Register containing the length of the file region in 4K blocks (binary).

PARAM

See the description under the format FCT=*OPEN on "DIV function: OPEN".

PREFIX

See the description under the format FCT=*OPEN on "DIV function: OPEN".

RELEASE

Defines whether only modified pages are to be reset to the initial state.

Default value:

RELEASE=*NO

Only a direct specification is allowed for the MF=L form.

= *NO
All modified pages are returned to the initial state.

As a result, when such a page is accessed, the corresponding page is read in from the file if the page lies in a DISPOS=*OBJECT window. If the page lies in a window that is defined with DISPOS=*UNCHNG, it is initialized with X'00' upon access if it has not yet been written to file with SAVE. Otherwise, it is read from the file when accessed.

Pages in the initial state that follow the logical last page of the file are always initialized with X'00' when accessed.

= *YES
All window pages – both modified and unmodified – in the specified region are reset to the initial state, with the consequences described above.

= addr
Symbolic address of a 1-byte field containing a value for RELEASE (DIVPRNO | DIVPRYES; see the layout of the parameter list on "DIV function: CLOSE").

= (r)
Register containing a value for RELEASE.

SPAN

SPAN and OFFSET define the file region to which the RESET function applies.

Default value:

SPAN = 0

For a description of SPAN see the description of the OFFSET operand.

Only a direct specification is allowed for the MF=L form.

= number
Specifies the first block of the file region to be mapped in virtual address space. The value of SPAN is limited by the maximum size of a file in 4-KB pages:

0 <= number <= 8388607 for LARGE_FILE=*FORBIDDEN

0 <= number <= 1073741824 for LARGE_FILE=*ALLOWED

= addr
Symbolic address of a 4-byte field which defines the length of the file region in 4K blocks (binary).

= *equ
Equate to define the length of the file region in 4K blocks (binary). The '*' character must precede the name of the equate.

= (r)
Register containing the length of the file region in 4K blocks (binary).