DB2 Server for VSE & VM: Application Programming


Using ARIS6ASC, an Assembler Language Sample Program (DB2 Server for VM Only)

ARIS6ASC is an assembler language sample program for VM systems that is shipped with the DB2 Server for VM product. It resides on the production disk for the base product. You may find it useful to print this sample program before going through this appendix as the hard copy will provide an illustration for many of the topics discussed here.

Note, for example, how the program satisfies the requirements of the application prolog and epilog. Near the beginning of the program, all the host variables are declared, the SQLDSECT area is acquired (and set to zero), and error handling is defined. Near the logical end of the program, the database changes are rolled back, to assure that the database remains consistent for each use of the sample program. (For your own applications, of course, you will enter a COMMIT statement.)

The DS and DC statements for the host variables were determined by referring to Figure 105, which shows the assembler representation for each of the DB2 Server for VM data types supported by assembler programs. When you are coding your own applications, you must obtain the data types of the columns that your host variables interact with. This can be done by querying the catalog tables. These tables are described in the DB2 Server for VSE & VM SQL Reference manual.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]