GETFIELD

The GETFIELD command retrieves the attributes of a field on the current aXes terminal screen by reference to either the field name (and an optional index for a subfile field) or to the screen row and column number of the field.

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.40.2 Using the AxesTerminalService for more information.

 

                                                          Optional

 

 GETFIELD -------- NAME ------------ screen field name  --------->

  

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

                                     value

   

               >-- ROW ------------- row number ----------------->

  

               >-- COL ------------- column number -------------->

  

                   RTNNAME --------- field-name ----------------->

  

               >-- RTNINDEX -------- field-name ----------------->

  

               >-- RTNROW ---------- field-name ----------------->

  

               >-- RTNCOL ---------- field-name ----------------->

  

               >-- RTNSUBFILEEXTENT  field-name -----------------|

  

Keywords

NAME

The name of the field whose attributes are 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. If NAME is not specified, then ROW and COL must be specified.

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).

ROW

The screen row number of the required field. The row and column together, if used, must refer to the first position of the required field. The value of this keyword is ignored if NAME is specified. Conversely, if NAME is not specified, then ROW and COL must be specified.

COL

The screen column number of the required field. The row and column together, if used, must refer to the first position of the required field. The value of this keyword is ignored if NAME is specified. Conversely, if NAME is not specified, then ROW and COL must be specified.

RTNNAME

The name of a field exchanged between your client program and the JSM that will receive the user-defined name of the field (if an aXes project name was specified on the CONNECT command) or the aXes field identifier if no project was specified or no name has been defined for the field.

RTNINDEX

If the field is contained in a subfile, this keyword may be used to specify the name of a field exchanged between your client program and the JSM that will receive the index of the instance on the current screen of the field. The first instance on the current screen has an index of 1, irrespective of the scroll position of the subfile.

RTNROW

The name of a field exchanged between your client program and the JSM that will receive the screen row number of the field.

RTNCOL

The name of a field exchanged between your client program and the JSM that will receive the screen column number of the field.

RTNSU BFILEEXTENT

If the field is contained in a subfile, this keyword may be used to specify the name of a field exchanged between your client program and the JSM that will receive the number of instances on the current screen for the field (the number of subfile records displayed on the current screen). For reliability, you should use this keyword for a field that is never conditioned on the subfile display - such as the option entry field in a "Work with" style display.

 

Examples

RDML Example:

DEFINE FIELD(#MYSFLEXT) REFFLD(#STD_NUM)

CHANGE FIELD(#JSMCMD) TO('GETFIELD ROW(8) COL(44) RTNSUBFILEEXTENT(MYSFLEXT) SERVICE_EXCHANGE(*FIELD)'

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

 

RDMLX Example:

define field(#mysflext) reffld(#std_num)

#jsmcommand := 'GETFIELD ROW(8) COL(44) RTNSUBFILEEXTENT(MYSFLEXT) SERVICE_EXCHANGE(*FIELD)'

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