That is done by including some statements that these subsystems understand. For DB2, you will include EXEC SQL statements. For CICS, you will include EXEC CICS statements.
Examples:Here's an example of a program that calls DB2:
SELECT * FROM TABLE1
Or if it was a program that uses CICS:
Since these statements are not specific to the programming language being used, these need to be pre-compiled. The pre-compiler will read through the source and then translate these statements into statements that the language can understand.
Pre-CompilingWhile DB2 pre-compiles are normally done before the Compile step. You can specify a compile option to have the DB2 pre-compile done within the compile step. This means the compiler will call the DB2 pre-compiler to convert DB2 specific statements to the source language statements before it processes the source code.
CICS compile is done within the compiler step by specifying the CICS option. The compiler is smart enough to translate these CICS statements into the language the compiler understands.
Eliminating DB2 Pre-Compile Step in COBOL and PL/1As mentioned earlier, you can specify COBOL parameters so the DB2 pre-compile step is executed with the Compile step in your JCL. You do this by adding the SQL parameter in your Compile step.
Since the DB2 precompiler will be executed in your compile step, you need to add a DBRMLIB statement in your Compile step. Shown below is the JCL for a compile step.
//STEPLIB DD DSN=loadlib.where.compiler.resides,DISP=SHR
//DBRMLIB DD DSN=dbrmlib(member),DISP=SHR
//SYSIN DD DSN=source.code(member),DISP=SHR
//SYSLIB DD DSN=copy.or.inclide.lib,DISP=SHR
//SYSPRINT DD SYSOUT=X
//SYSLIN DD DSN=&&output,DISP=(,PASS)
Post a Comment