× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Luis,
Thanks for that info,
You are indeed correct that IBM may change this in the future.
I will be changing my trigger and rebuilding it.

Jeff Young
Sr. Programmer Analyst

On Fri, Jul 28, 2017 at 2:32 PM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:

Jeff,

Yes, I saw your PBKU message right after I pressed the send button :-)

The reason the unquoted zero works is that Db2 for i has, in some cases,
implicit casting. Nevertheless, that's the kind of things that may "bite"
you later on if, in some future release, the feature gets dropped (it has
happened before, as SQL seems to have a tendency to enforce strong typing).

Regards,
Luis
Sent from my Moto G phone. Please excuse my brevity.

On Jul 28, 2017 14:21, "Jeff Young" <jyoung0950@xxxxxxxxx> wrote:

Luis,
The problem was that in my testing, I used a value that was outside the
range for the field I was testing in the trigger. (PBKU)
I corrected my test data and it worked fine.

You are correct in that the 0 should have been in quotes, but it seems to
work anyway.

Jeff Young
Sr. Programmer Analyst

On Fri, Jul 28, 2017 at 2:09 PM, Luis Rodriguez <luisro58@xxxxxxxxx>
wrote:

Jeff,

Shouldn't it be ">= '0' " (zero in quotes)?

Regards,
Luis

Sent from my Moto G phone. Please excuse my brevity.


On Jul 28, 2017 14:02, "Jeff Young" <jyoung0950@xxxxxxxxx> wrote:

All,
I have a SQL Trigger setup at follows:
Create Trigger UPC_File_DL
After Delete
On FInUPC
Referencing Old as O
For Each Row Mode DB2Row
When (SubStr(O.InUPC, 1, 1) >= 0
and Character_Length(Trim(O.InUPC)) between 12 and 14)
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 Record_Id = 'ITEM';
Set DQ_Name = 'LUCAS_EXP';
Set DQ_Lib = '*LIBL';
Set DQ_Data = Record_Id || O.InItem;
Set DQ_Len = Character_Length(Trim(DQ_Data));
Call Send_DataQ (DQ_Name, DQ_Lib, DQ_Len, DQ_Data);
End
;

In my RPG program, I am deleting some records, but the trigger does not
appear to execute.
I have a journal setup on the data queue, and when I issue the DSPJRN
command for it, it does not show any entries.

Is there a way to determine why this is not working?

TIA
Jeff Young
Sr. Programmer Analyst
--
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
--
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

--
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

--
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.