|
It would be nice to have some sort of 'CONSTRUCTOR' for Service Programs.
And a Destructor as well!
D function PR D parm1 10I 0 D parm2 100 D constructor PR N D destructor PR D actGrpMark LIKE(UINT4_) D reason LIKE(UINT4_) D resultCode LIKE(UINT4_) D userRtnCode LIKE(UINT4_)
P function B EXPORT D function PI D parm1 10I 0 D parm2 100
C IF NOT(constructed) C CALLP constructor C ENDIF
* Do function stuff C 'Function' DSPLY
C RETURN P function E
P constructor B D constructor PI N
* Do constructor stuff such as: * -- Open files * -- Allocate storage * -- etcetera
C EVAL constructed = *ON C 'Constructor' DSPLY
C RETURN constructed P constructor E
P destructor B D destructor PI D actGrpMark LIKE(UINT4_) D reason LIKE(UINT4_) D resultCode LIKE(UINT4_) D userRtnCode LIKE(UINT4_)
* Do destructor stuff * -- Close files * -- Clean up storage * -- etcetera
C EVAL constructed = *OFF C 'Destructor' DSPLY
C RETURN P destructor E
D function PR D parm1 10I 0 D parm2 100
D p1 S 10I 0 D p2 S 100
C RETURN C SETON LR
Regards, Simon Coulter. --------------------------------------------------------------------- Arterial Software IBM Tower Level 3, 60 City Road Southgate Victoria 3006 Australia http://www.arterialsoftware.com +61 3 9421 5911 (Phone) +61 3 9428 3729 (Fax) --------------------------------------------------------------------- This message together with any attachment is intended for the use of the person to whom it is addressed and contains information that is privileged and confidential. If you are not the intended recipient, or the employee or agent responsible for its delivery to the intended recipient, you are hereby notified that any dissemination, distribution or copying of it is strictly prohibited. Please notify us if you have received it in error, and otherwise take all necessary steps to delete it from any transient or permanent storage device or medium and notify us by e-mail at "support@xxxxxxxxxxxxxxxxxxxx".
Any views expressed in this e-mail and any files transmitted with it are those of the individual sender, except where the sender specifically states them to be the views of Arterial Software.
Arterial Software does not represent or warrant that the attached files are free from computer viruses or other defects. The user assumes all responsibility for any loss or damage resulting directly or indirectly from the use of any attached files. ----------------------------------------------------------------------
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.