Thinking About SQL Compiler Option Must Read

Data Scientist Jobs
[ Data Scientist Jobs – One of the hot skill in the current market ]
Use the SQL compiler option to enable the DB2 coprocessor capability and to specify DB2 suboptions. You must specify the SQL option if a COBOL source program contains SQL statements and it has not been processed by the DB2 precompiler.
SQL option syntax:
– NOSQL
– SQL

Default is: NOSQL
Abbreviations are: None

When you use the SQL option, the DB2 coprocessor writes the database request module (DBRM) to ddname DBRMLIB. DB2 must be available on the machine on which you compile.

If you specify the NOSQL option, any SQL statements found in the source program are diagnosed and discarded. Use either quotation marks or single quotation marks to delimit the string of DB2 suboptions.

You can partition a long suboption string into multiple suboption strings in multiple CBL statements. For example:
//STEP1 EXEC IGYWC, . . .
// PARM.COBOL=’SQL(“string1”)’
//COBOL.SYSIN DD *
CBL SQL(“string2”)
CBL SQL(’string3’)
IDENTIFICATION DIVISION.
PROGRAM-ID. DRIVER1.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.