Hi Srinivas,

It may be simple but not a good example. Apart from the fact that the DS uses absolute notation and binary fields your should NEVER, EVER hard code lengths/offsets as in the example. What happens this program when the length of NAME (on the database files - or even worse, on one of the database files) is changed from 10 to 15?

Should have...

d p_dataIn S *
d dataIn E Ds based(p_dataIn) qualified
/free
p_dataIn = %addr( @parm1 + newOffset );
name = dataIn.name;
address = dataIn.address;

Regards

Paul Tuohy
ComCon
www.comconadvisor.com www.systemideveloper.com




Srinivas Boggula wrote:
Hi All,

I found another easy way of doing this Please find attached link below.

http://tutorialindia.com/articles/as400/db2_trigger_example_rpg_iv.php

Regards,
Srinivas
iGATE is Ranked No. 1 in DQ-IDC best IT employer survey and Ranked No.2 by Business Today-Mercer Human Resource Consulting-TNS in a cross industry survey of Best Companies to work for in India
----------------------------------------------------------------DISCLAIMER---------------------------------------------------------
Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or mailadmin@xxxxxxxxx and delete this EMAIL including any attachments


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.