|
The process is still pulling over too many records so we want to
push all the work onto the iSeries side. Our smartest DB2 sql
programmer helped me create this Stored Procedure:
P1 : BEGIN
DECLARE EDITBORROWERSSN_C1 CURSOR WITH RETURN FOR
SELECT CASE
WHEN ( SELECT DISTINCT 1
FROM SLSFILESMT . SLBRREV1
WHERE BORROWER_SSN = @BORROWER_SSN
) IS NULL THEN RESULT
ELSE 'Valid'
END
FROM TABLE
( VALUES ( 'Invalid' ) )
AS TVALUES ( RESULT ) ;
OPEN EDITBORROWERSSN_C1 ;
END
This runs instantly when called from Run SQL scripts - CALL
SLBRRES01 ('123456789'). I cannot, however, come up with the
correct syntax to call the DB2 SP (SLBRRES01) from MS SQL. This
"runs" without returning anything as I can't setup the parameters
without syntax errors:
EXEC('@Result = [CFITESTLOANS].[IASPCFI].[SLSFILESMT].[SLBRRES01]')
I'm trying different scenarios I've read on Google so I might be way
off. It doesn't have to be an SP. Could be a UDF or whatever on
the iSeries side. If this can be set up to run quickly we can use
the same method in many places.
Can anyone offer some help with this?
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.