Pathway/iTS Web Client Programming Manual (G06.24+)
SCREEN COBOL-to-Web Conversion Mappings
Compaq NonStop Pathway/iTS Web Client Programming Manual—520270-001
5-7
Mappings to User HTML Pages
For example, suppose that the following declarations appear in the SCREEN COBOL
source code:
WORKING-STORAGE SECTION.
01 WS-ITEM1 PIC 9(4) VALUE 4444.
01 WS-ITEM2 PIC 9(4) VALUE 8888.
SCREEN SECTION.
...
05 SCR-ITEM1 AT 10,10 PIC 9(4)
FROM WS-ITEM1
TO WS-ITEM2.
Then the following statement will display 4444 on the screen:
DISPLAY SCR-ITEM1.
The following statement will move a value to WS-ITEM2 only when it is changed on
the screen:
ACCEPT SCR-ITEM1 UNTIL F1.
The value of WS-ITEM2 retains its initial value ( 8888) until SCR-ITEM1 is modified
on the screen.
However, in the Java implementation, the corresponding working-storage item is
immediately modified with the displayed value. In the Java implementation of this
example, WS-ITEM2 will contain the value 4444.
Mappings to User HTML Pages
The converter converts the Screen Section of the SCREEN COBOL program into a set
of HTML pages. Each Base and Overlay screen gets converted into an HTML page.
The overlay areas within the Base Screen get converted to IFRAME elements. Each
HTML page has one HTML form, named SCRFORM. The names for the screen HTML
pages are derived from the names of the program units. The screen files are generated at
the location specified by the HTMLVOL parameter in the CONVERT command or at
the HTML location specified in the configuration file.
Screen fields that are part of the corresponding base and overlay screen are converted to
HTML fields of INPUT TYPE. Each HTML field has Name, MaxLength, and Size
attributes. The Name attributes associate each HTML field with one ScreenField object
in the Java class.
During the processing of Accept statements, you can click any of the function buttons
that are displayed near the bottom of the browser window. When you finish interacting
with the HTML page, click the desired function key button. The Termination Status is
updated according to the button that you click.
The HTML page also has two JavaScript functions, onLoadFunc and onOkBtnFunc.
These functions are called, respectively, when the page is loaded in UFrame and when
you click the OK button. Indirectly these functions call methods of the MainApp applet
and resume the execution of the applet.