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



My understanding is ILE CL variables are initialized in the same manner
as they would be in OPM CL.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
MichaelQuigley@xxxxxxxxxx
Sent: Tuesday, August 19, 2008 7:02 AM
To: midrange-l@xxxxxxxxxxxx
Subject: ILE CL activation


Do the values of variables in an ILE CL program get refreshed on every
call to it if it is run within a named activation group? e.g., The
following program is created with the parameters DFTACTGRP(*NO) and
ACTGRP(EXAMPLE). If it is called repeatedly from another program in the

same activation group, is the value of &LOCAL reset to 'Initial' every
time this program is called?

PGM PARM(&ACTION)

DCL VAR(&ACTION) TYPE(*CHAR) LEN(4)

DCL VAR(&LOCAL) TYPE(*CHAR) LEN(10) VALUE('Initial')

SNDPGMMSG MSG('The action is:' *BCAT &ACTION) TOPGMQ(*EXT)
+
TOMSGQ(*TOPGMQ)

SNDPGMMSG MSG('Local variable value is:' *BCAT &LOCAL) +
TOPGMQ(*EXT) TOMSGQ(*TOPGMQ)

CHGVAR VAR(&LOCAL) VALUE('Changed')

CALL PGM(EXCRUNUNT3) PARM(&ACTION)

SNDPGMMSG MSG('On return local variable value is:' *BCAT +
&LOCAL) TOPGMQ(*EXT) TOMSGQ(*TOPGMQ)

RETURN
ENDPGM

Thanks,
Michael

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.