DROP PROCEDURE Send_DataQ;
CREATE PROCEDURE Send_DataQ(IN DQ_Name CHAR (10),
IN DQ_Lib CHAR (10),
IN DQ_Len DEC (5 ),
IN DQ_Data CHAR (128))
NOT DETERMINISTIC NO SQL
EXTERNAL NAME QSNDDTAQ PARAMETER STYLE GENERAL;

Drop Trigger Bin_File_AI;
Create Trigger Bin_File_AI
After Insert
On VInBin
Referencing New as N
For Each Row Mode DB2Row
When (N.ImCmp = 1 and N.ImLoc = '0001' and N.ImType = 'P')
Begin
Declare DQ_Name Char (10);
Declare DQ_Lib Char (10);
Declare DQ_Len Dec (5) ;
Declare DQ_DATA Char (128);
Declare Record_Id Char (10);
Set DQ_Name = 'LUCAS_EXP';
Set DQ_Lib = '*LIBL';
Set Record_Id = 'BIN';
Set DQ_Data = Record_Id || Digits(N.ImCmp) || N.ImLoc || N.ImBLoc;
Set DQ_Len = Character_Length(Trim(DQ_Data));
Call Send_DataQ (DQ_Name, DQ_Lib, DQ_Len, DQ_Data);
End


Jeff Young
Sr. Programmer Analyst

On Thu, Dec 15, 2016 at 3:30 PM, Gerald Magnuson <gmagqcy.midrange@xxxxxxxxx
wrote:

my stored procedure program is taking too long....
has someone created a trigger that is just using the QSNDDTAQ api?

so then I can have a nep running to receive and process these entries?



On Thu, Dec 15, 2016 at 1:11 PM, Gerald Magnuson <
gmagqcy.midrange@xxxxxxxxx
wrote:

I found an example (that doesn't work...)
create trigger gemlib.iimtrgr1
after update of IDESC , IUMS, IUMP, IITYP
on gemlib.iim
REFERENCING NEW as n
FOR EACH ROW
BEGIN ATOMIC
CALL KSQLLIB.UPDIIMDTA1 (n.IPROD) ;
END

the above fails saying "variable IPROD not found or usable"...

however, If I do this:

create trigger gemlib.iimtrgr1
after update of IDESC , IUMS, IUMP, IITYP
on gemlib.iim
REFERENCING NEW as n
FOR EACH ROW
BEGIN ATOMIC
Declare iprod15 CHAR(15) ;
SET iprod15 = n.IPROD;
CALL KSQLLIB.UPDIIMDTA1 (iprod15) ;
END

that works....
But that seems like I am overdoing it....



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.