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



Didn't know about STATIC keyword.
Cool beans. Thanks everyone.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Thursday, March 17, 2011 4:29 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: saving status inside multiple calls to service program

Many of the service program procedures I write have a firstUse flag, like
this:

D firstUse s N static inz(*On)

... and then in the code, there will be something like:

if firstUse ;
firstUse = *Off ;
// ... do some setup stuff
Endif ;

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
Life would be so much easier if we could just look at the source code.


Is it possible to code a procedure in a service program such that it
can retain values from one call to the next? I haven't been able to
accomplish this and I could cut down on some logic if it can be done.

An example would be: if a flag has not been set (procedure never
called before), retrieve some static values from a database. If the
flag IS set, those values are already set and available for use in the
current call to the procedure.

Thanks

Tom Garvey


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


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