"But a variable is a chunk of memory rather than an object in a library,
so..."

.. this is not completely true !!

It is created as a service program that contains an internal variable with
the initial value. So when you change the variable - you change the value
in that instance of the service program . aka - when the job i s
terminated, everything is disposed of.

in RPGIII lingo - it's like a program with a parameter having a variable.
Then you return without *INLR .. if that makes sense :)


On Wed, Oct 8, 2025 at 9:28 PM Evan Harris <auctionitis@xxxxxxxxx> wrote:

Hi Dan

I'm kind of wondering if the variable you created is really "in your
library".

Your initial post with the variable defined like so: create variable
dbale/testvar varchar(30); confused my muscle memory as I immediately
associated it with a library,
But a variable is a chunk of memory rather than an object in a library, so
now I am thinking it's more likely you have a variable named in a way that
suggests it is in a library - but isn't.




On Thu, Oct 9, 2025 at 7:19 AM Dan Bale <dan.bale@xxxxxxxxxxxxxxxxxxxxx>
wrote:

Global variables can do exactly this without being in QTEMP. You can
create it in any permanent library and each job can have its own value.

O.k., I just now tested this in two different RSS sessions and you're
right and now I'm confused how a variable created in my personal library
can have two different values.

Is the variable *SRVPGM object in my library simply a definition that the
RSS session uses to create a value placeholder for that session?

I guess this not only applies to RSS scripts, but to SQL stored
procedures
as well?

- Dan Bale

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Glenn Gundermann
Sent: Wednesday, October 8, 2025 1:39 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx

Subject: RE: Creating host variables in QTEMP using RSS

Global variables can do exactly this without being in QTEMP. You can
create it in any permanent library and each job can have its own
value.Yours truly,Glenn Gundermannglenn.gundermann@xxxxxxxxx(416)
317-3144
*** CONFIDENTIALITY NOTICE: The information contained in this
communication may be confidential, and is intended only for the use of
the
recipients named above. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution,
or
copying of this communication, or any of its contents, is strictly
prohibited. If you have received this communication in error, please
return
it to the sender immediately and delete the original message and any copy
of it from your computer system. If you have any questions concerning
this
message, please contact the sender. ***
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



--

Regards
Evan Harris
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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