Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / June 2006

Tip: Looking for answers? Try searching our database.

Command to Display Curernt SQL for a Job

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JohnO - 23 Jun 2006 00:28 GMT
Hi All,

In Ops Nav, it's possible to display the current SQL being executed by
a job. However it's rather slow to find the job as it has to populate a
large list of jobs then sort them. I suspect there is a CL command that
takes a job number parameter that would be much faster.

Is there such a command or is Ops Nav somehow using an API that is not
available as a CL command?

Thanks
JohnO
4.spam@mail.ru - 23 Jun 2006 06:52 GMT
Hello.

C API name is QUSRJOBI. Header file name is qusrjobi.h.
If someone wants soruce C code for UDF like this:
**************
--- Returns a LAST EXECUTED sql command for specified job
CREATE FUNCTION DWHTEST.QRY_SQL
(
JOBNAME VARCHAR(10) ,
USERNAME VARCHAR(10) ,
JOBNUMBER VARCHAR(6)
)
RETURNS VARCHAR(32700)
LANGUAGE C
NOT DETERMINISTIC
NO SQL
CALLED ON NULL INPUT
EXTERNAL NAME 'DWHTEST/QRY_SQL(QRY_SQL)'
PARAMETER STYLE SQL ;
*****************
write at mark(dot)b(at)mail(dot)ru

Sincerely,
Mark B.

> Hi All,
>
[quoted text clipped - 8 lines]
> Thanks
> JohnO
JohnO - 23 Jun 2006 10:31 GMT
> Hello.
>
[quoted text clipped - 33 lines]
> > Thanks
> > JohnO

Thanks Mark, you are a mine of information!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.