z/OS DFSMS OAM Application Programmer's Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Sample program for object storage

z/OS DFSMS OAM Application Programmer's Reference
SC23-6865-00

This appendix contains the source listing of two sample programs that use the OSREQ macro for object manipulation. See CBROSREQ and CBROSR2 for these sample programs. These programs are available as members CBROSREQ or CBROSR2 in SAMPLIB.

There are two basic differences between the two samples:
  • CBROSR2 supports the new store sequence OSREQ functions of STOREBEG, STOREPRT, and STOREEND. CBROSREQ does not support these new functions.
  • CBROSREQ includes DB2 related functions such as CAF OPEN and CAF CLOSE as well the EXEC SQL statements COMMIT and ROLLBACK. CBROSR2 does not contain any DB2 related functions or EXEC SQL statements.
You can use these samples in a number of ways depending on your application:
  • You can generate the IADDRESS parameter in the OSREQ ACCESS function by specifying IADD as the SYSPARM value in the PARM field of the EXEC JCL statement. For example:
    //ASSEMBLE EXEC PGM=ASMA90,PARM='RENT,DECK,SYSPARM(IADD)'
  • The CBROSREQ sample uses the DSNHLI entry point for the OSREQ IADDRESS parameter. Whereas the CBROSR2 sample uses the IADDRESS_PTR field located in the caller supplied DATAAREA for the OSREQ IADDRESS parameter.
  • You can link-edit members CBROSREQ or CBROSR2 as part of the application load module. You do not need to issue LOAD request before using the OSREQ calls.
  • You can use members CBROSREQ or CBROSR2 without modification to support application programs written in PL/1 or COBOL.
  • You can modify members CBROSREQ or CBROSR2 as necessary to support applications written in high-level languages other than PL/1 or COBOL.
  • You must run the DB2 pre-compiler due to the EXEC SQL statement in the code for the CBROSREQ sample. Please note that the CBROSR2 sample contains no EXEC SQL statements, so the DB2 pre-compiler does not need to be run for it.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014