I want to overrule the usage of a certain Function key by using a script
e.g. like this (only this does not work )
IF ( ENV.key == "F20" ) {CALL MYPROG PARM('PARM1' 'PARM1'')}
Any suggestions how to do this with the corerct syntax?
Overrule Function Key script
Moderator: jeanmichel
Re: Overrule Function Key script
Hi Theo
Having this code in the OnLeave for the Screen worked for me:
and the test code for my CL (G14TEMP/CLTEST) was:
but remember that the Call will be executed "in parallel/submitted" by another job, in the aXes subsystem, under the aXes user, not in this job/interactive/session.
The ENV.key === null; is effectively stopping the key to be sent to the 5250 session.
Having this code in the OnLeave for the Screen worked for me:
Code: Select all
if (ENV.key == "F4") {
TABLEMANAGER.callProgram("CLTEST","G14TEMP",
{type:"alpha",len:10,value:"QGPL "} );
ENV.key === null;
}Code: Select all
PGM PARM(&LIB)
DCL VAR(&LIB) TYPE(*CHAR) LEN(10)
DSPLIB LIB(&LIB) OUTPUT(*PRINT)
ENDPGM The ENV.key === null; is effectively stopping the key to be sent to the 5250 session.
-
Theo de Bruin
- Posts: 5
- Joined: 02 Nov 2017, 01:04
Re: Overrule Function Key script
Hi Dino,
Thank you for this solution, but this only for AxesW3, and not for AxesJSM ?
As I'm getting this error when using AxesJSM
AXES.TableManager._oncallProgramOK: Error trapped - Attempt to invoke /agi/lua5/extservice_6.lua failure trapped by _oncallProgramFail
Should we then need to use the connector.call extension in Axes instead?
Regards,
Theo
Thank you for this solution, but this only for AxesW3, and not for AxesJSM ?
As I'm getting this error when using AxesJSM
AXES.TableManager._oncallProgramOK: Error trapped - Attempt to invoke /agi/lua5/extservice_6.lua failure trapped by _oncallProgramFail
Should we then need to use the connector.call extension in Axes instead?
Regards,
Theo
Re: Overrule Function Key script
Hi Theo,
Yes, if JSM, then instead of the:
you will need to use the connector call. I do not have a working example using that...
if you get one running, please share.
kind regards,
Yes, if JSM, then instead of the:
Code: Select all
TABLEMANAGER.callProgram("CLTEST","G14TEMP",
{type:"alpha",len:10,value:"QGPL "} );if you get one running, please share.
kind regards,