IBM Metal C

Examples

Example 9. Data In Virtual

The data in virtual services provides analogous functionality to an LUW memory file. When used with a VSAM linear data set, data persistence can be achieved. DIV services processes application data in 4096-byte (4K-byte) units on 4K-byte boundaries called blocks. The application data resides in what is called a data-in-virtual object. The DIV is a contiguous stream of data, with no record boundaries. The data object can be either a VSAM linear data set or a non-shared standard hiperspace. Using a VSAM LDS provides persistence, whereas a hyperspace only provides temporary storage. For large data sets with random access to the data, a DIV may provide a good data access mechanism.

This routine was developed to create a DIV using Metal-C. The routine takes three input parameters, ddname, entry size and number of entries to create. It then creates and saves the DIV in the associated VSAM LDS.

DIV Services

The DIV services invoked are:

Execution JCL

The execution JCL would look something like this:

//TESTQUE  EXEC PGM=DIV,                             
//   PARM='ENTRIES=1000,DDNAME=TESTQUE1,LENGTH=80'   
//STEPLIB  DD  DSN=DEVEL.XXXXX.LOAD,DISP=SHR         
//TESTQUE1 DD  DSN=DEVEL.TESTQUE,DISP=SHR  <== VSAM LDS     
//SYSUDUMP DD  SYSOUT=*                              
//SYSPRINT DD  SYSOUT=*                              

Where:

C Source

References

  1. z/OS MVS Programming: Assembler Services Guide
  2. z/OS MVS Programming: Assembler Services Reference, Volume 1 (ABEND-HSPSERV)

All references copyright© IBM Corporation.