Chat now with support
Chat with Support

SQL Optimizer for DB2 LUW 4.4.1 - Installation Guide

COBOL Conversion

The COBOL conversion searches for three items within the syntax of a SQL statement that are allowed in the COBOL, but are not valid SQL syntax:

  • A dash or minus in a variable name

  • Comments in the middle of the SQL statement

  • The ]] (double right square bracket) as the concatenate symbol

This conversion is only applied when the Scanner Job is added to the Job Manager window using the COBOL option under the Select Source Code page in the Add Jobs wizard.

Conversion for variable name

If a variable name contains "-" minus sign, then it will be replaced with "_".

Conversion for comment

If the 7th column of the line is an asterisk (*) then the complete line will be recognized as a line comment.

Conversion for concatenate character

If ]] (two right brackets) are used to concatenate column names, they will be replace with a +.

Original SQL statement

SELECT * FROM EMPLOYEE

      * Get the department number

 WHERE EMP_ID > :employee-id

   AND ENAME ]] JOB = :name-job

After conversion

SELECT *

  FROM EMPLOYEE -- * Get the department number

 WHERE EMP_ID > :employee_id

   AND ENAME || JOB = :name_job

Note: If your COBOL file has tags at the beginning of the lines of code, you need to use the Number of characters to be skipped at the beginning of every line for all files option found on the SQL Scanner tab in the Options window.

 

Related Topics

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating