View previous topic :: View next topic
|
Author |
Message |
sivakumar somala
New User
Joined: 26 Sep 2007 Posts: 10 Location: Mumbai
|
|
|
|
Hi All,
Could you please suggest if it is possible to extract all the SQL statements from a COBOL DB2 program without compiling it.
Many thanks in advance.
Regards,
Siva |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Is this specifically REXX related, or that you couldn't be asked to put this in the DB2 forum ? |
|
Back to top |
|
|
sivakumar somala
New User
Joined: 26 Sep 2007 Posts: 10 Location: Mumbai
|
|
|
|
Hi,
Firstly, thanks for your response.
Either of it will do. Wanted to check if there is any rexx snipet or any other way, where we can extract all the SQL/Cursor declarations statements between EXEC SQL and END-EXEC statements in a given COBOL DB2 program.
Thanks in anticipation.
Regards,
Siva |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Will you EXEC this tool or will it run as an EDIT MACRO ?
In the first case, you have to scan the cobol program line by line from top to bottom, discard comment lines and look for 'EXEC SQL' and 'END-EXEC' strings.
In the second case, you can use the FIND command to jump to the 'EXEC SQL' lines. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
all the sql statements can be extracted from the db2 tables.
too lazy to look myself, but there is a db2 table, that contains rows for each program, the program name is part of the key. |
|
Back to top |
|
|
kkielak
New User
Joined: 28 Dec 2013 Posts: 1 Location: Poland
|
|
|
|
Do you still need this? I can create small REXX script for that ... |
|
Back to top |
|
|
|