Quantcast
Channel:
Viewing all articles
Browse latest Browse all 43909

Wiki Page: How do I configure Enterprise Analyzer for Pro*Cobol code?

$
0
0
Problem Does Enterprise Analyzer(EA)  support analysis of Pro*COBOL code?   Resolution Oracle provides a COBOL pre-compiler for their SQL engine called Pro*COBOL. The programs that are processed by Pro*COBOL contain embedded SQL statements that will be expanded to COBOL calls by Pro*COBOL. It is far better to be able to load the programs before they have been through Pro*COBOL as this then allows you to perform analysis on the SQL statements and the original COBOL code.   EA is setup to be able to process SQL statements embedded inside COBOL and PL/I programs and will process Oracle SQL that is used in either of these languages. There are a number of clipper queries that have been setup that can be used.   These can be used to assit with: Searches for SQL syntax. Perform analysis on host variable usage including which are used before they have been assigned a value. Run CRUD related queries against the tables. Before adding Pro*COBOL programs to a workspace there are a number of Workspace and Project options that should be turned ON to improve the analysis of SQL code. In that case, EA may have to be re-configured to enable SQL support. If changes are required to the configuration of EA, then all the workspaces will need to upgraded before they can be used.    Enterprise Analyzer Configuration Options Programming Languages PL/SQL – this should be enabled, it will allow stored procedures and packages to be supported Legacy Configuration Other Environments – this should be enabled Legacy Configuration Relational Databases– this should be enabled, will allow Embedded SQL in Programs to be supported    Workspace Options Workspace Options Verification Legacy Dialect SQL SQL Dialect should be changed to ANSI SQL-92. The other SQL options are for DB/2. Workspace Options Verification Settings Cobol File Embedded SQL Enable extended ASCII characters in SQL identifiers. This allows national characters to be used in the SQL statements. Workspace Options Registration Extensions Cobol File Extensions. Add .pco to the list of recognised extensions. This is the default extension of Pro*COBOL programs. Workspace Options Verification Settings Cobol File Relaxed Parsing Enable Relaxed Parsing for Embedded Statements SQL. Ensure that the SQL option is enabled.   Project Options Project Options Verification Cobol File Special Environments Settings (CICS, SQL, IMS, etc.) SQL Environment, Set this to Yes. Project Options Reports CRUD Report Select all actions for Relational Databases.   As Oracle is available for a number of different environments, the Cobol dialect can be mainframe or one of the distributed environments, so the COBOL dialect can be any of the dialects including Cobol/390, Enterprise Cobol and Micro Focus. Stored Procedures and Packages should be placed into .sql files and are processed as PL/SQL files. Table definitions can also be added to projects; again these would appear in .dcl or .cpy files. SQL support is built into EA, so Pro*COBOL does not need to be installed on the same machine as EA nor does EA need access to an Oracle database when parsing Pro*COBOL programs or SQL files.   Incident – question came in via the forum

Viewing all articles
Browse latest Browse all 43909

Trending Articles