简体   繁体   中英

using stored procedure in IBM I

I have tried for some time but still not able to make a stored procedure on the ibm i. if anyone can write the steps needed.

I have a cl that contains about 8 Query /400. I can have it run at night but in the event the user wants latest data it would not be.

I have looked at making a group of views but the queries do breaks and totals and this is not converting well. i need the exact same data as this bunch of queries makes.

is the idea that i create an sp and link to the cl? or do i code the contents of the cl in the sp? please if you can give me a step 1. 2. 3 would be best.

Create a external stored procedure and call your CL program from there.

CREATE PROCEDURE mylib/sqlprocname LANGUAGE CL MODIFIES SQL DATA EXTERNAL NAME mylib/clprogname

Redbooks

IT jungle article

SQL Reference on iSeries

I run the convert command to get the sql equivalent. RTVQMQRY. But when the query is doing breaks and totals on that, and summary level, the data is off. I prefer to get the exact data.

There is a terminology issue here that needs to be addressed. The 'exact data' - level breaks and totals - that you see with Query/400 is a formatted report; the sort of thing that you would do with program logic in an RPG program. It is very important that you understand this part: Query/400 is manipulating the raw data.

You can put business logic inside a stored procedure, but you will have to write that code yourself. Since you are using Crystal Reports, why don't you put that business logic inside the Crystal Report?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM