IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Why DB2 precompilation is done before cics translation


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
praveengogineni

New User


Joined: 19 Oct 2004
Posts: 2

PostPosted: Fri Dec 17, 2004 12:53 am
Reply with quote

why db2 precompilation is done before cics translation?what will happen if i reverse the order?
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Thu Feb 17, 2005 2:12 pm
Reply with quote

CICS Translator identifies the EXEC CICS statements and changes them to equivalent COBOL Statements.

DB2 Precompiler identifies EXEC SQL statements and remove them with correspoding MOVE and CALL statements.

So if you removed all the SQL statements from your program, it's easy to identify CICS Statements.

Precompiler uses INCLUDE statement while CICS uses COPY statements.

SO IF YOU ARE USING cics translator first, you will get an error message for:

INCLUDE statement. (if you are having this)
Back to top
View user's profile Send private message
sivabala

New User


Joined: 24 Mar 2005
Posts: 2

PostPosted: Fri Mar 25, 2005 2:46 pm
Reply with quote

COBOL DOESNOT KNOW CICS STATEMENT.THESE CICS STATEMENTS IN COBOL ARE CHANGED TO COBOL CALL STATEMENTS.WHERE AS THE PRECOMPILER WILL CHECK ONLT THE SYNTAX OF THE CICS STATEMENTS.IF THERE IS NO CICS COMMANDS THEN IT CANNOT FIND THE CICS STAETEMENTS THEN IT WILL THROW AN ERROR

SIVABALA
Back to top
View user's profile Send private message
sarma Kappagantu

New User


Joined: 17 Mar 2005
Posts: 22
Location: Bangalore

PostPosted: Fri Mar 25, 2005 5:07 pm
Reply with quote

As per 'Programming in DB2' manual @ publib.boulder.ibm.com/infocenter/dzichelp/index.jsp?topic=/com.ibm.db2.doc.apsg/bjnqmstr355.htm

Translating command-level statements: You can translate CICS applications with the CICS command language translator as a part of the program preparation process. (CICS command language translators are available only for assembler, C, COBOL, and PL/I languages; no translator is available for Fortran.) Prepare your CICS program in either of these sequences:

Use the DB2 precompiler first, followed by the CICS Command Language Translator. This sequence is the preferred method of program preparation and the one that the DB2I Program Preparation panels support. If you use the DB2I panels for program preparation, you can specify translator options automatically, rather than having to provide a separate option string.
Use the CICS command language translator first, followed by the DB2 precompiler. This sequence results in a warning message from the CICS translator for each EXEC SQL statement it encounters. The warning messages have no effect on the result. If you are using double-byte character sets (DBCS), precompiling is recommended before translating, as described previously.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top