Whether you are writing your client application in RDML / RDMLX or RPG, you must complete the same basic steps.
Command Usage Example
The following example illustrates some common command patterns.
For example, the simplest application that connects to an aXes Terminal Server to fill one screen value and send ("enter") would typically issue the following sequence of service commands:
Note that the AxesTerminalService commands make extensive use of client program variables named in command keywords to return variable information to the client program. Such command keywords have names beginning with 'RTN'.
For example, to retrieve the value of a field on the current 5250 screen by reference to its screen row and column numbers and place the result in the client program variable named MYVALUE, a LANSA RDMLX client application might contain code like this:
define field(#myvalue) reffld(#std_text)
#jsmcommand := 'GETBYPOS ROW(10) COL(44) RTNVALUE(MYVALUE) SERVICE_EXCHANGE(*FIELD)'
use builtin(jsmx_command) with_args(#jsmhandle #jsmcommand) to_get(#jsmsts #jsmmsg)
if (#myvalue = 'XYZ')