Some host-dependent sample application programs and the DB2 Server for VSE JCL streams the DB2 Server for VM EXECs that can be used to preprocess, compile, link or edit, and run them
are shipped with this product. These programs manipulate data in the
tables by using embedded SQL statements and printing the results. You
may want to model your initial programs from these sample applications.
See Figure 6 for DB2 Server for VM information on these
samples. Figure 7 for DB2 Server for VSE information on these
samples.
Figure 6. Sample Application Programs - DB2 Server for VM
Language | Program Name | EXEC | Appendix |
---|---|---|---|
Assembler | ARIS6ASC | SQLASMC | A |
C | ARIS6CC | SQLC | B |
COBOL | ARIS6CBC | SQLCBLC | C |
FORTRAN | ARIS6FTC | SQLFTN | D |
PL/I | ARIS6PLC | SQLPLI | E |
Figure 7. Sample Application Programs - DB2 Server for VSE
Language | Program Name | JCL (Z type member) | Appendix |
---|---|---|---|
Assembler | ARIS6ASD | ARIS6ASD | A |
C | ARIS6CD | ARIS6CD | B |
COBOL | ARIS6CBD | ARIS6CBD | C |
COBOL II | ARIS6CBD | ARIS6C2D | C |
FORTRAN | ARIS6FTD | ARIS6FTD | D |
PL/I | ARIS6PLD | ARIS6PLD | E |
DB2 Server for VM |
---|
As an example, to preprocess, compile, link edit, and run the sample COBOL program from a DB2 Server for VM user machine enter: SQLCBLC |
DB2 Server for VSE |
---|
Generalized job control to invoke the VSE programs is shown in Figure 8. The sample programs and job control were written for the compiler levels stated in the prolog of the sample programs. If you want to run the sample applications on a different level compiler, refer to the appropriate compiler manual. Each of the above applications assumes that the user SQLDBA has a password of SQLDBAPW. If the samples are run with a userid other than SQLDBA, or if the password has been changed, the parameters in the generalized JCL must also be changed. Along with these changes, the host variables used by the CONNECT statement in the sample programs must also be modified to reflect a new user ID or password. |
The DB2 Server for VM sample programs and EXECs were written for the compiler levels stated in the prolog of these programs. If you wish to run them on a different level compiler, refer to the appropriate compiler manual.
Figure 8. Generalized Execution JCL for Sample Programs (Multiple User Mode) - DB2 Server for VSE Notes: See Preprocessing the Program for a list of the preprocessor names.
* ******************************************************************
* ** GENERALIZED JCL TO PREPROCESS, COMPILE, LINKEDIT AND **
* ** EXECUTE THE SAMPLE PROGRAMS ON VSE SYSTEMS. **
* ******************************************************************
*
// JOB ARISSAMP PREPROCESS SAMPLE PROGRAM
// EXEC PROC=ARIS71PL *-- DB2 for VSE Library ID PROC
// DLBL SQLGLOB,......,DISP=(OLD,KEEP) *-- SQLGLOB Parameter file
// ASSGN SYS089,SYSPCH *-- Save SYSPCH assignment
// DLBL IJSYSPH,'PREPROCESSOR.OUTPUT',0 *-- PREPROCESSOR output//10
// EXTENT SYSPCH,....... *--
ASSGN SYSPCH,... *-- Assign to disk
*
// EXEC PGM=ARIPRPx,SIZE=AUTO,PARM='USERID=SQLDBA/SQLDBAPW, *
PREPNAME=ARIS6xxx' *-- Invoke DB2 for VSE PREPROCESSOR
READ MEMBER ARIS6xxx.A *-- sample program name
/*
CLOSE SYSPCH,SYS089 *-- Close & Assign SYSPCH
// DLBL IJSYSIN,'PREPROCESSOR.OUTPUT',0 *-- Input File
// EXTENT SYSIPT,...... *-- Same as SYSPCH in
ASSGN SYSIPT,... *-- preprocess step
*
// OPTION CATAL *-- Link Edit (catalog)
PHASE ARIS6xxx,* *-- Name of executable phase
// EXEC compiler *-- Compile
INCLUDE ARIPRDID *-- DB2 for VSE Batch Resource
Adapter stub
INCLUDE ..... *-- Include runtime routines
*
ENTRY ARIS6xxx *--
// EXEC LNKEDT *-- Link Edit
CLOSE SYSIPT,SYSRDR *-- Reset SYSIPT
// ASSGN .... *-- Program assignments
// EXEC PGM=ARIS6xxx,SIZE=(....) *-- Execute Phase
data input to sample program *-- Input data
/*
/&
DB2 Server for VSE
compiler references.
been added to the system standard label subarea.