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



  Here is what I am looking for...

  I need to detect any time a particular field's value changes.  The field
  is a 1 character field that is either blank, or contains an 'X'.  Rather
  than add some processing to the 20 or 30 programs that can update this
  field, I thought a trigger might be the answer.  If the field changes to
  an 'X' from *blank or *blank to an 'X', I want to call a program to add
  the changed record to another file to do some other processing.

  Unfortunately, I know squat about SQL.  So, if anybody has an example of
  the SQL I will need to do what I need, I would be eternally greatful!

  >From: "Paul Tuohy" <tuohyp@xxxxxxxxxxxxx>
  >Reply-To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
  >To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
  >Subject: Re: Simple Trigger Program
  >Date: Wed, 22 Jun 2005 09:45:27 +0100
  >
  >Hi Bob,
  >
  >As of V5R3 (I think) you can define an SQL trigger at the column level.
  >
  >If you use iSeries Navigator, expand the Databases option to the required
  >Schema and, from the context menu of the Triggers option select New->SQL.
  >You will see that you have an option for "Update of selected columns".
  >
  >The downside (?) is that the trigger has to be an SQL script.
  >
  >External triggers (RPG, CL etc.) cal only be specified for the record
  level.
  >
  >HTH
  >
  >Paul Tuohy
  >
  >----- Original Message -----
  >From: "Bob O." <otis_the_cat@xxxxxxxxxxx>
  >To: <midrange-l@xxxxxxxxxxxx>
  >Sent: Tuesday, June 21, 2005 3:30 PM
  >Subject: Simple Trigger Program
  >
  >
  > >    Is it possible to define a physical file trigger to fire when a
  >specific
  > >    field is changed, or is it only possible to detect the changed
  record.
  >We
  > >    don't have any triggers on our files (it was like that when I got
  >here!),
  > >    and I finally came across a reason to use one (hence my very first
  >trigger
  > >    program).
  > > --
  >
  >
  >--
  >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.
  >

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.