Call QMF procedure from .NET - db2

We're doing Windows development against a DB2 database with QMF v9.1. We hard-code many of our SQL queries directly into our applications, even though they are already stored in QMF.
However, I was told that a built-in stored procedure exists that is able to return results from a QMF query or procedure. But the person could not tell me the name of the stored procedure.
Would anyone be able to share their experience in regards to the above? Many thanks in advance.

I think what you're looking for is Q.DSQQMFSP. The QMF Stored Proc interface has to be enabled, so it's not a "default" option.
Once that's done, it should be like calling any other stored proc from .NET

Related

Can we see IBM DB2 stored procedure content in AQT(Advanced Query Tool)?

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,
Procedure Details
Procedure Params
User Access List
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.
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.

How to identify recently changed SPs in postgresql?

I want to get the list of stored procedures which were recently changed.
In MS SQL Server, there are system tables which store those information and we can easily retrieve what has changed. Similarly I want to find most recent changed SPs and tables in PostgreSql
Thanks
You can use an EVENT TRIGGER for logging. More information about how to create and use event triggers, can be found in the manual and www.youlikeprogramming.com.
You need at least version 9.3.

How to execute reports which involve a stored procedure calling out to a linked server

I wrote a stored procedure that calls openquery to a linked server to get data from a remote postgresql server and fill a table with that data. This is working fine. The stored procedure needs 3 parameters.
When I try to call the stored procedure from Report Builder 3.0 gives me error
7350 (cannot get the column OLE DB provider MSDASQL from linked server "name").
I already verify the allow in-process parameter in MSDASQL.
I can't find a solution for this. If I run the stored procedure from Mgmt Studio, it works fine. I'm using SQL Server 2012.
The report only have to show the file data by row. I can run the stored procedure and the report separately and works but I have to do this manually, my requirement needs a report subscription, so have to be automatic.
Any idea how to solve this or a workaround?
PD: sorry for my english, and thank you in advance.
Well I had to make separates works, so create a job that run the store procedure, generate the info on a table, and then run report reading the info from the table. This works.
Thank you all.

postgresql procedures/triggers

Is it possible to write a stored procedure or trigger that will be executed automatically inside of a database on particular time without any calls from application? If yes, then could anybody give me an example or link to some resource where I can read how to do that.
Check out pgAgent. If that doesn't work for you, there's always cron in Unix/Linux and the Task Scheduler service in Windows.
I don't think there's anything built-in, but you might want to check out
pgjobs or pgAgent.
You can use Stored Procedures. Stored Procedure is a set of statements, which allow ease and flexibility for a programmer because stored procedure is easy to execute than reissuing the number of individual SQL statements but they need to perform the same database operations.Using the stored procedure less information needs to be sent between the server and the client.
You can visit These links :-
Postgres Procedures
Best way to use stored Procedures

Progress ABL procedure to SQL Insert

We have a software solution that involves syncing some data between a Progress database and SQL server. Unfortunately, we do not have any Progress gurus in house, so I'm working kinda blind here and would welcome any advice that is on offer.
For the workflow that is already in place, what would work very well for us is the ability to do an external call to insert a row into an SQL database from an within ABL procedure's 'for each' loop.
Is anyone able to direct me to any code snippets or articles that might help me achieve this?
Many thanks,
In case your SQL database is MS SQL Server, you might want to have a look at OpenEdge DataServer for Microsoft SQL Server (web.progress.com/en/openedge/dataserver-microsoft.html, documentation.progress.com/output/OpenEdge102b/pdfs/dmsql/dmsql.pdf).
The DataServer provides you with ABL access to a non-Progress database so you can use standard Progress statements, e.g. CREATE to add new records or FOR EACH to retrieve query results.
OpenEdge DataServers are also available for Oracle (using Oracle Call Interface), DB2 and Sybase (using ODBC). The DataServer for MS SQL Server uses ODBC behind the scenes as well. web.progress.com/docs/datasheets/openedge/openedge_dataservers.pdf
You dont need the dataserver, connection with ADODB works fine in ABL, you can even call stored-procedures with the command object, the user you connect with will have to be granted EXEC rigths on the SQL-Server to do that.
I'm not a Progress guru, but I did do some work in it for awhile. AFAIK there is no way to have ABL code connect to a non-Progress database (part of that whole vendor lock-in strategy Progress Corp. leverages).
Your best bet is probably to have the ABL code serialize the records to XML, and use something like ActiveMQ (or even a plain socket or named pipe/FIFO depending on your setup) to send them to a program written in a more capable language to do the SQL insert.