-1

I am not an expert in IBM Host tools as I am from development distributed side. Is there anyway that we can see the source code of IBM DB2 stored procedure in AQT tool. I know we can use any emulator tools like Attachmate Extra! X-treme, but the process seems very tough for me. To view a single stored procedure content, I had to type many number of commands. So I just thought it would be great if we have an option to view the same in a simple way, like we have sp_helptext in SQL SSMS (SQL Server Management Studio).

Update:

When I go to the Database Objects -> Procedures, all the schema's for different stored procedures are loading. And when I click on each schema, the stored procedures associated with that are loading, where I am able to see the procedure parameters, run procedure, create procedure etc. But I couldn't find any option to see the actual SQL query of the procedure.

When I click right click on procedure name and select View, I am getting options as,

  1. Procedure Details
  2. Procedure Params
  3. User Access List
  4. Package Access List

I am not seeing any option like Procedure Text. The language in Procedure Detail shows as COBOL and User Access List shows Execute G. Sorry that I can't provide any screenshots here, as it is the client machine I am working on.

Sibeesh Venu
  • 18,755
  • 12
  • 103
  • 140
  • I am not sure why this question is down voted? Is it because it doesn't have enough information? Please let me know. – Sibeesh Venu Feb 27 '18 at 12:45
  • What do you mean by the context of a stored procedure? do you mean to see the source code of an SQL-PL procedure or java stored-procedure? – mao Feb 27 '18 at 13:39
  • Also, can you be specific about what you see in AQT when you navigate to database > Procedures > (your schema of interest) > (the stored procedure name you are interested in) > View > Procedure Text ? Your auth-id needs relevant rights on the catalog. The menus also let you see the Parameters, procedure detail, authorities, dependencies etc. So your question seems unclear. Give a screenshot if necessary. If the stored-procedures are COBOL or C/C++ or Rexx this won't help. – mao Feb 27 '18 at 13:56
  • When you see the procedure name, check Procedure Detail screen, and what is the LANGUAGE and DIALECT values? Does your AUTH ID have sufficient rights? – mao Feb 27 '18 at 14:19
  • @mao I had updated the information, please have a look. – Sibeesh Venu Feb 27 '18 at 14:23
  • still waiting for answer re LANGUAGE and DIALECT values on the Procedure Details screen for the stored procedures of interest. Also verify you AUTH ID has relevant rights, talk with your DBA if you don't know. – mao Feb 27 '18 at 14:25
  • @mao Thanks, I had updated it, I couldn't find option DIALECT there. – Sibeesh Venu Feb 27 '18 at 15:07

1 Answers1

0

Are you using the right tool for the job?

The AQT tool appears to be for procedures that are written in SQL, but your procedures appear to be COBOL stored-procedures. Source code for COBOL stored-procedures is normally managed outside of the RDBMS.

Talk with your DBA team or COBOL developers to find out which toolset at your site gives access to the source code for the COBOL stored procedures.

mao
  • 11,321
  • 2
  • 13
  • 29