SETBYNAME

LANSA Integrator

SETBYNAME

The SETBYNAME command sets 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) and may (optionally) send the current aXes screen data to the aXes terminal server. It is comparable to typing at a 5250 terminal.

Note: You usually need to specify SERVICE_EXCHANGE(*FIELD) in the command string in order to receive the return values into your client program variables named on keywords beginning with RTNxxx. Refer to 5.41.2 Using the AxesTerminalService for more information.

 

                                                          Required

 

 SETBYNAME ------- NAME ------------ screen field name  --------->

  

               >-- VALUE ----------- value ----- ---------------->

 

                                                          Optional

 

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

                                     value

 

               >-- SENDKEY ----------(none) --------------------->

                                      ENTER

                                      F1  … F9

                                      F10 … F24

                                      HELP 

                                      PRINT

                                      PAGE_UP

                                      PAGE_DOWN

                                      ROLL_UP

                                      ROLL_DOWN

 

               >-- RTNSIG -- ------- field-name  ---------------->

 

               >-- RTNSCREEN ------- field-name  ----------------|

 

Keywords

NAME

This keyword must specify the name of the field whose value is to be set. 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 attributes are 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).

VALUE

This keyword must specify the value to be set in the specified field.

SENDKEY

If this keyword is specified, the command will send the current aXes screen data to the aXes terminal server using the function key specified (after successfully setting the field value). You may use any of the function key values shown above. If not specified, no send operation is performed.

RTNSIG

The name of a field exchanged between your client program and the JSM that will receive the screen signature of the screen that is present following the operation.

RTNSCREEN

The name of a field exchanged between your client program and the JSM that will receive the name of the screen that is present following the operation. The screen name is the user-defined name if an aXes project name was specified on the CONNECT command and a name was assigned to the screen. Otherwise the screen signature is returned.

 

Examples

RDML Example:

DEFINE FIELD(#MYSCREEN) REFFLD(#STD_TEXT)

CHANGE FIELD(#JSMCMD) TO('SETBYNAME NAME(FLD001) VALUE(ABC001) RTNSCREEN(MYSCREEN) SERVICE_EXCHANGE(*FIELD)'

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

 

RDMLX Example:

define field(#myscreen) reffld(#std_text)

#jsmcommand := 'SETBYNAME NAME(FLD001) VALUE(ABC001) RTNSCREEN(MYSCREEN) SERVICE_EXCHANGE(*FIELD)'

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