Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS400 Returning Result Sets from RPG to Impromptu

Status
Not open for further replies.

dgroves

Technical User
Sep 23, 2002
1
CA
I am using Impromptu in an AS/400 environment. I have created a RPG program to extract data to an array and pass that array to a result set in a procedure. All of this executes cleanly. How can I get that result set back to Impromptu to use as an input table to report against. Any suggestions would help.
 
What's an RPG program? I've heard of it related to Powerhouse, but I don't know what either are. However, I can still help with Impromptu.

If you are using Impromptu to extract the first result set in the 1st place, you have several options:

1)Easiest & quickest: Create a hotfile and bring it into the catalog to report off of.

2)If performance is an issue, save the file as a delimited file (i.e. CSV file) and upload that into an AS/400 table. (You will probably want to eventually write a script to automate that.) Again, bring the table into the catalog and setup the necessary joins.
 
We'll need a little clarification to help.

...and pass that array to a result set in a procedure
Is this a RDBMS procedure or an RPG procedure?

Is the returned array a fact table to be run against, or is it a set of variables to be used as filters when Impromptu is run against another fact table?

If it is to be used as a fact table, then you have limited options based upon the size of the data. If it is limited in size you could export it from your RPG app to a text file and use a Text ODBC driver to access it in Impromptu. If it is larger than can be practically handled that way, and you have an ODBC driver for your AS/400 datasource and can recreate your program logic within Impromptu, you can create a hotfile as Gasman suggests.

If it is a filter table, than you can add the possibility of using a Cognos macro to read the ascii file one line at a time and run the report passing that data to the report prompt.

Give us some more information and we'll elaborate on your options.

Hope this helps,

Dave Griffin

The Decision Support Group
Reporting Consulting with Cognos BI Tools
"Magic with Data"
[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top