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 - Data In Virtual

Data In Virtual (DIV) is an access method that differs from the traditional access methods such as ISAM, SAM and UPAM because it does not require a file to be structured into records and blocks and works without I/O buffers, and operations such as GET or PUT. DIV is an object-oriented access method that is particularly suitable for processing unstructured data (Binary Large OBjects (BLOBs)).

The MAP function of DIV maps the contents of a file to an area in virtual address space (program space, data space). This area in virtual address space then forms a window in which pages of the file appear when they are accessed.

Data can thus be accessed using CPU instructions. Any data that has been modified in the window can be written back to the file with the DIV function SAVE.

DIV can be used to process NK-PAM files which contain no management information (BLOCK-CONTR=NO). Cross-system file access (RFA) is not supported.

Besides enabling object-oriented access, DIV reduces the number of accesses to disk and thus improves performance dramatically.

DIV is suitable for applications that do not require data to be structured into records and blocks. High performance gains are achieved when data that has already been read into the window by an earlier access operation is accessed repeatedly.

The FCT=*MAP and FCT=*UNMAP functions of the DIV macro are used to open and close windows for a program space. SPID=0 must always be specified for the SPID operand (data space ID).

DIV functions

DIV functions are used by calling the DIV macro. The following are the basic EAM functions:

Function

Meaning

OPEN

Open a file

MAP

Define a window (i.e. a work area) in the virtual address space

SAVE

write modified pages from the window back to the file on disk

RESET

undo changes in the window

UNMAP

release windows in virtual address space

CLOSE

close a file, releasing any existing windows with default values, if applicable

Table 43: Functions of the DIV macro

The Adapter Window Services can be used in some high-level programming languages to invoke DIV functions from programs via a CALL interface. These programming languages are:

  • COBOL (Version 2.0 onward)

  • FORTRAN (Version 2.2 onward)

  • PL/1 (Version 4.1 onward)

  • C (Version 2.0 onward)

ILCS linkage is required in order to call DIV functions via a CALL interface. The Adapter Window Services are supplied as a runtime library (OML) in a file called SYSLIB.DWS.120 under the systems support ID TSOS. When DIV is invoked from the Window Services, not all DIV functions are available or are fully available.

For detailed information on the CALL interface, see the appendix in the “DMS Macros” manual [1 (Related publications)].