|
Thorbjørn Ravn Andersen wrote:Thanks for responding :) The amount of experience of this list is truly
Coy Krill skrev den 26-08-2008 17:59:
Our software vendor has several RPGLE programs that they use like an API. Here is the code I use to wrap one of their more useful ones. It basically make an SQL reference to the external program and tells SQL how the parameters work etc. This should get you started.Thanks!
I am getting near :) I can invoke my program but it crashes. I have destilled the problem to being that I need integer values in a PIC 9(5) field (which apparently is a ZONED(5,0) when I answer D to the inquery message in QSYSOPR), and that DECIMAL seems not to initialize it properly and CHAR(5) wasn't what I thought :) Chapter 6 in "Stored Procedures, Triggers, and User-Defined Functions on DB2 Universal Database for iSeries" did not make it clear for me, so perhaps one on the list can nudge me in the right direction?
Ah, the joys of numeric data. You have two options:
In the SQL, specify NUMERIC rather than DECIMAL. This will make the parameters zoned decimal.This didn't work - bleh. Data dump is:
In the COBOL, specify COMP-3 on your variables. This will make the values packed.This worked! Joy! Happiness! Astonishment! (Just for the record, I
It gets a little trickier with signed data. I would lean towards NUMERIC to avoid any issues.Since the Cobol program to be called is essentially cast in stone (and
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.