GETBYNAME

LANSA Integrator

GETBYNAME

The GETBYNAME command retrieves the value of a field on the current aXes terminal screen by reference to the field name (and an optional index for a subfile field).

Note: You usually need to specify SERVICE_EXCHANGE(*FIELD) in the command string in order to receive the return value into your client program variable named on the RTNVALUE keyword. Refer to 5.41.2 Using the AxesTerminalService for more information.

 

                                                          Required

 

 GETBYNAME ------- NAME ------------ screen field name ---------->

  

               >-- RTNVALUE -------- field-name ----------------->

 

                                                          Optional 

 

               >-- INDEX ------------ 0 -------------------------|

                                      value

 

Keywords

NAME

Required. The name of the field whose value is to be retrieved. The name may be a user-defined name (if an aXes project name was specified on the CONNECT command) or an aXes field identifier.

INDEX

If the field is contained in a subfile, this keyword may specify the index of the instance on the current screen of the field whose value is to be retrieved. The first instance on the current screen has an index of 1, irrespective of the scroll position of the subfile. If your program needs to process fields in subfiles, it must do so a screen at a time and send ROLL_UP/ROLL_DOWN using the SEND command (just like a 5250 terminal user would have to do).

RTNVALUE

The name of a field exchanged between your client program and the JSM that will receive the value for the specified screen field.

 

Examples

RDML Example:

DEFINE FIELD(#MYCUSNUM) REFFLD(#STD_TEXT)

CHANGE FIELD(#JSMCMD) TO('GETBYNAME NAME(FLD001) RTNVALUE(MYCUSNUM) SERVICE_EXCHANGE(*FIELD)'

USE BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG)

 

RDMLX Example:

define field(#mycusnum) reffld(#std_text)

#jsmcommand := 'GETBYNAME NAME(FLD001) RTNVALUE(MYCUSNUM) SERVICE_EXCHANGE(*FIELD)'

use builtin(jsmx_command) with_args(#jsmhandle #jsmcommand) to_get(#jsmstatus #jsmmessage)