|
The other thing to think about assuming your at V6R1 or higher. Make any
callable program a Main program. It eliminates the cycle, runs aobut 20%
faster and cuts size of program.
Going to use free format here. Easy enough to translate back to fixed.
Use a named activation group for best performance and assuming all this
program is going to do is write to data queue. Always recommend mediator.
In that case, this would be a very simple Service Program.
**FREE
ctl-opt Option(*Srcstmt:*Nodebugio:*Nounref);
ctl-opt Main(ProcessTransaction);
dcl-ds TD_DbTriggerBuffer Qualified Template;
PhysicalFileName Char(10);
PhysicalFileLibrary Char(10);
PhysicalFileMember Char(10);
TriggerEvent Char(1);
TriggerTime Char(1);
CommitLockLevel Char(1);
Reserve1 Char(3);
CCSIDOfData Int(10);
RelativeRecordNumber Int(10);
Reserve2 Char(4);
BeforeOffset Int(10);
BeforeLength Int(10);
BeforeNullByteOffset Int(10);
BeforeNullByteLength Int(10);
AfterOffset Int(10);
AfterLength Int(10);
AfterNullByteOffset Int(10);
AfterNullByteLength Int(10);
Reserved3 Char(16);
end-ds;
dcl-pr ProcessTransaction ExtPgm('YOURNAME');
PR_InTriggerBuffer LikeDs(TD_DbTriggerBuffer);
PR_InBufferLength Int(10) Const;
end-pr;
dcl-proc ProcessTransaction;
dcl-pi *N;
InTriggerBuffer LikeDs(TD_DbTriggerBuffer);
InBufferLength Int(10) Const;
end-pi;
// declare all variables as local to procedure. As little static as
possible.
// Your write data queue logic.
Return;
end-proc;
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.