HTMLAPI Usage Examples
The following examples use this 5250 destination screen which is shipped with LANSA as process PSLSYS function INQUIRE. It allows the details of an employee to be displayed and updated. It initially has an arrival script like this:
vHandle_ARRIVE: function(oPayload, oPreviousForm)
{
/* If the department input field exists on the screen, display it */
if ( CHECK_FIELD_EXISTS("DEPTMENT") )
{
SHOW_CURRENT_FORM(true);
HIDE_5250_BUTTONS();
SETCURSORTOFIELD("SURNAME");
SETBUSY(false);
}
/* Otherwise send an F21 key to make the screen input capable */
else
{
SENDKEY(KeyF21);
}
/* <ARRIVE /> - Do not remove or alter this line */
return(true);
},
And it looks like this:
These fields have been named on this 5250 screen:
SURNAME |
Employee Surname |
GIVENAME |
Employee Given Name(s) |
ADDRESS1 |
Street No and Name |
ADDRESS2 |
Suburb or Town |
ADDRESS3 |
State and Country |
DEPTMENT |
Department Code |
SECTION |
Section Code |
DATE_START_DDMMYY |
Start date |
DATE_END_DDMMYY |
Termination Date |
DATE_ACQ_DDMMYY |
Date Skill Acquired (Subfile Column) |
PageDownMarker |
The "+" sign indicating more data in the subfile |
Note that what follows are examples only. What you do and how you work with your 5250 screens will be different. You need to adjust the approach you use to match your requirements.
Implementing a Basic Standard Layout function
Generically Modifying a Screen via the Standard Layout function
Specifically Modifying a Screen via a Specific Layout function
Adding More Capability to the Standard Generic Handler
What HTMLAPI functions are provided?