You are here: Development Standards > Routines > General Routines > GENINPUT

# GENINPUT

GENINPUT is a general routine that interfaces to GENINPUT.PUB and GENGUINP.PUB for data entry. It occupies lines 6000–6199 and should be merged into all interactive programs. GENINPUT requires that GENERROR also be merged into the program.

Variable | Description
X0 | Row for data input
X1 | Column for data input
X2 | Page index for context-sensitive help
X3 | Type of input: 0 - string 1 - numeric 2 - string with a mask (such as a social security number) 3 - uppercase only string 5 - yes/no or toggled choice input with error trapping 6 - date field input with error trapping 7 - string (cursor is placed at end of field) 9 - other commands (single uppercase character) 10 - period input (blank entry not allowed) 11 - year input (blank entry not allowed) 12 - period/year input 13 - GL account number entry. GL Account is validated as active. 15 - toggled choice input (uses capitals in X1$ for toggles) 17 - uppercase only string (cursor is placed at end of field) 21 - period input (blank entry is allowed) 22 - year input (blank entry is allowed) 23 - period/year entry (blank entry is allowed) 24 - URL entry (Shift-F3 launches browser) 25 - email address entry (Shift-F3 launches email client) 26 - file browser dialog box (BBj only) 27 - directory browser dialog box (BBj only) 28 - file browser with path in STBL(“BBJFILEPATH”) (BBj only) 29 - GL account number entry. GL Account is not validated. -8 - other commands (traps edit keys and function keys) -9 - other commands (traps edit keys also)
X4 | Length of input field
X1$ | Entry and display mask for numeric and string with a mask input
X9 | Forced entry flag: 0 - begin with default value in X or X$ 1 - clear X or X$ before data entry X9 is set to 0 upon exit
X$ | String default value—set to value entered by user for string input
X | Numeric default value—set to value entered by user for numeric input
Y$ | Last command—a value of "P" or "J" and X9 set to 0 will cause GENINPUT to return without calling GENINPUT.PUB or GENGUINP.PUB for input. Y$ is set by GENINPUT.PUB or GENGUINP.PUB to the appropriate command value based on the last key the user pressed.
INFO | Information window status flag (0 = disabled, 1 = display INFO, 2 = display DETL)
WINDID$ | Inquiry window ID for the data field. The Inquiry key is available if WINDID$ contains a value. WINDID$ is cleared before GENINPUT returns.
SELVAL$ | Selection value for the inquiry window. This value, coupled with the inclusion and exclusion masks defined in the window, can be used to limit the entries that appear in an inquiry window. SELVAL$ is always cleared before GENINPUT returns.
PROGID$ | File maintenance program for the data field. The Maintenance key is available if PROGID$ contains a value.
FILE[ALL] | Standard file array for inquiry and file maintenance
YDISABLE$ | String of Y$ values that should be ignored. Only ESC sequence commands can be disabled (that is, Esc+X for Abandon, but no Ctrl+K for Up).
PGM(-2) | The standard BBx variable containing the name of the CALLing program
FLD_HLP$ | Help ID of common-field help screen
GUI_ID | GUI control ID of current entry field
BUTTON_KEYS$ [ALL] | Array to tie control ID’s of buttons to character keystroke equivalents
OSGUI$ | GUI template (see GENGURES.PUB)
GUI_RADIO$ | String of radio buttons to parse though when controlling radio button selection
GENINPUT$ | Template used for miscellaneous functions

Exit Points | Explanation
RETURN | GENINPUT normally RETURNs.
GOSUB GENERROR | GENERROR is called to process special commands in Y$. This makes GENINPUT subject to the exit points defined in GENERROR.
GOSUB 9200 | The delete record section is called if Y$ is "D". Once verified, this section exits by simulating the pressing of the Abandon key in GENERROR.

This chart breaks down the GENINPUT$ template:

Field | Description
DRILL:N(1*) | Set to 1 if drill-down is available. Used by GENLINE.PUB and GENGULIN.PUB
COL:N(2*) | Set to column user clicked on from a GUI grid. Used by drill-down.
ROW:N(2*) | Set to row user clicked on from a GUI grid. Used by drill-down.
RPTDFLT:N(1*) | Set to 1 if a report default(s) is available.
CONTROLID:N(5*) | Not Used
TAG:C(1) | Set by calling program if the current F2 inquiry window is a taggable HLE
LIST:C(1*) | Contains list of tagged keys. Passed in and out of GENWIND.PUB so tagged list is displayed and returned properly.
DISPLEN:C(1*) | Set by calling program on a text wrapping field. X4 is maximum length, while GENINPUT.DISPLEN is the maximum length to display on the screen.
APP:C(2*) | Used for period locking functionality. Contains appliation to check for a period lock. Used by period entry types.
RMPL:N(2*) | Channel RMPLx file is opened on.
RMPH:N(2*) | Channel RMPHx file is opened on.
CLIENT:N(1*) | Set to '1' if a GUI file open dialog box is to be preformed on the client workstation.
PASSWD:N(1*) | Set to 1 if current entry field is a password entry.
RTNCLICK:N(1*) | Set to 1 if GUI GENGUINP.PUB should return on each field click.