|
-----Original Message-----
From: William Washington III <w.washington@iols.net>
To: MIDRANGE-L@midrange.com <MIDRANGE-L@midrange.com>
Date: Wednesday, August 09, 2000 1:03 AM
Subject: Database Trigger Programs
>Hi All!
>
>When creating a trigger program (in RPG/ILE) there is a variable length
>section that contains the before and after image of the record that is
>changed. I know how to access them with the offsets.
>
>My question is: How is the length of the data structure (for the first
>parameter of the trigger program) calculated? I always have to make the
>data area ridiculously large, then go into debug mode to see where it ends.
>Is there a way to do this programmatically? Any thoughts are appreciated.
>
If you declare a data structure that is mapped by the external description
of the file and based on a pointer, then there is no physical allocation of
memory, just a pointer-based map of the data that can be positioned to the
before and/or after image area and used to access the data directly from the
buffers for the trigger without concern over allocating large spaces to read
the data.
Attached is a sample of what I describe...
===========================================================
R. Bruce Hoffman, Jr.
-- IBM Certified Specialist - AS/400 Administrator
-- IBM Certified Specialist - RPG IV Developer
"Those who would give up essential Liberty,
to purchase a little temporary Safety,
deserve neither Liberty nor Safety."
- The Papers of Ben Franklin
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.