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



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David FOXWELL wrote:
What is the normal manner to initialize such variables between program calls? Without using activation group *NEW. Currently, it seems we are relying on a CLP that issues a RCLRSC.

Thanks.

I usually check to see if the method parameter values have changed and
reset static variables to initialization values if they have. That
allows the efficiency of returning cached values without recalculation
when there's significant processing involved in producing the output. If
necessary, I write a public clean-up method, which sets a global
"reinit" variable, then calls each method in the module with default
parameter values in order to close files, deallocate heap storage and
reinitialize everything. That works pretty well, but you have to be wary
of cached "prepared" SQL cursors. If you use them, you either need to
reset the SQL database connection (messy, but doable), RCLACTGRP or call
CEETREC. RCLRSC doesn't work with ILE code, but you can easily RCLACTGRP
if you run in a named activation group. Do yourself a favor though, and
run service programs in ACTGRP(*CALLER). Just use named activation
groups at the *PGM level. Otherwise, you'll end up with a headache
trying to debug. Activation groups (even named ones) are local within
the job.

- --
Pete Hall
pete@xxxxxxxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAktfcL4ACgkQXczQcKdXKg6EAACdFpt5lU+MonX0DL2gEfLwGOV+
ncEAoILI13RciQZ8bpZqnRoa/oJPPkVe
=m2U5
-----END PGP SIGNATURE-----

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.