We have a subprogram with the following data definition (+FUNC is defined in COMMON):
define data global using COMMON
parameter
1 #parm (a10)
end-define
write "before assign value: " +FUNC
if +FUNC eq ’ ’
move “N” to +FUNC
end-if
write "after assigning value: " +FUNC
move “finished testing” to #parm
end
This subprogram is called from a java client via Broker/RPC Service.
When we 1st run the java program, we notice the output in the RPC Server log as follows:
before assign value:
after assigning value: N
That is expected.
We then run the java program a second time. Instead of seeing +FUNC being blank in the before assigned value, we see:
before assign value: N
after assigning value: N
That was a little surprising since both java executions are not related. They each do a broker logon and a broker logoff.
Why is the +FUNC value from the 1st java execution got carried over to the 2nd java execution?
Please advise. Thanks!