Virtel User Guide

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 321

DownloadVirtel User Guide
Open PDF In BrowserView PDF
Virtel User Guide
Release 4.57

Syspertec Communications

Feb 08, 2018

TABLE OF CONTENTS:

1 The Virtel Engine
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 What is Virtel . . . . . . . . . . . . . . . . . . . . . . . .
1.1.2 VIRTEL Web Access (VWA) . . . . . . . . . . . . . . .
1.1.3 VIRTEL Web Modernisation (VWM) . . . . . . . . . . .
1.1.4 VIRTEL Web Integration (VWI) . . . . . . . . . . . . .
1.1.5 VIRTEL Service Transactions . . . . . . . . . . . . . . .
1.2 VIRTEL URL Formats . . . . . . . . . . . . . . . . . . . . . . .
1.2.1 Static pages . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.2 How the path name corresponds to a VIRTEL directory
1.2.3 Dynamic pages . . . . . . . . . . . . . . . . . . . . . . .
1.2.4 3270 session management . . . . . . . . . . . . . . . . .
1.2.5 Capability URLs . . . . . . . . . . . . . . . . . . . . . .
1.2.6 Transmission of Security Tokens by URL . . . . . . . . .
1.2.7 Propagation of signon by URL . . . . . . . . . . . . . .
1.2.8 The Universal Transaction . . . . . . . . . . . . . . . . .
1.3 Directory Management . . . . . . . . . . . . . . . . . . . . . . .
1.3.1 Accessing the administration application . . . . . . . . .
1.3.2 Access through 3270 . . . . . . . . . . . . . . . . . . . .
1.3.3 Security . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.4 Creating, modifying, and deleting directories . . . . . . .
1.3.5 Defining directory parameters . . . . . . . . . . . . . . .
1.3.6 Associated functions . . . . . . . . . . . . . . . . . . . .
1.3.7 Acccess administration portal via the web . . . . . . . .
1.4 Creating Virtel Template Pages . . . . . . . . . . . . . . . . . .
1.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . .
1.4.2 Defining the tag delimiters . . . . . . . . . . . . . . . . .
1.4.3 Session and context management . . . . . . . . . . . . .
1.4.4 Transmitting data to the host . . . . . . . . . . . . . . .
1.4.5 Where to position the elements of an HTML page . . . .
1.4.6 Inserting host application data into a page . . . . . . . .
1.4.7 Colour and font management . . . . . . . . . . . . . . .
1.4.8 Cursor management . . . . . . . . . . . . . . . . . . . .
1.4.9 Function key management . . . . . . . . . . . . . . . . .
1.4.10 Setting and unsetting local options . . . . . . . . . . . .
1.4.11 Handling table variables . . . . . . . . . . . . . . . . . .
1.4.12 Inserting VIRTEL configuration values into a template .
1.4.13 Conditional generation . . . . . . . . . . . . . . . . . . .
1.4.14 Debugging facilities . . . . . . . . . . . . . . . . . . . . .
1.4.15 Signon and password management . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

3
3
3
5
8
11
12
13
13
14
19
21
23
23
24
24
25
25
25
26
26
28
29
30
33
33
33
34
35
35
36
42
45
47
49
50
54
56
58
58
i

1.4.16 Encryption management . . . . . . . . . . . . . . .
1.4.17 EBCDIC translation management . . . . . . . . . .
1.4.18 HTTP protocol management . . . . . . . . . . . .
1.4.19 Cache management . . . . . . . . . . . . . . . . . .
1.4.20 MIME type management . . . . . . . . . . . . . . .
1.4.21 Capability tokens . . . . . . . . . . . . . . . . . . .
1.4.22 Template Page upload . . . . . . . . . . . . . . . .
1.4.23 3287 printing . . . . . . . . . . . . . . . . . . . . .
1.4.24 Generating PDF output . . . . . . . . . . . . . . .
1.5 Web Access Customization . . . . . . . . . . . . . . . . . .
1.5.1 Uploading HTML Pages . . . . . . . . . . . . . . .
1.5.2 Web Access Settings . . . . . . . . . . . . . . . . .
1.6 Application Selection Menu . . . . . . . . . . . . . . . . . .
1.6.1 Contents of menu . . . . . . . . . . . . . . . . . . .
1.6.2 Presentation modes . . . . . . . . . . . . . . . . . .
1.7 Printing With Web Access . . . . . . . . . . . . . . . . . .
1.7.1 VIRTEL definitions for virtual printers . . . . . . .
1.7.2 Associating virtual printers with terminals . . . . .
1.7.3 Autoconnect for virtual printers . . . . . . . . . . .
1.7.4 VTAM definitions for virtual printers . . . . . . . .
1.7.5 CICS definitions for virtual printers . . . . . . . . .
1.7.6 Scenarios for SCS printing . . . . . . . . . . . . . .
1.7.7 SCS to PDF conversion . . . . . . . . . . . . . . .
1.7.8 PCL printing . . . . . . . . . . . . . . . . . . . . .
1.7.9 PCL to PDF conversion . . . . . . . . . . . . . . .
1.8 TSO File Transfer . . . . . . . . . . . . . . . . . . . . . . .
1.8.1 Definitions required for file transfer . . . . . . . . .
1.8.2 Toolbar icons for file transfer . . . . . . . . . . . .
1.8.3 Receiving a file . . . . . . . . . . . . . . . . . . . .
1.8.4 Sending a file . . . . . . . . . . . . . . . . . . . . .
1.8.5 Selecting PC Codepage for file transfer . . . . . . .
1.8.6 Saving and reusing file transfer parameters . . . . .
1.9 Accessing VTAM Applications . . . . . . . . . . . . . . . .
1.9.1 VTAM logon screen . . . . . . . . . . . . . . . . . .
1.9.2 Installing the VTAM logon transaction . . . . . . .
1.10 Site Customization - Colors And Logo . . . . . . . . . . . .
1.10.1 Using a CSS file for customization . . . . . . . . .
1.10.2 Customizing the toolbar color by application . . .
1.10.3 Adding custom text to the toolbar . . . . . . . . .
1.10.4 Showing / Hiding server informations . . . . . . . .
1.10.5 Hiding the toolbar . . . . . . . . . . . . . . . . . .
1.10.6 Adding a company logo . . . . . . . . . . . . . . .
1.10.7 Removing 3D/hover effects on the toolbar buttons
1.10.8 Changing background color of the toolbar buttons
1.10.9 Icon display troubleshooting . . . . . . . . . . . . .
1.11 Site Customization - Javascript Functions . . . . . . . . . .
1.11.1 Javascript Exits which can be customized . . . . .
1.11.2 Customizing Toolbar icons . . . . . . . . . . . . . .
1.11.3 Centering non-standard icons . . . . . . . . . . . .
1.11.4 Removing unwanted toolbar icons . . . . . . . . . .
1.11.5 Positioning Toolbar Icons . . . . . . . . . . . . . .
1.11.6 Modifying the text of the status bar . . . . . . . .
1.11.7 Custom hotspot recognition . . . . . . . . . . . . .
1.11.8 Adding a watermark to the 3270 screen . . . . . . .
ii

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

60
61
63
64
64
65
66
67
68
70
70
70
80
80
81
84
84
85
86
87
87
88
88
88
88
90
90
90
91
94
98
98
100
100
101
102
102
103
103
104
105
106
106
107
107
108
108
109
110
110
111
112
113
113

1.11.9 Modifying Web Access Settings . . . . . . . . . . . . . . . . . . . .
1.12 Site Customization - The Help Page . . . . . . . . . . . . . . . . . . . . . .
1.12.1 Standard Help Page . . . . . . . . . . . . . . . . . . . . . . . . . .
1.12.2 Installing a Custom Help Page . . . . . . . . . . . . . . . . . . . .
1.13 Enable Copy, Cut And Paste . . . . . . . . . . . . . . . . . . . . . . . . . .
1.13.1 Internet Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.13.2 Firefox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.13.3 Chrome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.13.4 Manage the settings on Host with chrome . . . . . . . . . . . . . .
1.13.5 Using Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.13.6 Edge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.14 Virtel Customization Modes . . . . . . . . . . . . . . . . . . . . . . . . . .
1.14.1 Compatibility Mode . . . . . . . . . . . . . . . . . . . . . . . . . .
1.14.2 Option mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.14.3 Default mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.14.4 Global level modifications (All transactions under an Entry Point)
1.14.5 Transaction level modifications (Individual transactions) . . . . . .
1.14.6 Compatibility Option id . . . . . . . . . . . . . . . . . . . . . . . .
1.14.7 Defining Transaction Options . . . . . . . . . . . . . . . . . . . . .
1.15 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.15.1 Storing the Macros . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.15.2 Macros in Local Storage . . . . . . . . . . . . . . . . . . . . . . . .
1.15.3 Macro controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.15.4 Macros in VIRTEL Storage . . . . . . . . . . . . . . . . . . . . . .
1.15.5 Setting up to use DDI and macros . . . . . . . . . . . . . . . . . .
1.15.6 User Macros synchronization . . . . . . . . . . . . . . . . . . . . .
1.15.7 Managing macros with DDI . . . . . . . . . . . . . . . . . . . . . .
1.15.8 Automatic refresh of macros in local storage . . . . . . . . . . . . .
1.15.9 Format of the macros.json file . . . . . . . . . . . . . . . . . . . . .
1.15.10 Available macro commands . . . . . . . . . . . . . . . . . . . . . .
1.15.11 DDI Macro Errors . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.16 VIRTEL Web Modernisation . . . . . . . . . . . . . . . . . . . . . . . . . .
1.16.1 VIRTEL Presentation modules and Scenarios . . . . . . . . . . . .
1.16.2 Scenarios stored in a load library . . . . . . . . . . . . . . . . . . .
1.16.3 Scenarios stored in a VSAM directory . . . . . . . . . . . . . . . .
1.16.4 Using a presentation module . . . . . . . . . . . . . . . . . . . . . .
1.16.5 Types of scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.16.6 Virtel Scenario language . . . . . . . . . . . . . . . . . . . . . . . .
1.16.7 Examples of VIRTEL Web Modernisation Scenarios . . . . . . . .
1.16.8 Scenario AUTOREFRESH . . . . . . . . . . . . . . . . . . . . . . .
1.16.9 PDF output generation . . . . . . . . . . . . . . . . . . . . . . . . .
1.17 VIRTEL Web Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.17.1 Parsing Query input . . . . . . . . . . . . . . . . . . . . . . . . . .
1.17.2 Parsing XML input . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.17.3 Presentation of XML output . . . . . . . . . . . . . . . . . . . . . .
1.17.4 VIRTEL as an XML parser/generator . . . . . . . . . . . . . . . .
1.17.5 Automatic scenario generation . . . . . . . . . . . . . . . . . . . . .
1.18 Incoming E-mails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.18.1 Rules of the SMTP line . . . . . . . . . . . . . . . . . . . . . . . .
1.18.2 File transfer by e-mail . . . . . . . . . . . . . . . . . . . . . . . . .
1.18.3 Starting an application by E-Mail . . . . . . . . . . . . . . . . . . .
1.19 VIRTEL Batch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.19.1 Assembling the VIRTCT for VIRTEL Batch . . . . . . . . . . . . .
1.19.2 Allocating the page template file for VIRTEL Batch . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

114
115
115
116
118
118
118
122
125
127
129
130
130
131
131
131
133
134
134
139
139
140
141
143
143
146
146
153
153
153
154
155
155
155
155
156
156
158
210
215
216
219
219
221
226
228
232
235
235
235
236
239
239
241
iii

1.19.3
1.19.4
1.19.5
1.19.6
1.19.7

Allocating work files for VIRTEL Batch
Running the VIRTEL Batch job . . . . .
VIRTEL Batch commands . . . . . . . .
VIRTEL Batch RAW command . . . . .
VIRTEL Batch return codes . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

241
242
243
244
245

2 Outgoing Calls
247
2.1 Outgoing E-mails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
3 Programming Interfaces
3.1 Structred Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 General format of a 3270 structured field . . . . . . . . . . . . . . .
3.1.2 Sending structured fields via the Write Structured Field command
3.1.3 Sending structured fields using the SRTVIRTEL prefix . . . . . . .
3.1.4 How To Determine If Running Under Virtel . . . . . . . . . . . . .
3.1.5 Use a different transaction code . . . . . . . . . . . . . . . . . . . .
3.1.6 Include parameters after the transaction code . . . . . . . . . . . .
3.1.7 Use a specific range of terminal names . . . . . . . . . . . . . . . .
3.1.8 FA88: Transmit large data message to application . . . . . . . . . .
3.1.9 FAC8: Selection of page template . . . . . . . . . . . . . . . . . . .
3.1.10 FAE5, FAE6: Sending a table variable . . . . . . . . . . . . . . . .
3.1.11 Call Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.12 HOST4WEB commands . . . . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

249
249
249
250
250
250
250
251
252
253
254
256
257
265

4 Incoming Calls
269
4.1 Incoming E-mails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
4.1.1 FAC8: Retrieve data from an e-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
4.1.2 FAD4: Sending an e-mail from a host application . . . . . . . . . . . . . . . . . . . . 272
5 Security
5.1 VIRTEL Web Access Security . . . . . . . .
5.1.1 Specifying security in the entry point
5.1.2 Specifying security in the transaction
5.1.3 Mixed-case password support . . . .
5.1.4 Automatic retrieval of username . . .
5.1.5 Data encryption by AT-TLS/SSL . .
5.1.6 Identification by certificate . . . . . .
5.1.7 Password encryption . . . . . . . . .
5.1.8 Signon using HTML fields . . . . . .
5.1.9 Virtel Rules . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

275
275
275
276
276
276
277
277
278
278
279

6 HOWTOs
6.1 How To Use Different Screen Sizes . . . . . . . . . . . . .
6.1.1 LOGMODE defined by the transaction . . . . . .
6.1.2 Assigning a LOGMODE by URL parameter . . .
6.1.3 User-specified LOGMODE . . . . . . . . . . . . .
6.1.4 Dynamic logmode with user-specified screen size
6.2 How To Support Multiple Codes Pages . . . . . . . . . .
6.2.1 Defining Code Pages translation defaults . . . . .
6.2.2 Supporting multiple countries. . . . . . . . . . . .
6.3 How To Handle Host Session Termination . . . . . . . . .
6.3.1 Return to the application selection menu . . . . .
6.3.2 Displaying a specific page on disconnection . . .
6.3.3 Closing the browser window automatically . . . .
6.4 How To Access A Host Application Directly . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.

283
283
283
284
285
286
286
286
287
287
287
287
288
288

iv

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

6.4.1 Full path URL . . . . . . . . . . . .
6.4.2 Default URL for the entry point . . .
6.5 How To Change The Font For Web Access .
6.6 How To Change The 3270 Display Style . . .
6.7 How To Customize The Enter Key Settings .
6.7.1 Managing CTRL keydown being lost
6.8 How To Customize Display Styles . . . . . .
6.8.1 Add or remove a display style . . . .
6.8.2 Add or remove a print style . . . . .
6.8.3 3270 support blinking fields . . . . .
6.9 How To Change The Default User Settings .
6.10 How To Support A Reverse Proxy . . . . . .
6.11 How To Support Virtual Hosting . . . . . . .
6.12 How To Control APPLIST behaviour . . . .
7 Appendix
7.1 Appendix A . . . . .
7.1.1 Default values
7.2 Trademarks . . . . . .
7.3 Open Source Software

. .
for
. .
. .

. . . . . . . . . .
W2H parameters
. . . . . . . . . .
. . . . . . . . . .

.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.

288
289
289
289
290
290
290
290
291
292
293
293
293
293

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

295
295
295
296
297

v

vi

Virtel User Guide, Release 4.57

VIRTEL User Guide
Warning: This is a draft version of the document.
Version : 4.57
Release Date : 08 Jan 2018. Publication Date : 08/01/2018
Syspertec Communication
196, Bureaux de la Colline 92213 Saint-Cloud Cedex Tél. : +33 (0) 1 46 02 60 42
www.syspertec.com
NOTICE
Reproduction, transfer, distribution, or storage, in any form, of all or any part of the contents of
this document, except by prior authorization of SysperTec Communication, is prohibited.
Every possible effort has been made by SysperTec Communication to ensure that this document
is complete and relevant. In no case can SysperTec Communication be held responsible for any
damages, direct or indirect, caused by errors or omissions in this document.
As SysperTec Communication uses a continuous development methodology; the information contained in this document may be subject to change without notice. Nothing in this document
should be construed in any manner as conferring a right to use, in whole or in part, the products
or trademarks quoted herein.
“SysperTec Communication” and “VIRTEL” are registered trademarks. Names of other products
and companies mentioned in this document may be trademarks or registered trademarks of their
respective owners.

TABLE OF CONTENTS:

1

Virtel User Guide, Release 4.57
What’s new in Virtel 4.57
VIRTEL Web Access:
• Bidirectional presentation support.
• Enhanced font stretch mode. Optimization of screen size.
• Additional RACHECK support for ForceLUNAME
• Licence warning feature
• Enhancements to USSMSG10 support module
• Enhancements to Virtel Web Macro interface (VWM)
– Keyboard mapping enhancements
• Enhancements to Virtel Dynamic Directories Interface (DDI)
– Hotkey support for DDI macros
– New refresh options.
VIRTEL Web Modernisation & Integration:
• Enhancements to COPY$ NAME-OF. Support for TERMINAL, GROUP and RELAY items.
• Enhancements to DEFAULT-FILED-WITH-CURSOR statement.
Miscellaneous:
• Customizable HELP solution.
• DNS access to resolve IP address or DNS name.
• TCT option to support mixed case passwords
• Additional language support
• Batch export/import of RAW TRSF files.
Note: For further details see the Technical Newsletter: TN201706 - What’s new in Virtel 4.57.

2

TABLE OF CONTENTS:

CHAPTER

ONE
THE VIRTEL ENGINE

1.1 Introduction
1.1.1 What is Virtel
Simply put, Virtel is a host-based protocol converter that runs as a started task on the mainframe. At
the core of Virtel is the Virtel Engine which sits between host applications and external environments such
as the web or another external server. Virtel supports the following standard protocol - TCP/IP, SMTP,
HTTP/S, SOAP, MQ-SERIES, SNA, 3270, ICAL (IMS) and the inherited protocols - X25, XOT, XTP,
LU 6.2 to interface between host applications and external services. A classic example for Virtel would
be interfacing between legacy 3270 applications, running on the host, and the web. Virtel would provide
protocol conversion between data arriving from the browser is converted into a 3270 data-stream and sent
to the application. Users would no longer require 3270 terminal emulators products to interface with legacy
host applications. Access can now be provided through the users standard web browser. Various character
code page sets are supported, including DBCS character code sets.
The following diagram illustrates some of the protocols and applications supported by the Virtel Engine.

The Virtel Engine
3

Virtel User Guide, Release 4.57
Virtel provides three models. Web Access (VWA/W2H), Web Modernisation (VWM) and Web Integration
(VWI). In the next section each model is described in detail. Regardless of the model, Virtel’s mainframe
requirements are the same. The basic file requirements are as follows:• SAMP TRSF VSAM File. Contains the templates and web artefacts (JavaScript, Images, HTML, CSS
elements etc.) which are served to the browser.
• HTML TRSF VSAM File. Contains user customisation web artefacts (JavaScript, HTML, Images,
HTML, CSS elements etc.)
• LOADLIB PDS. Virtel load library
• ARBO VSAM File. Contains customer configuration data.
• Ancillary files. Statistics, logs, tracing etc.
Virtel normally runs as a started task on the mainframe. Multiple instances of Virtel can be run on the
same LPAR and can run within a SYSPLEX environment, benefiting from the load balancing services that
such environments provide. See the Virtel Installation manual for a full description of the Virtel mainframe
requirements. Virtel can also be run as a batch process, providing a “batch” service between external servers.
See the section Virtel Batch or the Virtel Connectivity Manual for further information on running Virtel in
batch.
Like any other web page servers Virtel responds to an incoming URL and serves template pages. The URL
targets one of the TCPIP ports that Virtel is listening on. The URL will identify the IP address of the
z/OS environment, and the port address will target the Virtel Instance. The pathname and parameters of
the URL will identify the Virtel Transaction that will be used to process the URL request. A URL example
is shown below. This is a URL requesting a connection to a CICS application called SPCICS. SPCICS is
the name of the Virtel transaction that will deal with the request. The pathname “/w2h/WEB2AJAX.htm”
identifies a Virtel 3270 template that will be used to support the transaction, providing the framework to
convert between 3270 data-stream and HTML presentations.
http://192.168.170.33:41002/w2h/WEB2AJAX.htm+SPCICS

For more information on the Virtel URL formats see the section Virtel URL Formats.

4

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

1.1.2 VIRTEL Web Access (VWA)
VIRTEL Web Access, formerly known as “Web-to-Host” (W2H), is a set of functions which provides access
to mainframe 3270 legacy applications via the user’s browser window. In the VWA model the Virtel Engine
comprises of two components, a HTTP server and a VTAM component serving the back-end VTAM legacy
applications, pertaining to operate as an LU2 device(s).
The principle operation of VWA is the production and delivery of 3270 data-streams as HTML pages. Static
template page and web elements supporting VWA are stored and maintained in a Virtel directory on the
mainframe at the host site. The pages served to the browser contain standard HTML tags, CSS, JavaScript
elements and HTML tags specific to VIRTEL. Invoked by a browser or a program, these pages form the basis
of an “on the fly” translation of 3270 data-streams, thus enabling the dynamic generation and delivery of a
3270 presentation to the browser. No terminal emulation software is required. The VWA model also includes
functions which allow dynamic modification of the original 3270 presentation, with the aim of making the
interface as “clickable” as possible. This chapter describes the set of functions required to support VWA
and presupposes a certain knowledge Web technologies and HTML page construction.
Some fundamental differences to standard terminal emulation protocol must be taken into consideration:
1. Sessions between a browser and the Virtel HTTP server are in disconnected mode, while they are in
connected mode between VIRTEL VTAM component and the host application.
2. The flow of information between the Virtel HTTP server and a client’s browser occurs on the initiative
of the client or through an optional ‘Long Poll’ asynchronous session.
3. A single request from the browser will only invoke a single response from the HTTP server, while the
transmission of a message to an application on the host may generate several response messages at
once (for example, a message to clear the screen followed by a new screen image).
These differences give rise to a need to ensure maintenance of session context between a client and a host
application. This is done by the SESSION-CODE tag embedded in the Virtel template pages. Although
the HTML pages used to display 3270 data contain specific VIRTEL tags, these pages can be developed
using standard web development tools. The pages containing VIRTEL specific tags are stored in a VIRTEL
directory along with other Virtel web elements such as Java Script modules, CSS style sheets and images.
The VIRTEL directory, known as the W2H directory, is located in the VSAM SAMP.TRSF file.

1.1. Introduction

5

Virtel User Guide, Release 4.57
Let’s look at how VWA works.

VWA Overview
1. The user enters a URL which points to the Virtel Engine.
In this case http:www.myHost.com/WEB2AJAX+TSO5. Virtel, running as a web server, will be listening on default port
80 for any incoming calls. When Virtel receives the call-in it will process the pathname of the URL
(/WEB2AJAX+TSO5) to determine a course of action.
2. The pathname /WEB2AJAX+TSO identifies a Virtel HTML page TEMPLATE (WEB2AJAX) and a
transaction. In this case the transaction is TSO. Virtel, through its configuration, recognizes the TSO
transaction as being a VTAM application and initiates a VTAM session with TSO.
3. A VTAM connection is established between TSO and Virtel with Virtel acting as a virtual terminal
relay between the browser and TSO. Subsequent HTML pages received from the browser will now be
converted to 3270 data streams and will be sent to TSO as if they had come from a 3270 terminal. 3270
data streams sent by the TSO application will be converted into HTML pages using the WEB2AJAX
template and sent to the browser.
4. TSO responds to the session request and sends a 3270 screen to Virtel.
5. Virtel, acting as a SLU in the VTAM session, receives the 3270 data stream from the host and constructs
a HTML web-page incorporating the 3270 data. It uses the HTML page WEB2AJAX.HTML as a
template. Virtel pages are maintained in the W2H directory located within the SAMP.TRSF VSAM
file.
6. The constructed HTML page is sent to the users browser.
7. The browser displays the page created by Virtel which will resemble a 3270 screen.

6

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57
Features of Virtels VWA Presentation
A sophisticated and rich set of features are available with VWA through the use of the tool bar. Configuration
of the tool-bar is also possible. The following list summarizes the tool-bar features presented with the
standard VWA 3270 template:-

VWA 3270 Example
• Keyboard Controls. A user can send a variety of keyboard functions, such as PA2, ATTN,
etc. through the keyboard control.
• IND$FILE support.
Note: The IND$FILE function must not be considered as a replacement for a FTP client/server
architecture. Sending or receiving large files across this interface could result in performance
issues. Virtel provides a means of restricting file transfer sizes to avoid such a situation.
• Screen capture controls which provide a variety of capture options including 1/2/3 page-up
images within a single capture buffer.
• User setting controls enables an individual user to set their own Virtel controls and preferences.
• Macro Support. Enables a user to create macros to drive screen logic and repetitive tasks.
• Configurable help panels. Bespoke help panels can be developed to support business applications.
• Language support. Virtel supports a variety of different languages.

1.1. Introduction

7

Virtel User Guide, Release 4.57

1.1.3 VIRTEL Web Modernisation (VWM)
VIRTEL Web Modernisation, formerly known as “Host-Web-Services” (HWS), allows the presentation of
3270 host applications to be modified, without modifying the application itself. The presentation can be
adapted to a format (HTML, XML, Excel, etc.) suited to the requester, while hiding the details of navigation
within the 3270 transactions.
This function is implemented through a combination of the VIRTEL Web Access functions described in
Creating HTML and XML templates, and the Virtel scenario language described in Web Modernisation
VIRTEL Scenarios.
VIRTEL Web Modernisation allows “frozen” or “untouchable” 3270 transactions to be accessed by intermediate servers (n-tier architecture) or from a browser, while hiding the details of navigation within the
transactions. Variable input data for the transaction can either be included in the URL (GET method), or
sent as data with the HTTP request (POST method).
With modernisation, for example, several 3270 round trips can be made to the host application within a
presentation scenario before returning the final result to the browser. Data could be extracted from the
individual host responses and encapsulated into one HTML page. For example when a user requests a “list”
this could result in a sequence of key strokes and displays between the application and Virtel. Taking the
example:User enters "ASMITH" in CICS MAP as a search operand. Presses Enter.
First Screen returned.
User press PFK8 to obtain next screen.
Second screen returned.
User press PFK8 to obtain next screen.
Third screen returned. Last in sequence.

The above business logic i.e. “search for a name” can be incorporated into a Virtel Scenario as illustrated in
the diagram below. We have called the scenario GETDATA. The user enters the search argument “ASMITH”
and presses Enter. The HTML request is sent to Virtel. The HTML request, based upon the submitted
URL, is targeted towards transaction CUSTDATA which is a VTAM application transaction associated with
CICS6, a legacy CICS application. The CUSTDATA Virtel transaction is defined with scenario GETDATA.
This configuration data is maintained in the VIRTEL ARBO file.

8

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57
When the user submits the URL from the browser Virtel will establishe a VTAM session with CICS6 and
then will continue to run the scenario GETDATA. The scenario contains the business logic which will perfom
the key stokes to obtain all the relevant data from multiple 3270 screens. The scenario will then build a
modernised web page which will contain a GUI “drop down list” encapsulating all data obtained from the
three 3270 CICS displays. The HTML response is sent back to the user.
The user has entered only one keystroke to submit the transaction and received one response. The data
within the HTML response will represent all the data extracted from several 3270 displays. The response
data will be presented in a “modernised” GUI fashion.

VWM Overview
1. The user enters a URL which identifies the Virtel transaction CUSTDATA.
2. The configuration data for the transaction CUSTDATA is loaded from the Virtel Configuration repository held within the Virtel ARBO VSAM dataset. The transaction CUSTDATA has a scenario
associated with it called GETDATA.
3. The GETDATA scenario is then used to navaigate through 3270 screens, collecting data from each
screen.
4. The scenarion builds a “clickable” GUI template using the data extracted from the three 3270 screens.
The template is presented to the browser.
5. The user has a modernised version of the original 3270 presentation incorporating a GUI drop down
from which they can navigate to the next sceen. A master/detail pattern has been deployed by
1.1. Introduction

9

Virtel User Guide, Release 4.57
the Virtel scenario, presenting the user with data from three separate 3270 screens. Modernisation
improves the users UX/UI presentation experince and by doing so enhances and improvers navigation
of the legacy business logic. Less network transfer is consumed as the number of original 3270 screens
is consolidated into one Virtel GUI master/detail screen.

10

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

1.1.4 VIRTEL Web Integration (VWI)
The objective of VIRTEL Web Integration, formerly known as “Host-for-Web” (H4W), is to allow a host
application to take maximum control of its web interface, for example through web services. This is in
complete contrast to VWA/VWM, whose objective is to avoid modification of host applications.
To control its web interface, an application has at its disposal primarily the 3270 screen, the VIRTEL table
variable facility, the HTML page template, and a set of VIRTEL commands contained in structured fields.
Additionally, for browser requests which enter VIRTEL using an entry point which specifies emulation type
“HOST4WEB”, the application can also use a set of VIRTEL control commands which can be embedded in
the 3270 screen via a BMS map, ISPF panel, or 3270 data stream. These HOST4WEB commands, available
from VIRTEL version 4.28 onwards, provide the same general functions as the structured field commands
in earlier versions.
Table variables, structured field commands, and HOST4WEB commands, are sent by the application to the
3270 session using standard methods (EXEC CICS SEND, ISPEXEC DISPLAY PANEL, TSO TPUT, etc).
VIRTEL intercepts and acts upon these commands, for example by selecting the page template or loading
data which can be referenced by VIRTEL orders embedded in the page templates and used to build lists of
values or data tables.
VMI enables an application to create a dynamic dialog between its transactions and web applications through
the creation of interactive bidirectional dialogs across the Internet between host (CICS, IMS, Ideal, Natural,
etc.) and server-based applications using XML/HTML web services or other communication procedures.
Incoming and outgoing Web Services Support
Incoming calls
• To expose host applications to web clients though web services, Virtel can be configured to:
• Receive and parse incoming web service calls
• Execute the appropriate transactions
• Receive data returned by the transactions in the form of screens, structured fields, COMMAREA, or
database segments
• Reformat and wrap that data with XML, JSON, HTML, SOAP, CSV, PDF, Word, JSON, etc.
• Serve it back to the web callers
Outgoing calls
• In the outgoing direction (host-initiated web services) the mechanism is the same, just reverse.
VWI can be configured to support a wide range of interfaces, protocols and APIs which can :• Expose mainframe applications and data as web services to web clients
• Invoke web services for the count of mainframe applications
• Support interactive exchange procedures between mainframe and web applications for cooperative work
• Function as a SOAP, MQ, PHP… server
• Transfer data blocks larger than 32KB, or blocks of data with variable format
• Convert data from DBCS (Double Byte Character Set) used by Japanese, Chinese, Russian… workstations or applications to EBCDIC, and vice/versa
• Serve 3270 data as international icons to eliminate natural languages from user interfaces
• Replace web connectors developed by IBM (CWS, CTG, HOD, IMS Connect, etc) and ISVs, or homegrown (CICS socket programming)

1.1. Introduction

11

Virtel User Guide, Release 4.57

VWI Overview
For more information, refer to the chapter “Programming Interfaces”.

1.1.5 VIRTEL Service Transactions
A Service Transaction is a long-running VIRTEL transaction which maintains a session with a host application and uses this session to serve a series of HTTP request / responses. Unlike a regular HTTP transaction,
which serves requests only from its originating user, identified by a specific VIRTEL SESSION-CODE, a
service transaction can serve a different user each time it processes an HTTP request. Service transactions
are typically used to provide fast access to public information such as the lists of field values displayed by
the “VIRTEL Suggest” feature.
A service transaction is started by an HTTP URL in exactly the same way as a regular transaction, but when
it has finished processing its first HTTP request, it indicates its readiness to serve another user, either by
means of the script command &) described under the heading “Transactions — Connection / Disconnection
Scripts” in the VIRTEL Connectivity Reference documentation, or by means of the ACTION$ SERVEANOTHER-USER command in a scenario.
A service transaction remains connected to the host application between input messages. It is then eligible
to process any HTTP request which specifies the same entry point and transaction name. Since service
transactions can potentially be used by many different users, a typical service transaction will provide
information which is not sensitive to being signed-on as a particular user.

12

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

1.2 VIRTEL URL Formats
1.2.1 Static pages
Virtel locates static HTML pages through the URL passed to the Virtel Engine and the configuration definitions defined within the Virtel ARBO VSAM file. An endpoint for Virtel is defined by a Virtel line definition
which identifies the TCP/IP port that Virtel listens on for incoming calls. By default Virtel uses two endpoints or ports, 41001 for Administration and port 41002 for user or client transactions. Each endpoint is associated with a default Entry Point; WEB2HOST in the case of 41001 and CLIWHOST for 41002. Transactions
are associated with End Points. An endpoint can be associated with more than one Entry Point. Virtel provides a Rule facility whereby an Entry Point can be selected by incoming call criteria - IP address for example.

Virtel Static Pages
Virtel stores pages and web elements within VIRTEL diretories located in TRSF VSAM files. The general
form of the URL for an HTML page stored in a VIRTEL directory is:
http://ipaddr:port/pathname/pagename

ipaddr:port Corresponds to the “Local ident” field of an HTTP line defined to VIRTEL. The rules of the
line are used to select the entry point. This entry point, which must specify emulation type HTML,
contains the list of transactions which the user is authorized to invoke.
pathname Represents a VIRTEL directory containing HTML pages or other elements. Refer to the section
“How the path name corresponds to a VIRTEL directory” below for details of how the pathname is
1.2. VIRTEL URL Formats

13

Virtel User Guide, Release 4.57
used to select the VIRTEL directory.
pagename Is the name of an element (HTML page, etc.) in the specified directory. VIRTEL converts the
element name to upper case (unless “case sensitive” is specified in the directory definition), and truncates the name if necessary to the maximum length specified in the directory definition (see “Directory
Management”).
VIRTEL also accepts certain abbreviated forms of the URL:
http://ipaddr:port/pathname

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described above. In this case, VIRTEL loads a default page
from this directory. The default page name is the same as the entry point name. Note: the trailing
slash is compulsory.
http://ipaddr:port/pagename

ipaddr:port Is the address of the HTTP line, as before.
pagename Is the name of a page to be loaded from the default directory. The default directory corresponds
to a default pathname equal to the entry point name.
http://ipaddr:port

ipaddr:port Is the address of the HTTP line, as before.
In this case, VIRTEL loads the default URL. VIRTEL obtains the default URL from the “TIOA at logon”
field of the default transaction. The default transaction is a type 4 transaction which has the same name as
the entry point. See example 7 below for an example of a default URL. If the “TIOA at logon” field of the
default transaction is blank, then VIRTEL loads the default page from the default directory. The default
page has the same name as the entry point, and the default directory corresponds to a default pathname
equal to the entry point name.

1.2.2 How the path name corresponds to a VIRTEL directory
The pathname specified in a VIRTEL URL is used to select a VIRTEL directory which contains
HTML page templates and other elements such as CSS stylesheets, JavaScript procedures, and
GIF or JPEG images. VIRTEL directories have a simple 8-character case-insensitive name,
whereas the pathname is expressed in Unix-style syntax (one or more casesensitive components separated by slashes), as is conventional for web applications. VIRTEL
must therefore translate the Unix-style pathname into a VIRTEL directory name.
The process of mapping a pathname to a VIRTEL directory name is carried out by means of
VIRTEL transactions which are defined under the entry point selected for each request by the
rules of the HTTP line. The entry point contains both processing transactions (application types
1, 2, and 3) and directory transactions (application type 4).
To find the directory which corresponds to the pathname, VIRTEL looks for a type 4 transaction
whose external name matches the first component of the pathname, and whose “Check URL
prefix” field is either blank or matches the start of the pathname. The name of the VIRTEL
directory is contained in the “Application name” field of the first such matching transaction found
under the entry point.
Note:

14

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57
• The comparison of the first component of the pathname with the transaction external name
is case insensitive, and if the first component of the pathname is longer than 8 characters,
only the first 8 characters are compared.
• The comparison of the beginning of the pathname against the transaction’s “Check URL
prefix” field is case sensitive.
• The “Check URL prefix” field may contain “%20” to represent a blank and “?” to ignore a
character position.
• If the “Check URL prefix” field is completely blank it is considered to match any pathname
whose first component matches the transaction external name.

Examples
Assume that entry point WEB2HOST contains the following transactions:

Transactions under entry point WEB2HOST
In this example, transactions W2H-00, W2H-03*, W2H-05* are “application type 4” (directory transactions).
Other transactions, such as “application type 1” (processing transactions i.e. TSO, CICS, etc.) play no part
in the directory selection process.
The figure below shows an example of the detail of a directory transaction:-

1.2. VIRTEL URL Formats

15

Virtel User Guide, Release 4.57

Example of a directory transaction
Example 1: Neither pathname nor pagename specified
http://ipaddr:port

The pathname defaults to the entry point name, WEB2HOST, which matches transaction W2H-00. The
pagename also defaults to WEB2HOST. VIRTEL therefore fetches page WEB2HOST from the directory
W2H-DIR.
Example 2: pagename specified
http://ipaddr:port/menu.htm

The pathname defaults to the entry point name, WEB2HOST, which matches transaction W2H-00. VIRTEL
therefore fetches page menu.htm from the directory W2H-DIR.
Example 3: Pathname specified
http://ipaddr:port/w2h/user/

The pathname /w2h/user matches transaction W2H-04. The pagename defaults to the entry point name,
WEB2HOST. VIRTEL therefore fetches page WEB2HOST from the directory USR-DIR.

16

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57
Example 4: Pathname and pagename specified
http://ipaddr:port/w2h/user/index.html

The pathname /w2h/user matches transaction W2H-03U. VIRTEL therefore fetches page index.html from
the directory USR-DIR.
http://ipaddr:port/home/user3/index.html

Example 5: Undefined pathname specified
http://ipaddr:port/w2h/badpath/index.html

In this case the pathname /w2h/badpath does not match any transaction. VIRTEL therefore rejects the
request.
Example 6: Partly-defined pathname specified
http://ipaddr:port/SECURE/misc/myPage.html

The pathname /SECURE/misc is not specifically defined to VIRTEL. However there is a transaction W2H-02
whose external name is SECURE and whose “Check URL prefix” field is blank, which matches all pathnames
whose first component is /SECURE. VIRTEL therefore fetches the any /SECURE/misc/myPage.html from
the designated directory W2H-DIR.
Example 7: Entry point with default URL
When a user connects to a VIRTEL line without specifying either pathname or pagename, as in the example
below, the entry point may be configured to redirect the request to a default URL:http://ipaddr:port

A default URL may be specified in the transaction whose external name is the same as the entry point name.
In the example type 4 transaction CLI-00 shown below, the default URL for the entry point CLIHOST is
//w2h/appmenu.htm+applist and thus the URL
http://ipaddr:port

is processed by VIRTEL as if
http://ipaddr:port//w2h/appmenu.htm+applist

had been specified.

1.2. VIRTEL URL Formats

17

Virtel User Guide, Release 4.57

Example of a default transaction with default URL
The entry point CLIWHOST can access the w2h directory through a directory definition specifing the
external directory path as an external name in the transaction. Here the transaction needs access to web
elements located in the W2H-DIR. The /w2h/ pathname in w2h/appmenu.htm matches the external name
of the directory transaction CLI-03W. This match defines a path to the W2H-DIR:-

18

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

Providing access to a directory through a transactions external name

1.2.3 Dynamic pages
The general form of the URL for a VIRTEL Web Access, VIRTEL Web Integration, or VIRTEL Web
Modernisation transaction is:
http://ipaddr:port/pathname/pagename+tranname

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of an element (HTML or XML) in the specified directory. This name may be
converted to upper case and truncated to the maximum length defined in the directory definition, as
previously described. This element is used as the “template page” into which VIRTEL inserts dynamic
data.
tranname Is the external name of a transaction defined under the entry point. The application program
(which may be a CICS transaction or other VTAM application, a VIRTEL sub-application, or an
external server) invoked by this transaction provides the dynamic data which VIRTEL inserts into the
template page.
Dynamic URL with userdata
A second form of URL allows user data to be passed to VIRTEL:http://ipaddr:port/pathname/pagename+tranname+userdata

ipaddr:port Is the address of the HTTP line, as before.
1.2. VIRTEL URL Formats

19

Virtel User Guide, Release 4.57
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of a template page, as before.
tranname Is the name of the transaction which provides the dynamic data for the template page.
userdata Is a character string which can be tested by the “User Data” field in the rules of the HTTP line
(see “Rules” in the VIRTEL Connectivity Reference documentation). This allows the administrator
to assign an entry point to the request based upon the contents of the userdata in the URL. The
userdata also becomes the value of the “routing parameter” associated with the tranname transaction.
The routing parameter can be referenced by the variable &1 in the “TIOA at logon” field of the
tranname transaction (see “Defining transaction parameters” in the VIRTEL Connectivity Reference
documentation). Additionally, if the rule which is selected specifies “$URL$” in its “Parameter” field,
and only if the HTTP terminal relays are defined in a logical pool (see “HTTP Terminals” under the
heading “Definition of an HTTP line” in the VIRTEL Connectivity Reference documentation), then
the routing parameter is used by VIRTEL to select a relay LU for the tranname transaction.
Dynamic URL with parameters
A third form of URL allows one or more parameters to be passed to a transaction by means of an “Input
Scenario” or by a “Connection / Disconnection Script”:
http://ipaddr:port/pathname/pagename+tranname?param1=value¶m2=value

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of a template page, as before.
tranname Is the name of the transaction which provides the dynamic data for the template page. This
transaction must be defined with the name of a presentation module in its “Output Scenario” field.
param1, param2, … These are the names of the parameters which the scenario can pick up using the
COPY$ INPUT-TO-VARIABLE or COPY$ INPUT-TO-SCREEN instructions (described 153) or
which can be substituted in a script by means of the &=paramn= system variable (see “Transactions – Connection / Disconnection Scripts” in the VIRTEL Connectivity Reference documentation.
The cumulative length of the URL parameters is limited by the BUFSIZE parameter of the VIRTCT.
If blanks or other special characters are required in the parameter value, then the special characters
must be coded in the standard URL escape format %xx where xx is the hexadecimal value of the
character in ASCII. For example, a blank is represented as %20.
Dynamic URL with userdata and parameters
A URL may contain both userdata and query parameters, as shown in the following example.
The various components of the URL have the same meaning as described in the preceding two
sections.
http://ipaddr:port/pathname/pagename+tranname+userdata?param1=value¶m2=value

20

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

1.2.4 3270 session management
VirtelSession parameter
Once a session has been established with the host 3270 application, the template page allows the user to
link to the next screen in the 3270 application dialog by means of a URL in the following format:
http://ipaddr:port/pathname/pagename++VirtelSession=sessionid

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of the template page to be used for displaying the next 3270 screen (usually the
same as the current template page).
sessionid Is a VIRTEL-generated code which allows VIRTEL to identify the user as being already connected
to an existing host session. The parameter VirtelSession=sessionid is inserted by the {{{SESSIONCODE}}} tag embedded in the template page (see “Session And Context Management”).
PrintVirtelSession parameter
A second form of the URL with SESSION-CODE allows display of print data sent by the application to the virtual printer associated with the specified session. Normally this URL will be
embedded in a template page and will be triggered by the {{{IF-PRINT-IS-READY}}} tag.
http://ipaddr:port/pathname/pagename++PrintVirtelSession=sessionid

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of the template page to be used for displaying the print data. This page must
contain the special {{{PRINT}}} tag (see “3287 Printing”) at the point at which the print data are
to be inserted in the page.
sessionid Is a code which allows VIRTEL to identify the printer associated with the user’s 3270 session.
The parameter PrintVirtelSession=sessionid (where sessionid is the associated 3270 session identifier),
is generated by the {{{SESSION-CODE}}} tag as in the following example:imprim.htm++Print{{{SESSION-CODE}}}

ValidateVirtelSession parameter
A third form of URL with {{{SESSION-CODE}}} allows a JavaScript procedure embedded in a template
page to determine whether there are pending updates to the 3270 screen image. For this type of URL,
VIRTEL returns no data, only an HTTP response code. The possible response codes are:
• 205 (Reset Content) The host application has updated the 3270 screen image since the last time it
was sent to the user.
• 304 (Not Modified) The host application has not updated the 3270 screen image
• 404 (Not Found) The sessionid code does not represent a valid host session.
Note: When response code 205 is indicated, the JavaScript procedure sends a further request to VIRTEL
to retrieve the updated 3270 screen image. This technique can be useful in handling host applications which
1.2. VIRTEL URL Formats

21

Virtel User Guide, Release 4.57
use multiple 3270 write commands to paint a single 3270 screen, where the user might otherwise be presented
with a partially updated screen. An example of this technique is contained in the WEB2VIRT.htm page
delivered in the VIRTEL sample directory W2H-DIR.
http://ipaddr:port/pathname/pagename++ValidateVirtelSession=sessionid

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename May be specified but is not used.
sessionid Is a code which allows VIRTEL to identify the 3270 session whose status is being queried. The
parameter ValidateVirtelSession=sessionid, where sessionid is the associated 3270 session identifier, is
generated by the {{{SESSION-CODE}}} tag as in the following example:check.htm++Validate{{{SESSION-CODE}}}

Note: For compatibility with previous versions, the keyword VerifyVirtelSession is also accepted. VerifyVirtelSession is similar to ValidateVirtelSession except that it produces only two possible return codes:
• 205 (screen updated)
• 304 (screen not updated or session invalid)

$UseCookieSession$ parameter
As an alternative to specifying the VirtelSession parameter in the URL, the SESSION-CODE may be sent
to VIRTEL in a cookie. An example URL is shown below:
http://ipaddr:port/pathname/pagename++$UseCookieSession$

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of the template page to be used for displaying the next 3270 screen (usually the
same as the current template page).
$UseCookieSession$ Indicates that the SESSION-CODE is contained in the VirtelSession cookie.
The VirtelSession cookie should be generated by Javascript as shown in the example below. This function
may be added to the custom Javascript script (see “Site customization of Javascript functions”):
/* Save VirtelSession cookie after each subpage is loaded */
function after_responseHandle(o, url, xtim) {
var node = document.getElementById("sesscode");
if (node) {
var text = node.textContent || node.innerText;
var sess = text.replace(/^VirtelSession=/i,"");
createCookie("VirtelSession", sess, 1);
}
}

Figure 1.5 Custom Javascript function to generate a VirtelSession cookie

22

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

1.2.5 Capability URLs
A URL may contain a “capability token” generated by another terminal. In this case the URL
inherits certain rights or capabilities conferred by the other terminal. The capabilities inherited
depend on the parameters specified in the SET-HEADER tag which generated the capability
token. For further details, see “Capability Tokens”.
http://ipaddr:port/pathname/pagename+tranname+capabilitytoken

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of a template page, as before.
tranname (optional) Is the name of the transaction which supplies the dynamic data for the page. If the
transaction name is omitted then two “+” signs must separate the pagename from the capabilitytoken.
capability token is a token which grants rights to another terminal’s resources. This code, whose format is
x-Virtel-name:token, is generated by the “{{{SET-HEADER}}}” tag. The code is case-sensitive and
so the capitalization must be exactly the same as the generated token.

1.2.6 Transmission of Security Tokens by URL
A security code, which identifies a user during a HTTP page upload request, is normally transmitted between
the browser and VIRTEL as a cookie (see “Uploading HTML Pages”). If, for security or other reasons, your
browser does not allow the use of cookies, then the security code can, as an alternative, be embedded in a
URL of the form shown below:http://ipaddr:port/pathname/pagename+tranname+securitycode

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of a template page, as before.
tranname Is the name of the transaction which supplies the dynamic data for the page.
securitycode Is the code which allows VIRTEL to identify the user. This code, whose format is VirtelCookie=xxxxxxxxxxxxxxxx, is generated by the “{{{SECURITY-TOKEN}}}” tag, as shown in the
example below:upload2.htm+upload+VirtelCookie={{{SECURITY-TOKEN}}}

The following format allows a static page to be displayed:
http://ipaddr:port/pathname/pagename++securitycode

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of the page.
securitycode Is a code of format VirtelCookie=xxxxxxxxxxxxxxxx which allows VIRTEL to identify the
user, as before.
On receipt of this URL, VIRTEL treats the VirtelCookie= parameter as if it were a cookie transmitted
by the browser.
1.2. VIRTEL URL Formats

23

Virtel User Guide, Release 4.57

1.2.7 Propagation of signon by URL
A URL embedded in a page sent by VIRTEL may contain a VirtelUserSignon parameter in order to propagate
the user’s signon credentials to another page. The value of the parameter is generated by the “({{{USERSIGNON-CODE}}} tag “. This can be useful in cases where the browser does not propagate the user name
and password from one page to another, for example when using VIRTEL transaction security type 4. The
format of a URL containing a signon code is shown below:http://ipaddr:port/pathname/pagename+tranname+VirtelUserSignon=signoncode

ipaddr:port Is the address of the HTTP line, as before.
pathname Represents a VIRTEL directory, as described earlier.
pagename Is the name of a template page, as before.
tranname Is the name of the transaction which supplies the dynamic data for the page.
signoncode Is a code which allows VIRTEL to identify the signed-on user. This code is generated by the
{{{USER-SIGNON-CODE}}} tag, as shown in the example below:http://web2virt.htm+cics+VirtelUserSignon={{{USER-SIGNON-CODE}}}

1.2.8 The Universal Transaction
A transaction may be defined with an external name consisting of an asterisk, and this is considered to be
a “universal” transaction. A universal transaction matches any URL not already matched by a preceding
transaction in the entry point. This allows VIRTEL to process URLs whose format does not conform to the
classic VIRTEL formats previously described.

24

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

1.3 Directory Management
HTML and XML template pages and other entities such as CSS stylesheets, JavaScript procedures, and GIF
or JPEG images used by VIRTEL Web Access are stored in directories within a VSAM KSDS managed by
VIRTEL. Each KSDS defined to VIRTEL can contain one or more directories. The system administrator
can upload pages and other elements into a VIRTEL directory by using a web browser or by e-mail, as
described in detail in the section “Uploading HTML Pages”.

1.3.1 Accessing the administration application
Virtel provides an administrative portal which contains various sub applications used to administer Virtel.
The administrative portal can be access either through the 3270 administration application or the HTML
GUI portal.

1.3.2 Access through 3270
Access to the 3270 application is through a normal VTAM logon using the VIRTEL APPLID as the application name. For example, from a VTAM screen enter LOGON APPLID=VIRTEL. The following screen
will appear:-

Logon screen for 3270 Administration
After logging in with security details the main application menu will be presented. Select PF1 from the main
menu to access the administration and configuration menu.

1.3. Directory Management

25

Virtel User Guide, Release 4.57

Directory sub application
The directory management sub-application allows the administrator to define directories. The subapplication is accessible by [PF6] from the configuration menu, or by [PF12] from the system services menu
followed by option 3, or from the VIRTEL Multi-Session menu via a transaction which invokes VIRTEL
module VIR0042.

1.3.3 Security
If security is active, access to the directory management sub-application from the configuration menu or the
system services menu is controlled by resource $$PCPC$$.
When invoked via a transaction, normal transaction security rules apply.
In addition, each directory is protected by a resource whose name is the same as the directory name. The
administrator must have access to this resource in order to view or manage the contents of the directory, or
to upload pages to the directory. When an external security product is used, the resource is defined in the
class named by the RNODE parameter in the VIRTCT (see “Parameters of the VIRTCT” in the VIRTEL
Installation Guide).
Security management is described in the VIRTEL Security documentation.

1.3.4 Creating, modifying, and deleting directories
When the directory management sub-application is invoked, it displays a list of the directories already defined
in the system:-

26

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

Figure 1.6 Directory management summary screen
Using the associated Admin(3270) functions
These functions are accessed from either the browsers Administration portal or by logging on to Virtel using
it’s VTAM interface.
Deleting a directory definition
To delete a directory definition, place the cursor on the name of the directory to be deleted and press [PF2].
The message CONFIRM DELETE appears at the bottom of the screen. Press [PF2] again. The message
DELETE OK indicates that the deletion of the directory definition was successful. While the message
CONFIRM DELETE is displayed, you can press any function key other than [PF2] to cancel the operation.
Displaying directory contents
To display the contents of a directory, place the cursor on the directory name and press [PF4]. VIRTEL
displays the directory contents management screen described below.
Adding a directory definition
To create a new directory definition, place the cursor on the blank line after the last directory, and press
[PF12] to display an empty directory detail screen. Fill in all of the fields and press [ENTER]. The message
CREATION OK indicates that the directory definition was successfully created.

1.3. Directory Management

27

Virtel User Guide, Release 4.57
Scrolling the list of directories
To scroll to the top of the list, press [PF6]. To scroll up or down the list, press [PF7] or [PF8].
Exiting from directory management
To return to the configuration menu, press [PF3].

1.3.5 Defining directory parameters
To access the detail screen for any directory, place the cursor on the directory name and press [PF12]:

Directory management detail screen
Name The name of the directory as known by VIRTEL. If security is active, this name must also be defined
as a resource to which the user must be authorized.
Description Comment associated with the directory.
Type V (or blank) indicates that the directory is held in a VSAM KSDS.
DD name The file name of the VSAM KSDS which contains the directory. This name must be defined in
one of the UFILEn parameters in the VIRTCT, and a DD statement with the same name must appear
in the VIRTEL started task JCL.
Keyword This is an 8-byte key which allows multiple directories to be stored within a single VSAM KSDS.
Each directory in a KSDS must have a unique key.
Size of names The maximum length of the names of HTML pages and other elements stored in this
directory. The minimum (and default) value is 8. The maximum value is 64.

28

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57
Case Any non-blank character in this field indicates that the element names stored in this directory are
case sensitive. Blank indicates that the names are not case sensitive.
Copy up This field is used by VIRTEL/PC. For VIRTEL Web Access directories, the value X must be
coded.
Copy down This field is used by VIRTEL/PC. For VIRTEL Web Access directories, the value X must be
coded.
Delete This field is used by VIRTEL/PC. For VIRTEL Web Access directories, the value X must be coded.
After pressing [PF4] at the directory management summary screen or detail screen, VIRTEL displays
a list of the files in the directory:

Figure 1.8 Directory contents management screen

1.3.6 Associated functions
Deleting an element
To delete an element from a directory, place the cursor on the name of the element to be deleted and
press [PF2]. The message CONFIRM DELETE appears at the bottom of the screen. Press [PF2] again.
The message DELETE OK indicates that the deletion of the element was successful. While the message
CONFIRM DELETE is displayed, you can press any function key other than [PF2] to cancel the operation.
Copying an element to another directory
To copy an element from directory A to directory B, first display the contents of directory A. In field [7]
type the name of the target directory B, then press [ENTER]. Next, place the cursor on the name of the
element to be copied, then press [PF6]. The message COPY COMPLETED indicates that the operation
1.3. Directory Management

29

Virtel User Guide, Release 4.57
was successful. If the element exists in the target directory, the copy fails and the message THIS FILE IS
ALREADY IN THE TARGET DIRECTORY is displayed at the bottom of the screen.
Scrolling the list
The list of elements can be scrolled up and down using [PF7] and [PF8].
Exiting from directory contents management
To return to the list of directories, press [PF3].

1.3.7 Acccess administration portal via the web
Access to the HTML GUI Administration portal is through the web using the Administration endpoint. By
default this is port 41001. The URL http://192.168.129.33:41001 is an example of a URL to access the WEB
administration portal. After providing security information the following screen will appear:-

Logon screen for Web Administration
Selecting the Admin (HTML) will prompt for a userid and password. After providing security details the
following administration portal will appear:-

30

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

Web Administration Portal
Directory administration can be invoked from the Directory link. Selecting a directory will display
a content menu proving options to list, edit, delete or create new directories.

1.3. Directory Management

31

Virtel User Guide, Release 4.57
Directory Context Menu
When selecting a directory, the detail panel will be displayed. The ICONs on the right hand side of the title
bar provide actions such as add, update or list.

Directory Detail Display

32

Chapter 1. The Virtel Engine

Virtel User Guide, Release 4.57

1.4 Creating Virtel Template Pages
1.4.1 Introduction
Template pages are the means by which VIRTEL presents host application data to the user via a web
browser. In addition to standard HTML or XML tags, template pages contain VIRTEL-specific tags enabling
integration of information delivered by the mainframe application programs. HTML template pages may
contain GIF or JPEG images, sounds, scripts such as JavaScript or any other function or program elements
that are compatible with the browser. Template pages may be produced either by hand or by using standard
HTML or XML design tools available on the market.
For VWA, users would not be required to produce or modify any template pages as all the necessary template
pages are provided by the Virtel product. For VWM or VWI, new pages may be produced by Virtel tools
such as Virtel Screen Redesigner to support modernisation or integration projects. Virtel Studio may also
introduce new templates to support business logic in Virtel scenarios. Sometimes it may be necessary to
modify these pages.
The following sections provide details on Virtel tags.

1.4.2 Defining the tag delimiters
VIRTEL-specific tags are used to insert data originating at the host into an HTML or XML page, and to
manage colours and function keys in an HTML page. VIRTEL-specific tags are identified by special begin
and end delimiters. The delimiters themselves are defined by means of a comment placed between the tags
 and  of the HTML page. The actual delimiters may vary from one page to another.


In this example, VIRTEL-specific tags are defined as being represented by a succession of 3 opening braces
and terminated by a succession of 3 closing braces. This convention is maintained throughout the remainder
of this chapter. A minimum template required for Virtel to work with and display a 3270 application looks
something like this:



Virtel Unplugged - Example 1



1.4. Creating Virtel Template Pages 33 Virtel User Guide, Release 4.57
{{{ GENERATE-HTML (1,1,1920) }}}
{{{DEFINE-HTML-FOCUS-FIELD "FOCUSFIELD"}}}
Sample Virtel Template Note: See the use of the Virtel tags {{{ }}} within the HTML template. Virtel injects data into these fields before sending the template to the browser. 1.4.3 Session and context management VIRTEL uses the concept of a session code to maintain the context between a client using a browser and the host application to which the client is connected. This code allows VIRTEL to identify the client and to associate the client with a session already established with a host application. SESSION-CODE tag The SESSION-CODE tag is used to create the URL associated with form submission. {{{ SESSION-CODE }}} The SESSION-CODE tag allows a session code to be inserted in the template page in the format VirtelSession=xxxxxxxxxxxxxxxx. The value of the session code changes after each message. For examples of its use, see “Transmitting Data To The Host”, and “3287 Printing”. AJAX-SESSION-CODE tag The AJAX-SESSION-CODE tag is similar to the SESSION-CODE tag, but it generates the code in a different format which does not change with each request. This is useful when implementing an AJAX dialog between the application and the browser. For this type of application, it is not always possible to transmit the VIRTEL session code to the browser, especially if a Javascript library is used. {{{ AJAX-SESSION-CODE }}} The AJAX-SESSION-CODE tag allows a session code to be inserted in the template page in the format AjaxSession=xxxxxxxxxxxxxxxx. For example:result.txt+cics+{{{ AJAX-SESSION-CODE }}} SET-INITIAL-TIMEOUT tag The SET-INITIAL-TIMEOUT tag allows a timeout to be started when VIRTEL builds the page. 34 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 {{{ SET-INITIAL-TIMEOUT "n" }}} For example, if the instruction {{{ SET-INITIAL-TIMEOUT "10" }}} is coded in a page or a sub-page, then VIRTEL will cancel the session if the workstation has not sent another request after 10 seconds. 1.4.4 Transmitting data to the host Transmission of data to the host uses the principle of sending an HTML form. In conjunction with the SESSION-CODE tag, the form allows the transmission of input fields to the host application, and the display of the subsequent application screen. The form is defined as follows:
Data which will be transmitted to the HTTP server
name Form name. The name of the form is used in JavaScript procedures to refer to various elements of the form. For an example, see the section “Cursor management”. action URL transmitted to the server, in the following format: action="pagename++{{{SESSION-CODE}}}" pagename Is the name of the template page to be used to display the subsequent screen sent by the host application (usually the same as the current template page) SESSION-CODE Identifies the session established with the host application method Transmission mode. Always POST. Example :
1.4.5 Where to position the elements of an HTML page By design, an HTML page starts with the tag and is terminated by the tag. In order to be able to be correctly interpreted by the browser, other tags are necessary, for example and as well as and . All other tags are optional. As shown previously, data transmitted to the HTTP server by the client is itself placed in between the tag fields and
. In order to minimise traffic, it is also advisable to place only useful data in the tag fields for example, generated fields or copies resulting from GENERATE-HTML and COPY-FROM tags, as well as indispensable fields such as focusField and pfkField. Other data may be placed anywhere in the area of the HTML page, provided that their position conforms to the standards. The following presents a template structure example. 35 Virtel User Guide, Release 4.57 .GREEN {font-family: monospace; background: #000000; color: #00FF00; } //--> {{{ON-ATTRIBUTE (PROTECTED,WHITE)}}} {{{ON-END-OF-ATTRIBUTE (PROTECTED,WHITE)}}} {{{ADD-TO-FIELDS (NORMAL,NOCOLOR) class="GREEN" }}} {{{DEFINE-HTML-PFKEY "PFKFIELD"}}} {{{DEFINE-HTML-FOCUS-FIELD "FOCUSFIELD"}}} Sample HTML page -----------------------> {{{ GENERATE-HTML (1,1,1920) }}} soumettre avec PF01 For a full example, see the WEB2VIRT.htm page delivered with VIRTEL. 1.4.6 Inserting host application data into a page Insertion of host application data in an HTML or XML page is achieved with the GENERATE-HTML and COPY-FROM tags. 36 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 GENERATE-HTML tag The GENERATE-HTML tag instructs VIRTEL to convert all or part of the 3270 screen into HTML form data. Output fields are converted into text, while input fields are converted into HTML input statements. The generated text and input fields are aligned so as to correspond as far as possible with the layout of the original 3270 screen. The resulting generation takes account of the nature of the data as well as the information specified in the ON-ATTRIBUTE, ON-END-OF-ATTRIBUTE and ADD-TO-FIELDS tags. {{{ GENERATE-HTML (row, col, len) }}} row,col Starting position (row and column number on the 3270 screen) of the data to be copied. This starting position will usually contain a 3270 attribute character. len Length of the data to be copied (including attribute characters). For example, the command {{{ GENERATE-HTML (01,01,1920) }}} will generate the total contents of the 3270 screen. An alternative form of the GENERATE-HTML tag allows the position and length to be specified by means of a symbolic name defined in a previous DEFINE-DFHMDF-NAME or DEFINE-DFHMDF-COLUMN tag (see “{{{DEFINE-DFHMDF-COLUMN}}}”. {{{ GENERATE-HTML "name" }}} name symbolic name defined in a previous DEFINE-DFHMDF-NAME or DEFINE-DFHMDF-COLUMN tag. COPY-FROM tag The COPY-FROM tag copies data into the HTML page from a specific location on the 3270 screen. Unlike the GENERATE-HTML tag, the COPY-FROM tag copies only the data and does not process any associated 3270 field attributes. {{{ COPY-FROM (row, col, len) }}} row,col Starting position (row and column number on the 3270 screen) of the data to be copied. This will typically be the first character after the attribute character which defines the start of the field. len Length of the data to be copied. An alternative form of the COPY-FROM tag allows the position and length to be specified by means of a symbolic name defined in a previous DEFINE-DFHMDF-NAME or DEFINE-DFHMDF-COLUMN tag (described 37). {{{ COPY-FROM "name" }}} name symbolic name defined in a previous DEFINE-DFHMDF-NAME or DEFINE-DFHMDF-COLUMN tag. Normally, any binary zeroes in the copied data will be removed. However, if the BLANK-BINARYZEROES option is set (see “Setting and unsetting local options”) then binary zeroes will be converted to blanks. CREATE-VARIABLE-FROM tag The CREATE-VARIABLE-FROM tag copies data from the 3270 screen into a VIRTEL variable. There are several formats of the COPY-VARIABLE-FROM tag, as described below. 1.4. Creating Virtel Template Pages 37 Virtel User Guide, Release 4.57 In the first form of CREATE-VARIABLE-FROM, the name of a variable is specified within the tag. Data is extracted from the indicated location on the screen, continuing until an attribute character is found or until the specified length is reached. Any non-alphanumeric characters are removed, all alphabetic characters are converted to upper case, and the resulting data is copied into the variable. If the variable does not exist, it will be created. If the variable already exists, the new value will be appended to any existing values. {{{ CREATE-VARIABLE-FROM (row, col, len) "varname" }}} row,col Starting position (row and column number on the 3270 screen) of the data to be copied. This will typically be the first character after an attribute character which defines the start of a field. len Length of the data to be copied. varname The name of the variable to be created The second form of CREATE-VARIABLE-FROM is distinguished by the absence of a variable name within the tag. In this case, the variable name is obtained from the 3270 screen. Data is extracted from the indicated location on the screen, continuing until an attribute character is found or until the specified length is reached. Any non-alphanumeric characters are removed, all alphabetic characters are converted to upper case, and the resulting string is used as a variable name. If the variable does not exist, it will be created. If the variable already exists, a new value will be appended to any existing values. If the variable name was terminated by an attribute character, then the data in the following field is used as the value of the variable. Otherwise the string “EMPTY” will be used as the value of the variable. {{{ CREATE-VARIABLE-FROM (row, col, len) }}} row,col Line and column number on the 3270 screen containing the variable name. len Total length of the variable name and value to be copied. The third form of CREATE-VARIABLE-FROM allows a rectangle to be copied from the screen. With a fourth sub- parameter specified, the instruction will not stop collecting data after encountering an attribute, but will continue adding values to the variable for the specified height on the screen. Any attributes found in the rectangle will be copied as blanks. If the variable does not exist, it will be created. If the variable already exists, the new values will be appended to any existing values. {{{ CREATE-VARIABLE-FROM (row, col, width, height) "varname" }}} row,col Starting position (row and column number on the 3270 screen) of the data to be copied. width,height Size (in columns and rows) of the rectangle to be copied. varname The name of the variable to be created DEFINE-HTML-FIELD-NAME tag The DEFINE-HTML-FIELD-NAME tag requests that VIRTEL should use a specific HTML input field name for the specified 3270 field, instead of an automatically generated name. The DEFINE-HTML-FIELD-NAME tag may be followed by a GENERATE-HTML tag, in which case VIRTEL will generate an HTML input field with the specified name, or the input field may be explicitly coded in the page template, in which case VIRTEL will use the name to associate the HTML input field with the 3270 field at the specified position. Normally this tag is not needed because the automatically generated field names are adequate for all except certain specialised applications. 38 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 {{{ DEFINE-HTML-FIELD-NAME (row, col, len) "name"}}} row,col Line and column number of the start of the field on the 3270 screen. This must be the first character after the attribute character. len Length of the input field (excluding attribute character). name Name to be associated with the HTML input field. DEFINE-HTML-FIELD tag The DEFINE-HTML-FIELD tag is equivalent to a DEFINE-HTML-FIELD-NAME tag followed by a GENERATE-HTML tag. {{{ DEFINE-HTML-FIELD (row, col, len) "name"}}} row,col Line and column number of the start of the field on the 3270 screen. This must be the first character after the attribute character. len Length of the input field (excluding attribute character). name Name to be associated with the HTML input field. DEFINE-DFHMDF-NAME tag The DEFINE-DFHMDF-NAME tag allows a field on the 3270 screen to be given a symbolic name which can be used in a subsequent GENERATE-HTML tag or COPY-FROM tag. {{{ DEFINE-DFHMDF-NAME (row, col, len) "name"}}} row,col Position (row and column number on the 3270 screen) of the attribute character which precedes the field on the 3270 screen. len Length of the 3270 field (excluding attribute character). name Name to be associated with the field. The name specified by the DEFINE-DFHMDF-NAME tag can then be used in subsequent GENERATEHTML tags or COPYFROM tags, instead of specifying an explicit row, column, and length. In addition, the DEFINE-DFHMDF-NAME tag generates an implicit DEFINE-HTML-FIELD-NAME tag. For example, the following tag defines a 10-character input field having attribute byte at row 1 column 59. The field itself occupies row 1 columns 60 to 69: {{{ DEFINE-DFHMDF-NAME (1,59,10) "XDAT10" }}} Subsequently: {{{ GENERATE-HTML "XDAT10" }}} is interpreted as: {{{ GENERATE-HTML (1,59,11) }}} and {{{ COPY-FROM "XDAT10" }}} 1.4. Creating Virtel Template Pages 39 Virtel User Guide, Release 4.57 is interpreted as: {{{ COPY-FROM (1,60,10) }}} and the following tag will be automatically generated: {{{ DEFINE-HTML-FIELD-NAME (1,60,10) "XDAT10" }}} Notice that VIRTEL automatically adjusts the starting position and length as necessary to account for the attribute byte. DEFINE-DFHMDF-COLUMN tag The DEFINE-DFHMDF-COLUMN tag is similar to the DEFINE-DFHMDF-NAME tag except that it allows the definition of a field which is repeated in the same column position on several consecutive lines of the screen. {{{ DEFINE-DFHMDF-COLUMN (row, col, len, ht) "name"}}} row,col Position (row and column number on the 3270 screen) of the attribute character which precedes the first occurrence of the field on the 3270 screen. len Length of each 3270 field (excluding attribute character). ht Height of column (number of lines). name Name to be associated with the field. The name specified by the DEFINE-DFHMDF-COLUMN tag can be used in subsequent GENERATEHTML tags or COPYFROM tags instead of specifying an explicit row, column, and length. The first time the field name is referenced in a GENERATE-HTML or COPY-FROM tag, the first occurrence of the field will be used. Each time the field name is referenced subsequently, the row number is incremented automatically. After the end of the series is reached, any subsequent reference wraps back to the first row number. In addition, the DEFINE-DFHMDF-COLUMN tag implicitly generates a series of DEFINEHTML-FIELD-NAME tags, each of which contains the field name suffixed by _1, _2, etc. For example, the following tag defines a column of 5-character input fields having attribute bytes in column 1. The fields themselves occupy columns 2 to 6. The first field is in row 9 and there are 12 occurrences: {{{DEFINE-DFHMDF-COLUMN (9,1,5,12) "NBLIGN" }}} Subsequently: {{{ GENERATE-HTML "NBLIGN" }}} is interpreted as: {{{ GENERATE-HTML (n,1,6) }}} and {{{ COPY-FROM "NBLIGN" }}} is interpreted as: {{{ COPY-FROM (n,2,5) }}} where n takes the next value in the range 9 to 20. The following tags will be automatically generated: 40 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 {{{DEFINE-HTML-FIELD-NAME (9,2,5) "NBLIGN_1" }}} {{{DEFINE-HTML-FIELD-NAME (10,2,5) "NBLIGN_2" }}} and so on until: {{{DEFINE-HTML-FIELD-NAME (20,2,5) "NBLIGN_12" }}} Notice that VIRTEL automatically adjusts the starting positions and lengths as necessary to account for the attribute byte. GENERATE-VARIABLES tag The GENERATE-VARIABLES tag functions like GENERATE-HTML except that, instead of generating HTML, it generates a set of table variables for each attribute found in the designated portion of the screen. {{{ GENERATE-VARIABLES (row, col, len) "prefix" }}} row,col Starting position (row and column number on the 3270 screen) of the data to be copied. This starting position will usually contain a 3270 attribute character. len Length of the data to be copied (including attribute characters). prefix The prefix of the generated variable names. A set of these variables is generated for each field found on the screen: prefixNAME Field name Example : V00002E9 for an input field, blank for an output field prefixLINE Line position of the field attribute (first line = 1) prefixCOLUMN Column position of the field attribute (first column = 1) prefixLENGTH Field length (excluding attribute) prefixATTRB Attribute: ASKIP, PROT, UNPROT, NUM, BRT, NORM, DET, MDT prefixCOLOR Color: NEUTRAL, BLUE, RED, PINK, GREEN, TURQUOISE, YELLOW, WHITE prefixHILIGHT Highlight: BLINK, REVERSE, UNDERLINE, OFF prefixVALUE The text contained in the field (excluding attribute) For example, the tag {{{ GENERATE-VARIABLES (01,01,1920) “MYPREFIX” }}} generates a set of table variables describing the entire contents of the 3270 screen. Normally, any binary zeroes in the field will be removed from the VALUE. However, if the BLANK-BINARY-ZEROES option is set (see “Setting and unsetting local options”) then binary zeroes will be converted to blanks. GENERATE-VIR3270 tag GENERATE-VIR3270, in conjunction with supporting JavaScript functions, is used by VIRTEL Web Access to generate an HTML page which reproduces as closely as possible the look and feel of a classic 3270 screen. The GENERATE-VIR3270 tag functions like GENERATE-HTML except that, instead of generating HTML form fields corresponding to 3270 input fields, it generates all 3270 fields as HTML spans. Special attribute keywords are added to each span to indicate the type of field, the screen position, and the 3270 field attributes. A subspan is generated for characters whose character attributes differ from the field attributes. In addition, GENERATE-VIR3270 generates a hidden HTML form field for each 3270 input field, and these fields are written as HTML fragments into a VIRTEL table variable so that they can be inserted later in the page. 1.4. Creating Virtel Template Pages 41 Virtel User Guide, Release 4.57 {{{ GENERATE-VIR3270 (row, col, len) "fragvar" }}} row,col Starting position (row and column number on the 3270 screen) of the data to be copied. len Length of the data to be copied. fragvar The name of the table variable for the hidden HTML form fields. The table below shows the HTML attributes generated for each field and 3270 attribute position on the screen:Attribute Name vt= vr= vc= vp= vl= continuing= Meaning Field type Row Column Position Length “YES” Values O = Output, I = Input, A = 3270 attribute, C = Character subspan Row number (first row = 1) Column number (first column = 1) Offset from start of screen (R1C1 = 0) Length of span or subspan Indicates continuation of a field. An example of the GENERATE-VIR3270 tag is shown below:
{{{GENERATE-VIR3270 (1,1,1920) "INFIELDS"}}}
{{{DEFINE-HTML-PFKEY "pf"}}}
{{{FOR-EACH-VALUE-IN "INFIELDS"}}}{{{CURRENT-VALUE-OF "INFIELDS"}}} {{{END-FOR "INFIELDS"}}}
Continuing a field after end of a line/or screen.
}}} Inserts the value specified by “standard html tag” before the field when the conditions p1 to pn are fulfilled. The parameters p1 to pn may appear in any order, each parameter representing one of the following values: p1 Type of field: PROTECTED, UNPROTECTED, NON-DISPLAY, NUMERIC, MDTON, DETECTABLE. ALPHANUMERIC, INTENSIFIED, BRIGHT, NORMAL 42 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 p2 Highlighting: NOHILIGHT, BLINK, REVERSE, UNDERSCORE p3 Colour: NOCOLOR, BLUE, RED, PINK, GREEN, YELLOW, TURQUOISE, WHITE When more than one ON-ATTRIBUTE tag matches the same field, the tags are processed in reverse order and the generated HTML is accumulated from each matching ON-ATTRIBUTE tag. The WITH-NOMATCH-BELOW keyword allows an ON-ATTRIBUTE tag to match the field only if no match has been found with the ON-ATTRIBUTE tags already processed. ON-END-OF-ATTRIBUTE tag The presence of the ON-ATTRIBUTE tag requires the presence of an ON-END-OF-ATTRIBUTE tag having the same values for the p1 to pn parameters. {{{ ON-END-OF-ATTRIBUTE (p1,p2,..,pn) }}} Inserts the value specified by “standard html tag” after the field when the conditions p1 to pn are fulfilled. As previously described for the ON-ATTRIBUTE tag, multiple matching ON-END-OF-ATTRIBUTE tags are processed in reverse order, and the optional WITH-NO-MATCH-BELOW keyword causes the ON-ENDOF-ATTRIBUTE tag to match only if no match has been found with the ON-END-OF-ATTRIBUTE tags already processed. Example: {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ ON-ATTRIBUTE (PROTECTED,WITH-NO-MATCH-BELOW)}}} ON-END-OF-ATTRIBUTE (PROTECTED, WITH-NO-MATCH-BELOW)}}} ON-ATTRIBUTE (PROTECTED,NORMAL,NOCOLOR)}}} ON-END-OF-ATTRIBUTE (PROTECTED,NORMAL,NOCOLOR)}}} ON-ATTRIBUTE (PROTECTED,INTENSIFIED,NOCOLOR)}}} ON-END-OF-ATTRIBUTE (PROTECTED,INTENSIFIED,NOCOLOR)}}} ON-ATTRIBUTE (PROTECTED,BLUE)}}} ON-END-OF-ATTRIBUTE (PROTECTED,BLUE)}}} ON-ATTRIBUTE (PROTECTED,RED)}}} ON-END-OF-ATTRIBUTE (PROTECTED,RED)}}} ON-ATTRIBUTE (PROTECTED,PINK)}}} ON-END-OF-ATTRIBUTE (PROTECTED,PINK)}}} ON-ATTRIBUTE (PROTECTED,GREEN)}}} ON-END-OF-ATTRIBUTE (PROTECTED,GREEN)}}} ON-ATTRIBUTE (PROTECTED,TURQUOISE)}}} ON-END-OF-ATTRIBUTE (PROTECTED,TURQUOISE)}}} ON-ATTRIBUTE (PROTECTED,YELLOW)}}} ON-END-OF-ATTRIBUTE (PROTECTED,YELLOW)}}} ON-ATTRIBUTE (PROTECTED,WHITE)}}} ON-END-OF-ATTRIBUTE (PROTECTED,WHITE)}}} Example set of ON-ATTRIBUTE and ON-END-OF-ATTRIBUTE tags ON-CHARACTER-ATTRIBUTE tag If the page template contains ON-CHARACTER-ATTRIBUTE and ON-END-OF-CHARACTERATTRIBUTE tags, changes in colour or highlighting of individual characters within a field are surrounded by the specified HTML code during processing by GENERATE-HTML. Since HTML code cannot be included in the “value” clause of an input field, GENERATE-HTML does not generate HTML code for character attributes within input fields. {{{ ON-CHARACTER-ATTRIBUTE (p1,p2) }}} p1,p2 Highlighting and colour parameters as specified for the ON-ATTRIBUTE tag. 1.4. Creating Virtel Template Pages 43 Virtel User Guide, Release 4.57 ON-END-OF-CHARACTER-ATTRIBUTE tag The ON-END-OF-CHARACTER-ATTRIBUTE tag specifies the HTML code to be inserted at the termination of a character string opened by an ON-CHARACTER-ATTRIBUTE tag. {{{ ON-END-OF-CHARACTER-ATTRIBUTE (p1,p2) }}} ADD-TO-FIELDS tag The presence of an ADD-TO-FIELDS tag allows the definition of each HTML input field to be modified according to the 3270 attributes specified by the host application. {{{ ADD-TO-FIELDS (p1,p2,..,pn) part of standard HTML tag }}} Inserts the value specified by “part of standard html tag” into the HTML tag when the conditions p1 to pn (described in the previous paragraph) are fulfilled. When more than one ADD-TO-FIELDS tag matches the same field, the tags are processed in order of appearance and the generated HTML is accumulated from each matching ADD-TO-FIELDS tag. The WITH-NO-MATCH-ABOVE keyword allows an ADD-TO-FIELDS tag to match the field only if no match has been found with the ADD-TO-FIELDS tags already processed. Example: {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS ADD-TO-FIELDS (NORMAL,NOCOLOR) class="GREEN" }}} (INTENSIFIED,NOCOLOR) class="RED" }}} (BLUE) class="BLUE" }}} (RED) class="RED" }}} (PINK) class="PINK" }}} (GREEN) class="GREEN" }}} (TURQUOISE) class="TURQUOISE" }}} (YELLOW) class="YELLOW" }}} (WHITE) class="WHITE" }}} (DISPLAY,WITH-NO-MATCH-ABOVE) class="GREEN" }}} Example set of ADD-TO-FIELDS tags In the above example, the parameter class makes reference to a style class defined in the HTML page header: Syspertec - example of generation of HTML pages}}} Example styles for ADD-TO-FIELDS tags For certain fields, the action of the ADD-TO-FIELDS tag may be nullified by the NO-ADD-TO-CHECKBOX and NO-ADDTO-LISTBOX local options (see “Setting and unsetting local options”). 44 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 Note: The ADD-TO-FIELDS tag affects input fields only 1.4.8 Cursor management In each message sent from the host application to the browser, VIRTEL automatically manages the positioning of the cursor insofar as is possible. Conversely, when a message is sent to VIRTEL from the browser, it is necessary to know the position of the cursor in order to inform the application on the host side. The cursor position cannot be handled relatively therefore, the cursor’s exact position is communicated via a hidden field specifying the name of the field having the focus at the time of transmission. Cursor management is determined by the tags DEFINE-HTML-FOCUS-FIELD, FIELD-WITH-CURSOR, DEFAULT-FIELDWITHCURSOR and by two JavaScript procedures. More precise positioning of the cursor can be controlled by the optional tags DEFINE-CURSOR-POSITION-FIELD and POSITION-OF-THE-CURSOR. DEFINE-HTML-FOCUS-FIELD tag The DEFINE-HTML-FOCUS-FIELD tag informs VIRTEL of the existence of the focusField. {{{ DEFINE-HTML-FOCUS-FIELD "focusField" }}} The focusField is a hidden field which will receive the name of the field having the focus, that is to say the input field on which the cursor is positioned, at the moment of transmission of a message from the browser to VIRTEL. This field must be defined in the following way: DEFINE-CURSOR-POSITION-FIELD tag The DEFINE-CURSOR-POSITION-FIELD tag informs VIRTEL of the existence of the cursorField. {{{ DEFINE-CURSOR-POSITION-FIELD "cursorField" }}} The cursorField is an optional hidden field in which the JavaScript routines may place the exact position of the cursor when a message is transmitted from the browser to VIRTEL. The cursor position is indicated by a string of the format Vnnnnnnn or Pnnnnnnn, where V indicates that the cursor is in a non-protected (input) field, P indicates a protected (output) field, and nnnnnnn is the hexadecimal offset of the cursor from the start of the screen (where 0000000 represents row 1 column 1). The cursorField must be defined in the following way: If both focusField and cursorField are sent to VIRTEL, then VIRTEL will use cursorField to determine the position of the cursor. FIELD-WITH-CURSOR tag The FIELD-WITH-CURSOR tag enables VIRTEL to insert the name of the field having the focus at the time of transmission of the message to the browser. 1.4. Creating Virtel Template Pages 45 Virtel User Guide, Release 4.57 {{{ FIELD-WITH-CURSOR }}} DEFAULT-FIELD-WITH-CURSOR tag The DEFAULT-FIELD-WITH-CURSOR tag specifies the name generated by the FIELD-WITH-CURSOR tag when the 3270 screen contains no input fields. {{{ DEFAULT-FIELD-WITH-CURSOR "fieldname" | "NOFIELD" }}} In the DEFAULT-FIELD-WITH-CURSOR tag, fieldname must be the name of an HTML input field defined in the template page. If no DEFAULT-FIELD-WITH-CURSOR tag is present, and the screen contains no input fields, VIRTEL will convert the first field on the screen into an input field, so that the FIELD-WITHCURSOR tag can generate the name of a valid input field. The “NOFIELD” option prevents a dummy field from being created. Positioning the focus when a message is sent to the browser The positioning of the focus is done with the help of a JavaScript procedure referenced by the tag of the HTML page: Script for focus position management Cursor position initialisation Positioning the focus in the browser Once present in the client’s browser, the user may need to move the focus to a different field, either by using the TAB key on the keyboard or by using the mouse. The focusField field is automatically updated if the ADD-TO-FIELDS tag calls a script which updates the focus field. Script for saving the name of the field having the focus: Automatic call of the update script {{{ ADD-TO-FIELDS onfocus = "savefocus(this.name)" }}} 46 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 POSITION-OF-THE-CURSOR tag The POSITION-OF-THE-CURSOR tag allows VIRTEL to send the exact position of the cursor to the browser by including a string of the format Vnnnnnnn or Pnnnnnnn in the HTML page. Vnnnnnnn means that the cursor is in a non-protected (input) field. Pnnnnnnn means that the cursor is in a protected (output) field. In both cases, nnnnnnn is the hexadecimal offset of the cursor from the start of the screen (where 0000000 represents row 1 column 1). {{{ POSITION-OF-THE-CURSOR }}} 1.4.9 Function key management By design, the transmission of information delivered by a 3270 application is effected by using only the function keys, usually the PF and PA keys. Also by design, the navigation from an HTML page is radically different, generally using the mouse to submit requests to the HTTP server. This difference in philosophy makes it difficult, even impossible in certain instances, to detect the use of a function key via the browser. Conserving the ergonomic aspects of the web in an application that allows full use of the function keys is naturally not an easy thing to do, it is, however, made possible by the following functions. Definition of the pfkField field As with the management of the cursor, the pfkField is a hidden field designed to accept the name of the function key that VIRTEL must use to transmit data to the application on the host. VIRTEL is notified of the existence of the field by the following tag: {{{ DEFINE-HTML-PFKEY = "pfkField" }}} Updating the pfkField The field pfkField is updated by using a JavaScript procedure called at the time of the submission of the request. The script used is referenced in the BUTTON field definition or in the HTML link used for the submission. Save the name of the field having the focus Automatic call of the update script from a field of type BUTTON 1.4. Creating Virtel Template Pages 47 Virtel User Guide, Release 4.57 Automatic call of the SCRIPT from a hypertext link submit with PF01 The function keys may be defined in the following manner in the “value” keyword of the INPUT TYPE=BUTTON field. 3270 function key ENTER CLEAR SCREEN PA1, PA2, PA3 PF1 to PF24 Attention PfkField value ENTER CLEAR PA1, PA2, PA3 PF01 to PF24 (variations PF1, F1, F01, P1, P01 are also accepted) ATTN Function key values for pfkField Disallowed function keys Certain function keys may be explicitly restricted by means of the INVALID-PFKEYS tag containing the list of prohibited PF keys. {{{ INVALID-PFKEYS (pfk1, pfk2, .. , pfkn) }}} On the other hand, an exhaustive list of authorised function keys may be specified with the VALID-PFKEYS tag. {{{ VALID-PFKEYS (pfk1, pfk2, .. , pfkn) }}} For example, Disallow ATTN, PF08 and PF24 {{{ INVALID-PFKEYS (ATTN,PF08,PF24) }}} Disallow all function keys except ENTER and PF03 {{{ VALID-PFKEYS (ENTER,PF03) }}} PF key processing by scenario A page template can generate a “pseudo-PFkey” intended to be interpreted by an INPUT scenario. This is done by setting the pfkField to a value beginning with SCENARIO. The pseudo-PFKey will be accepted by VIRTEL and treated as ENTER, but it will not be transmitted to the application. The scenario can retrieve the value of the pfkField by means of the COPY$ INPUT-TO-VARIABLE instruction. For example: Definition of the BUTTON field in the page template: {{{ DEFINE-HTML-PFKEY "pf" }}} Retrieving and testing the PF key value in the INPUT scenario: 48 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 COPY$ INPUT-TO-VARIABLE,FIELD='pf',VAR='PF' IF$ NOT-FOUND,THEN=NOPARAMS CASE$ 'PF',(NE,'SCENARIO-DFHMDF',NOPARAMS) * generate the screen capture: COPY$ OUTPUT-FILE-TO-VARIABLE, * FILE='DFHMDF.TXT',VAR='CAPTURE' * send result to browser SEND$ AS-FILE,VAR='CAPTURE', * TYPE='text/plain',NAME='dfhmdf.asm' NOPARAMS EQU * The Null PF key A page template or JavaScript program can request VIRTEL to resend the contents of the current 3270 screen, without sending any input to the host application, by setting the pfkField to the value NULL-PF 1.4.10 Setting and unsetting local options The SET-LOCAL-OPTIONS and UNSET-LOCAL-OPTIONS tags allow the activation or deactivation of miscellaneous processing options associated with HTML generation. These options are normally deactivated, but any or all of them can be activated by default using the HTSETn parameters in the VIRTCT. Refer to the VIRTEL Installation Guide for details of the HTSETn parameters. The SET-LOCAL-OPTIONS and UNSET-LOCAL-OPTIONS tags apply only to the current page, and take effect from the point in the page at which they appear. The options which can be specified are: AUTO-INCREMENT-VARIABLES When this option is activated, table variables referenced outside a FOR-EACH-VALUE-IN loop will be automatically advanced to their next value each time they are reused. If this option is not active, the CURRENT-VALUE-OF tag always produces the first value of a table variable when it is referenced outside a loop. BLANK-BINARY-ZEROES Affects the processing of the COPY-FROM VARIABLES tags (see “Inserting host application data in a page”). and GENERATE- DO-NOT-IGNORE-BINARY-ZEROES When this option is activated, then all 3270 NUL characters in input fields generated by VIRTEL will be sent to the browser as SUB characters (x‘1A’). When this option is not activated, then VIRTEL will remove 3270 NUL characters from input fields. HTML-ESCAPES, JAVASCRIPT-ESCAPES, JSON-ESCAPES, NO-ESCAPES, XML-ESCAPES Affects the processing of the CURRENT-VALUE-OF, TRIMMED-VALUE-OF and NO-BLANKSVALUE-OF tags (see “Handling table variables”). Similarly affects the processing of the values generated by GENERATEVARIABLES. ID Indicates that VIRTEL will generate HTML input fields with the parameter “id” in addition to the “name” parameter. The “id” has the same value as the “name”. This is intended for use with JavaScript code which refers to VIRTELgenerated fields using the getElementById method. MAXLENGTH Indicates that VIRTEL will generate HTML input fields with the parameter “maxlength” in addition to “size”. The “maxlength” parameter ensures that the number of characters that can be entered into an HTML field does not exceed the 3270 field length. By default, VIRTEL does not generate “maxlength”, which allows an unlimited number of characters to be entered in each HTML field, and VIRTEL truncates the value as necessary before sending the data to the host application. MDT-IF-RECEIVED When this option is activated, VIRTEL will consider all input fields received from the browser to be “modified” fields to be sent to the host application. Fields in the page not received 1.4. Creating Virtel Template Pages 49 Virtel User Guide, Release 4.57 from the browser are considered to be unmodified and are not sent to the host application. When this option is not activated, VIRTEL inspects the contents of all fields received from the browser to determine whether the field has been modified. VIRTEL sends modified fields to the host application, and any fields not received from the browser are sent as empty fields. Notes: (1) This option must be coded in the page template before the fields to which it applies. (2) This option cannot be specified in the VIRTCT. NO-ADD-TO-CHECKBOX When this option is activated, HTML attributes defined within an ADDTO-FIELDS tag are not added to clauses generated by the GENERATEHTML tag in conjunction with the FIELD$ IS-BINARY-CHOICE instruction. NO-ADD-TO-LISTBOX When this option is activated, HTML attributes defined within an ADD-TOFIELDS tag are not added to

Check digits:

Request date:

HTML form for generating Query input data (GET method) If the user enters, for example, the values “1531499136”, “05”, and “07/01/15” in the three fields and presses the Submit button, an HTTP request is presented to VIRTEL in the format shown below: GET querydemo.htm+tranq?num=1531499136&key=05&date=07%2F01%2F15 HTTP/1.0 Host: 192.168.235.30:41000 Accept: */* Example HTTP request with Query data (GET method) Note: The “/” characters in the user’s input have been encoded by the browser as “%2F” because Query parameters are always transmitted in URL-encoded format in the HTTP request. HTTP request with Query data (POST method) By changing the FORM METHOD to POST (instead of GET) in the HTML form, the HTTP request can be presented to VIRTEL in the alternative format shown below: POST /demohttp/querydemo.htm+tran4 HTTP/1.0 Host: 192.168.235.30:41000 Accept: */* Content-Type: application/x-www-form-urlencoded 1.17. VIRTEL Web Integration 219 Virtel User Guide, Release 4.57 Content-Length: 31 num=1531499136&key=05&date=07%2F01%2F15 Example HTTP request with Query data (POST method) VIRTEL considers this POST request to be identical to the GET request presented in the previous paragraph. Presentation module for Query input data An example INITIAL scenario for converting this Query data to commarea format is coded in the presentation module SCENQRYI shown below: SCENQRYI SCREENS APPL=SCENQRYI SCENARIO INITIAL COMMAREA MAP$ BEGIN MAP$ AREA,WITH='num',LENGTH=10,TYPE=9 MAP$ AREA,WITH='key',LENGTH=2,TYPE=9 MAP$ AREA,WITH='date',LENGTH=8,TYPE=X COMMAREA MAP$ END COMMAREA MAP$ FROM-INPUT,QUERY COMMAREA MAP$ TO-VARIABLE,VAR='MYAREA' SCENARIO END SCRNEND END HTTP presentation module for Query input data. The same presentation module may be used to process both GET and POST requests. Contents of generated commarea The figure below shows the 20-byte commarea generated in the VIRTEL variable MYAREA: ----+----1----+----2 15314991360507/01/15 Commarea generated from Query data Transaction definition for Query input data The HTTP requests shown in the GET and POST examples above use the URL querydemo.htm+tranq to invoke the VIRTEL transaction shown below (tranq is the “external name” of the transaction). The “TIOA at logon” field contains a connection script. After signing on to CICS, the connection script uses the &/S order to process the INITIAL scenario in the presentation module SCENQRYI. This scenario converts the Query parameter input data into a VIRTEL variable named MYAREA. The script then invokes a CICS transaction VQRY, passing the contents of MYAREA as input data. The CICS transaction performs an EXEC CICS RECEIVE to obtain the input data. TRANSACTION DETAIL DEFINITION ---------------------- Applid: VIRTELD2 15:32:33 Internal name ===> CLI-17Q To associate with an entry point name External name ===> tranq Name displayed on user menu Description ===> Demonstration VIRTEL Query Application ===> CICSPROD Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 1 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE 220 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 Pseudo-terminals ===> CLVTA Logmode ===> How started ===> 1 Security ===> 0 H4W commands ? ===> 024 Logon message ===> Prefix of name of partner terminals Specify when LOGMODE must be changed 1=menu 2=sub-menu 3=auto 0=none 1=basic 2=NTLM 3=TLS 4=HTML 0=no 1=yes 2=if2VIRTEL 4=auto TIOA at logon ===> Signon to CICS&/W&*F34BE9&/A&(&/S VQRY&=MYAREA=&/A&) TIOA at logoff ===> Initial Scenario ===> SCENQRYI Input Scenario ===> P1=Update Final Scenario ===> Output Scenario ===> P3=Return P12=Server VIRTEL transaction definition for Query input data 1.17.2 Parsing XML input By using a combination of an INITIAL scenario and a VIRTEL transaction script, VIRTEL can transform XML input data in an HTTP request into a fixed-format data area for processing by a COBOL legacy application program. HTTP request with XML input data The simplest method of sending XML data to VIRTEL is to build an HTTP POST request containing the raw XML data in the request body. This is the format expected by the MAP$ FROM-INPUT instruction described 189. The figure below shows an example of an HTTP request containing XML input data: POST /demohttp/xmldemo.xml+tran3 HTTP/1.0 Host: 192.168.235.30 Accept: */* Content-Length: 197 T000-GAL 3270 FIELD001 A < Example HTTP request with XML input data Presentation module for XML input data An example INITIAL scenario for processing this XML input data is coded in the presentation module SCENXMLI shown below: 1.17. VIRTEL Web Integration 221 Virtel User Guide, Release 4.57 SCENXMLI * OUTAREA PARAMS PARAMS OUTAREA * OUTAREA OUTAREA SCREENS APPL=SCENXMLI SCENARIO INITIAL MAP$ BEGIN MAP$ AREA,WITH='screenname',LENGTH=8,TYPE=X MAP$ BEGIN,WITH='params' MAP$ AREA,WITH='fieldname',LENGTH=8,TYPE=X MAP$ AREA,WITH='uinput',LENGTH=20,TYPE=X MAP$ END MAP$ END MAP$ FROM-INPUT MAP$ TO-VARIABLE,VAR='MYAREA' SCENARIO END * SCRNEND END , HTTP presentation module for XML input data Contents of generated commarea The figure below shows the 36-byte commarea generated in the VIRTEL variable MYAREA: ----+----1----+----2----+----3----+T000-GALFIELD001A Commarea generated from XML input data Sending XML input as URL-encoded data For some applications it may be more convenient to send the XML data as part of the URL. To conform with URL syntax rules, the XML data is embedded in an HTML text field, and blanks and other special characters in the XML data are replaced by their corresponding URL-encoded values (“+” signs and “%xx” sequences). This format can be generated by means of an HTML form, as shown in the example below: Syspertec - XML Application with VIRTEL

222 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 HTML form with XML input data embedded in a text field The HTTP request generated by the above HTML form is presented to VIRTEL in the format shown below: GET /demohttp/xmldemo.xml+tran3?MYINPUT=%3C%3Fxml+version%3D%221.0%22%3F% 3E%0D%0A%3CmethodCall%3E%0D%0A%3Cscreenname%3ET000-GAL%3C%2Fscreenname%3E %0D%0A%3Cscreentype%3E3270%3C%2Fscreentype%3E%0D%0A%3Cparams%3E%0D%0A++%3 Cfieldname%3EFIELD001%3C%2Ffieldname%3E%0D%0A++%3Cuinput%3EA%3C%2Fuinput% 3E%0D%0A%3C%2Fparams%3E%0D%0A%3C%2FmethodCall%3E%0D%0A HTTP/1.0 Host: 192.168.235.30 Accept: */* XML input data in URL-encoded format (HTTP GET method) By changing the FORM METHOD to POST (instead of GET), the HTTP request can be presented to VIRTEL in the alternative format shown below: POST /demohttp/xmldemo.xml+tran3 HTTP/1.0 Host: 192.168.235.30 Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: 314 MYINPUT=%3C%3Fxml+version%3D%221.0%22%3F%3E%0D%0A%3CmethodCall%3E%0D%0A%3C screenname%3ET000-GAL%3C%2Fscreenname%3E%0D%0A%3Cscreentype%3E3270%3C%2Fsc reentype%3E%0D%0A%3Cparams%3E%0D%0A++%3Cfieldname%3EFIELD001%3C%2Ffieldnam e%3E%0D%0A++%3Cuinput%3EA%3C%2Fuinput%3E%0D%0A%3C%2Fparams%3E%0D%0A%3C%2Fm ethodCall%3E%0D%0A XML input data in URL-encoded format (HTTP POST method) Both of these request formats can be processed by a presentation module similar to the SCENXMLI module shown previously. The only change necessary to process URL-encoded data is that the statement OUTAREA MAP$ FROMINPUT must be replaced by the statement OUTAREA MAP$ FROM-FIELD,FIELD=’MYINPUT’ Transaction definition for XML input data The HTTP requests shown above use the URL /demohttp/xmldemo.xml+tran3 to invoke the VIRTEL transaction shown below (tran3 is the “external name” of the transaction). The “TIOA at logon” field contains a connection script. After signing on to CICS, the connection script uses the &/S order to process the INITIAL scenario in the presentation module SCENXMLI. This scenario converts the XML data into a VIRTEL variable named MYAREA. The script then invokes a CICS transaction VHLP, passing the contents of MYAREA as input data. The CICS transaction performs an EXEC CICS RECEIVE to obtain the input data. TRANSACTION DETAIL DEFINITION ---------------------- Applid: VIRTELD2 15:32:33 Internal name ===> CLI-16E To associate with an entry point name External name ===> tran3 Name displayed on user menu Description ===> Demonstration VIRTEL XML Application ===> CICSPROD Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 1 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> CLVTA Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed How started ===> 1 1=menu 2=sub-menu 3=auto Security ===> 0 0=none 1=basic 2=NTLM 3=TLS 4=HTML H4W commands ? ===> 024 0=no 1=yes 2=if2VIRTEL 4=auto Logon message ===> 1.17. VIRTEL Web Integration 223 Virtel User Guide, Release 4.57 TIOA at logon ===> Signon to CICS&/W&*F34BE9&/A&(&/S VHLP&=MYAREA=&/A&) TIOA at logoff ===> Initial Scenario ===> SCENXMLI Input Scenario ===> P1=Update Final Scenario ===> Output Scenario ===> SCENXMLO P3=Return P12=Server VIRTEL transaction definition for XML input data XML input with attributes and repeating groups The figure below shows an example of XML input data containing attributes and repeating groups of fields: 8019A GROMMET 3 C GREVILE D 3 Example XML input data with attributes and repeating groups An INITIAL scenario for processing this XML input data is coded in the presentation module SCENXMLA shown below: SCENXMLA * SCREENS APPL=SCENXMLA SCENARIO INITIAL * COMMAREA DETAIL DETAIL COMMAREA * COMMAREA COMMAREA 224 MAP$ MAP$ MAP$ MAP$ MAP$ MAP$ MAP$ BEGIN AREA,WITH='id',LENGTH=5 AREA-ATTRIBUTE,VALUEOF='date',LENGTH=8,TYPE=ONLY9 AREA-ATTRIBUTE,VALUEOF='type',LENGTH=2 AREA-ATTRIBUTE,VALUEOF='numreq',LENGTH=2,TYPE=9 BEGIN,WITH='part',OCCURS=5 AREA-ATTRIBUTE,WITH='key',VALUEOF='suffix', LENGTH=2,TYPE=9 MAP$ AREA,LENGTH=8 MAP$ AREA,WITH='type',LENGTH=1 MAP$ AREA,WITH='stat',LENGTH=1 MAP$ END MAP$ END * MAP$ FROM-INPUT MAP$ TO-VARIABLE,VAR='MYCOMMAREA' SCENARIO END Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 * SCRNEND END Presentation module for XML input with attributes and repeating groups The figure below shows the 77-byte commarea generated in the VIRTEL variable MYCOMMAREA: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+-8019A20012006RP0201GROMMET C302GREVILE D300 00 00 Commarea generated from XML input with attributes and repeating groups XML input with redefinition of fields This example shows how the commarea can be redefined according to the value of a field in the XML input. In this example, the input can be in one of two formats, depending on the value of the field whose name is “reqtype”:Request type A 1234 A 12345
blue 5
Request type B 2345 B 23457
EN quarto
Example XML input data with redefinition of fields An INITIAL scenario for processing this XML input data is coded in the presentation module SCENXMLR shown below: SCENXMLR * SCREENS APPL=SCENXMLR SCENARIO INITIAL * HEADER MAP$ BEGIN MAP$ AREA,WITH='reqid',LENGTH=4,TYPE=9 MAP$ AREA,WITH='reqtype',LENGTH=1,TYPE=X,VAR='TRIGGER' 1.17. VIRTEL Web Integration 225 Virtel User Guide, Release 4.57 HEADER * HEADER HEADER * MAP$ AREA,WITH='itemcode',LENGTH=6,TYPE=9 MAP$ END MAP$ FROM-INPUT,FIELD='MYINPUT' MAP$ TO-VARIABLE,VAR='MYHEAD' IF$ VARIABLE,'TRIGGER',EQ='A',THEN=TYPEA IF$ VARIABLE,'TRIGGER',EQ='B',THEN=TYPEB SCENARIO END * TYPEA DETAILA DETAILA * DETAILA DETAILA * TYPEB DETAILB DETAILB * DETAILB DETAILB EQU * MAP$ BEGIN,WITH='details' MAP$ AREA,WITH='color',LENGTH=8,TYPE=X MAP$ AREA,WITH='quantity',LENGTH=5,TYPE=9 MAP$ END MAP$ FROM-INPUT,FIELD='MYINPUT' MAP$ TO-VARIABLE,VAR='MYBODY' SCENARIO END EQU * MAP$ BEGIN,WITH='details' MAP$ AREA,WITH='lang',LENGTH=2,TYPE=X MAP$ AREA,WITH='format',LENGTH=8,TYPE=X MAP$ END MAP$ FROM-INPUT,FIELD='MYINPUT' MAP$ TO-VARIABLE,VAR='MYBODY' SCENARIO END * SCRNEND END Presentation module for XML input with redefinition of fields This scenario generates two commareas, which are saved in VIRTEL variables MYHEAD and MYBODY, as shown below: Request type A ----+----1----+----2----+----3 MYHEAD: 1234A012345 MYBODY: blue 00005 Request type B ----+----1----+----2----+----3 MYHEAD: 2345B023457 MYBODY: ENquarto Commarea generated from XML input with redefinition of fields 1.17.3 Presentation of XML output By using an output scenario and a suitable page template, VIRTEL can transform application program output into XML when the result is sent back in the HTTP response. 226 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 Presentation module for XML output An output scenario is used to extract data from the output 3270 data stream of the transaction and place it into one or more table variables. The example presentation module SCENXMLO shown below contains an OUTPUT scenario which creates two variables, ACCTNUM and FULLNAME, from a table of values displayed on the 3270 screen: SCENXMLO SCENARIO SKIP04 SKIP05 SKIP06 SKIP07 SCREENS EXEC=NO OUTPUT IF$ (04,2,6),EQ=' ',THEN=SKIP04 COPY$ SCREEN-TO-VARIABLE,SCREEN=(04,2,6),VAR='ACCTNUM' COPY$ SCREEN-TO-VARIABLE,SCREEN=(04,10,20),VAR='FULLNAME' EQU * IF$ (05,2,6),EQ=' ',THEN=SKIP05 COPY$ SCREEN-TO-VARIABLE,SCREEN=(05,2,6),VAR='ACCTNUM' COPY$ SCREEN-TO-VARIABLE,SCREEN=(05,10,20),VAR='FULLNAME' EQU * IF$ (06,2,6),EQ=' ',THEN=SKIP06 COPY$ SCREEN-TO-VARIABLE,SCREEN=(06,2,6),VAR='ACCTNUM' COPY$ SCREEN-TO-VARIABLE,SCREEN=(06,10,20),VAR='FULLNAME' EQU * IF$ (07,2,6),EQ=' ',THEN=SKIP07 COPY$ SCREEN-TO-VARIABLE,SCREEN=(07,2,6),VAR='ACCTNUM' COPY$ SCREEN-TO-VARIABLE,SCREEN=(07,10,20),VAR='FULLNAME' EQU * SCENARIO END SCRNEND END HTTP presentation module for XML output Note: It is also possible for the application program to create VIRTEL table variables directly, either by means of an “FAE5” structured field, or via the HOST4WEB command “SET VARIABLE”. The FAE5 structured field allows the application to pass large amounts of raw data to VIRTEL without being constrained by the limitations of the 3270 screen geometry. For such “VIRTEL-aware” applications, an output scenario is not necessary. Page template for XML output The URL in this example is /demohttp/xmldemo.xml+tran3 which requests VIRTEL to use the page template xmldemo.xml to process the output of the tran3 transaction. The purpose of the page template is to convert the transaction output into XML format. In the page template xmldemo.xml shown below, the output data is obtained from the VIRTEL table variables ACCTNUM and FULLNAME which were created either by the output scenario SCENXMLO, or directly by the application program: {{{SET-OUTPUT-ENCODING-UTF-8 ""}}} {{{FOR-EACH-VALUE-IN "ACCTNUM"}}} {{{TRIMMED-VALUE-OF "ACCTNUM"}}} {{{TRIMMED-VALUE-OF "FULLNAME"}}} 1.17. VIRTEL Web Integration 227 Virtel User Guide, Release 4.57 {{{END-FOR "ACCTNUM"}}} Example page template for XML output data 1.17.4 VIRTEL as an XML parser/generator An application can use the VIRTEL HTTP server as an XML parser/generator engine. A client program establishes a TCP/ IP session with the VIRTEL HTTP server, and sends XML or commarea data to VIRTEL in an HTTP request. VIRTEL performs conversion to or from XML, and returns the resulting commarea or XML data to the client program in the HTTP response. It is the INITIAL scenario associated with the VIRTEL transaction which determines whether the conversion is from XML to commarea format, or vice versa. Conversion from XML to commarea format is performed by a transaction whose INITIAL scenario contains a MAP$ FROM-FIELD or MAP$ FROM-INPUT instruction. Conversion from commarea to XML format is performed by a transaction whose INITIAL scenario contains a TOVAR$ FROM-FIELD or TOVAR$ FROM-INPUT instruction. Both scenarios can reference a common set of MAP$ statements which describe the relationship between the XML stream and the commarea. In each case an appropriate page template must also be used, as shown in the detailed examples which follow. Communication via VIRKIX A client program running under CICS on MVS can use VIRKIX to establish the HTTP connection, send the request, and receive the response. The client program may send the request in either ASCII or EBCDIC; both formats are recognized and supported by VIRTEL. Notice the use of the special header GIVE-LENGTHPREFIX which requests VIRTEL to add a 4-byte length prefix to the HTTP response, to conform with the format expected by VIRKIX CALL type ‘M’. Example MAP$ statements The copy member SCONVMAP shown below contains the MAP$ statements common to both examples presented in this section. This member is copied into each of the scenarios SCONVXML and SCONVPLA by means of an assembler COPY statement. Member name SCONVMAP CAREA IDENT IDENT VERIF VERIF 228 MAP$ BEGIN MAP$ AREA,WITH='date',LENGTH=8,TYPE=(ONLY9,LEFT-ALIGNED), FORMAT=('9999-99-99',9) MAP$ BEGIN,WITH='identity' MAP$ EVENTUAL-AREA,FROM-CONSTANT,'1',WHEN=(ELEMENT,'bic') MAP$ ELSETHEN-AREA,FROM-CONSTANT,'2',WHEN=(ELEMENT,'iban') MAP$ ELSETHEN-AREA,FROM-CONSTANT,'3',WHEN=(ELEMENT,'rib') MAP$ ELSETHEN-AREA,FROM-CONSTANT,' ' MAP$ AREA,LENGTH=8 MAP$ END MAP$ BEGIN,WITH='verified' MAP$ EVENTUAL-AREA,FROM-CONSTANT,'1',WHEN=(VALUE,'yes') MAP$ ELSETHEN-AREA,FROM-CONSTANT,'0',WHEN=(VALUE,'no') MAP$ ELSETHEN-AREA,FROM-CONSTANT,'0' MAP$ END MAP$ AREA,WITH='amount',LENGTH=5,TYPE=ONLY9, * * Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 FORMAT=('$999.99',9) CAREA MAP$ END MAP$ statements for VIRTEL XML parser/generator XML-to-commarea conversion using the VIRTEL XML parser The figure below shows an example transaction definition to be used for XML-to-commarea conversion using the VIRTEL XML parser. The external name “tranxml” is the name referenced in the URL of the HTTP request which calls the transaction. The special application name $NONE$ indicates that no host application is to be called. The /&S order specified in the “TIOA at Logon” field causes the INITIAL scenario “SCONVXML” to be executed. TRANSACTION DETAIL DEFINITION ---------------------- Applid: VIRTELD2 16:39:25 Internal name ===> HTTP-16X To associate with an entry point name External name ===> tranxml Name displayed on user menu Description ===> VIRTEL XML parser Application ===> $NONE$ Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 2 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> HTLOC Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed How started ===> 1 1=menu 2=sub-menu 3=auto Security ===> 0 0=none 1=basic 2=NTLM 3=TLS 4=HTML H4W commands ? ===> 0=no 1=yes 2=if2VIRTEL 4=auto Logon message ===> TIOA at logon ===> &/S &/T TIOA at logoff ===> Initial Scenario ===> SCONVXML Input Scenario ===> Final Scenario Output Scenario ===> ===> P1=Update P3=Return P12=Server VIRTEL transaction definition for XML-to-commarea conversion The initial scenario for XML-to-commarea conversion is shown below: Member name SCONVXML SCONVXML SCENARIO CAREA CAREA SCREENS APPL=SCONVXML INITIAL COPY SCONVMAP (copy member shown in Figure 1 -126) MAP$ FROM-INPUT MAP$ TO-VARIABLE,VAR='MYAREA' SCENARIO END SCRNEND END Initial scenario for XML-to-commarea conversion An example request for XML-to-commarea conversion using the VIRTEL XML parser is shown in the figure below: 1.17. VIRTEL Web Integration 229 Virtel User Guide, Release 4.57 POST /demohttp/myarea.txt+tranxml HTTP/1.1 Host: 192.168.235.30 Accept: */* Content-Length: 172 Special: GIVE-LENGTH-PREFIX 2006-06-21 AB1234CD yes $123.45 Input request for XML-to-commarea conversion The HTTP request shown above specifies the use of a page template named myarea.txt which is stored in a VIRTEL directory and is shown in the figure below. By use of this page template, the commarea MYAREA created by the INITIAL scenario SCONVXML is inserted into the HTTP response data: Page template myarea.txt {{{ SET-CONTENT-TYPE "text/plain"}}} {{{ CURRENT-VALUE-OF "MYAREA" }}} Page template for XML-to-commarea conversion The figure below shows the HTTP response returned by VIRTEL. The body of the response contains the input data converted to commarea format: HTTP/1.1 200 Ok Server: Virtel/4.32 Date: Wed, 21 Jun 2006 15:31:02 GMT Expires: 0 Content-length: 00000029 Content-type: text/plain 200606212AB1234CD112345 Output response from XML-to-commarea conversion Commarea-to-XML conversion using the VIRTEL XML generator The figure below shows an example transaction definition to be used for commarea-to-XML conversion using the VIRTEL XML generator. The external name “trancom” is the name referenced in the URL of the HTTP request which calls the transaction. The special application name $NONE$ indicates that no host application is to be called. The /&S order specified in the “TIOA at Logon” field causes the INITIAL scenario “SCONVPLA” to be executed. TRANSACTION DETAIL DEFINITION ---------------------- Applid: VIRTELD2 16:39:58 Internal name ===> HTTP-16Y To associate with an entry point name External name ===> trancom Name displayed on user menu Description ===> VIRTEL XML generator Application ===> $NONE$ Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 2 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> HTLOC Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed 230 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 How started Security H4W commands ? Logon message TIOA at logon ===> 1 ===> 0 ===> ===> ===> &/S &/T TIOA at logoff ===> 1=menu 2=sub-menu 3=auto 0=none 1=basic 2=NTLM 3=TLS 4=HTML 0=no 1=yes 2=if2VIRTEL 4=auto Initial Scenario ===> SCONVPLA Input Scenario ===> P1=Update Final Scenario ===> Output Scenario ===> P3=Return VIRTEL transaction definition for commarea-to-XML conversion XML conversion is shown below: P12=Server The initial scenario for commarea-to- Member name SCONVPLA SCONVPLA SCREENS APPL=SCONVPLA SCENARIO INITIAL COPY SCONVMAP CAREA TOVAR$ FROM-INPUT SCENARIO END SCRNEND END Initial scenario for commarea-to-XML conversion An example request for commarea-to-XML conversion using the VIRTEL XML parser is shown in the figure below: POST /demohttp/mydata.xml+trancom HTTP/1.1 Host: 192.168.235.30 Accept: */* Content-Length: 27 Special: GIVE-LENGTH-PREFIX 200606212AB1234CD112345 Input request for commarea-to-XML conversion The HTTP request shown above specifies the use of a page template named mydata.xml which is stored in a VIRTEL directory and is shown in the figure below. By use of this page template, the output variables created by the TOVAR$ instruction in the INITIAL scenario SCONVPLA are inserted into the HTTP response data: Page template mydata.xml {{{ SET-CONTENT-TYPE "text/xml"}}}{{{SET-OUTPUT-ENCODING-UTF-8 ""}}} {{{CURRENT-VALUE-OF "date"}}} {{{WHEN-EXISTS "bic"}}}{{{CURRENT-VALUE-OF "bic"}}}{{{END -WHEN-EXISTS "bic"}}} {{{WHEN-EXISTS "iban"}}}{{{CURRENT-VALUE-OF "iban"}}}{{{END-WHEN-EXISTS "iban"}}} {{{WHEN-EXISTS "rib"}}}{{{CURRENT-VALUE-OF "rib"}}}{{{END 1.17. VIRTEL Web Integration 231 Virtel User Guide, Release 4.57 -WHEN-EXISTS "rib"}}} {{{CURRENT-VALUE-OF "verified"}}} {{{CURRENT-VALUE-OF "amount"}}} Page template for commarea-to-XML conversion The figure below shows the HTTP response returned by VIRTEL. The body of the response contains the input commarea data converted to XML format: HTTP/1.1 200 Ok Server: Virtel/4.32 Date: Wed, 21 Jun 2006 16:02:55 GMT Expires: 0 Content-length: 00000207 Content-type: text/xml 2006-06-21 AB1234CD yes $123.45 Output response from commarea-to-XML conversion 1.17.5 Automatic scenario generation MAPGEN program The MAPGEN program allows the automatic generation of scenarios from COBOL copybooks. The input to the MAPGEN program is a COBOL copybook containing data division definitions of a commarea. The output from the MAPGEN program may be: • a scenario for “input-to-commarea” conversion • a scenario for “commarea-to-output” conversion • an optional page template to convert the generated output variables into XML format The MAPGEN program (MAPGREX) and the JCL to execute it (MAPGJCL) are delivered as members of the VIRTEL SAMPLIB. The start of the MAPGJCL job is shown below: //VIRMAPGN JOB 1,MAPGEN,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //* //* MAPGEN : Generate VIRTEL SCENARIO from COBOL copybook //* // SET QUAL=yourqual.VIRTnnn Prefix of VIRTEL dataset names // SET COPYLIB=your.cobol.srcelib Library containing copybook // SET MEMBER=copybook Copybook member name // SET STYLE=APOST APOST or QUOTE // SET PREFIX='TIOA-' Field name prefix to be removed // SET CASE=LOWER Field names UPPER or LOWER case // SET CODE='ENC=IE' UTF-8 or ISO or ENC=varname // SET FORMAT=QUERY XML QUERY 'XML=f' COM 'COM=x' // SET VAR=MYCOMMAREA Output (XML/QUERY) Input (COM) 232 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 // SET XMLGEN=NO YES or NO to run XMLGEN step //* Automatic scenario generation: MAPGJCL job The parameters required to customize this job are coded as SET statements at the start of the job. The meaning of the parameters is as follows: QUAL=yourqual.VIRTnnn Prefix of VIRTEL dataset names. This job requires access to the SAMPLIB, LOADLIB, and SCRNAPI.MACLIB datasets. The generated scenario is written as a load module in the LOADLIB dataset. COPYLIB=your.cobol.srcelib Name of library containing the input copybook MEMBER=copybook Member name of the input copybook in the COPYLIB library STYLE=APOST|QUOTE STYLE specifies whether the copybook uses single or double quotation marks to delimit strings. APOST (single quotation marks) is the default. PREFIX=’prefix’ (optional) If specified, the prefix will be removed from the field names in the copybook CASE=LOWER|UPPER (optional) If specified, all field names in the copybook will be converted to LOWER or UPPER case. If not specified, the case will be preserved. CODE=encoding (optional) Specifies the encoding of HTML form-field parameters in the input URL. The following encodings may be specified:UTF-8 Input form-fields are encoded in UTF-8 format ISO Input form-fields are encoded in non-UTF-8 format ‘ENC=fieldname’ The contents of the URL form-field named fieldname are queried to obtain the encoding value (UTF-8 or ISO). This allows the client to dynamically specify the encoding method by means of a URL parameter. If CODE is not specified, or if CODE=’ENC=fieldname’ is specified and the URL does not contain the parameter fieldname=UTF-8 or fieldname=ISO, then the VIRTEL default encoding (ISO) is assumed. FORMAT=format Specifies the type of scenario to be generated. The following formats may be specified:QUERY Generates an INITIAL scenario which accepts input data encoded as HTML formfields, and produces an output commarea. The generated scenario contains a “MAP$ FROM-INPUT”, QUERY instruction. XML Generates an INITIAL scenario which accepts XML input data in the body of an HTTP request, and produces an output commarea. The generated scenario contains a “MAP$ FROM-INPUT”, XML instruction. ‘XML=fieldname’ Generates an INITIAL scenario which accepts XML input encoded within an HTML form-field named fieldname, and produces an output commarea. The generated scenario contains a “MAP$ FROM-FIELD” instruction with the parameter FIELD=fieldname. COM When VAR is not specified: Generates an INITIAL scenario which accepts an input commarea in the body of an HTTP request, and produces a set of VIRTEL variables whose names correspond to the fields in the copybook. The generated scenario contains a “TOVAR$ FROM-INPUT” instruction. When VAR is specified: Generates an OUTPUT scenario which accepts an input commarea contained in the VIRTEL variable named by the VAR parameter, and produces a set of VIRTEL variables whose names correspond to the fields in the copybook. The generated scenario contains a “MAP$ FROM-VARIABLE” instruction. 1.17. VIRTEL Web Integration 233 Virtel User Guide, Release 4.57 ‘COM=fieldname’ Generates an INITIAL scenario which accepts an input commarea encoded within an HTML form-field named fieldname, and produces a set of VIRTEL variables whose names correspond to the fields in the copybook. The generated scenario contains a “MAP$ FROM-FIELD” instruction with the parameter FIELD=fieldname. VAR=commareaname For FORMAT=QUERY, FORMAT=XML, FORMAT=’XML=fieldname’ Specifies the name of the VIRTEL variable into which the output commarea is written. If not specified, the default is VAR=AREA For FORMAT=COM Optionally specifies the name of the VIRTEL variable which contains the input commarea XMLGEN=YES|NO Specifies whether an additional XMLGEN step is to be run. This parameter is useful when FORMAT=COM or FORMAT=’COM=fieldname’ is specified. If XMLGEN=YES then the job also generates a VIRTEL page template suitable for converting the VIRTEL result variables into XML format. The generated page template is written to userid.XMLGEN.OUTPUT which must be preallocated as a sequential dataset. The contents of this dataset should then be transferred to your workstation where it can be uploaded into a VIRTEL directory (see “Uploading pages by HTTP”). 234 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 1.18 Incoming E-mails The arrival of an e-mail on an SMTP line can trigger one of two types of action in VIRTEL, depending on the entry point chosen by the rules of the SMTP line: • Transfer of attached files to a VIRTEL directory • Start a CICS transaction (or other VTAM application) 1.18.1 Rules of the SMTP line When an e-mail arrives on an SMTP line, VIRTEL examines the rules of the line to determine which entry point will be used to process the incoming message. In the example below, the rule specifies that when the e-mail destination address is cicsmail@sample.com, and the sender address is customer@client.com, then entry point SMTPCICS will be used: DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: SPVIRE2 15:46:00 Name ===> SM200EML Rule priority is per name Status ===> ACTIVE 19 May 2004 15:46:00 VIRDBA Description ===> Appels entrants SMTP Entry point ===> SMTPCICS Target Entry Point Parameter ===> optional &1 value Trace ===> 1=commands 2=data 3=partner C 0 1 1 0 0 0 0 : 0=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT IP Subnet ===> 000.000.000.000 Mask ===> 000.000.000.000 Host ===> cicsmail@sample.com eMail ===> customer@client.com Calling DTE ===> Calling DTE address Called ===> Called DTE address CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) User Data ===> 0 Days 0 Start time ===> M: ===> H: T: M: P1=Update P4=Activate CREATION OK W: S: T: F: S: End time ===> H: P3=Return P5=Inactivate S: M: S: Enter=Add P12=Entry P. Rule for routing an incoming e-mail on an SMTP line 1.18.2 File transfer by e-mail An entry point which is used for file file transfer (including the upload of HTML pages) has a single transaction which calls VIRTEL module VIR0041B. This transaction is defined with application type 2 and integration mode 1. The menu program specified in the entry point must be VIR0021B. Only authorized users can perform transfers. See Correspondent Management in the Virtel Administration Guide. ENTRY POINT DETAIL Name ===> Description ===> Transactions ===> Videotex key ===> Transparency ===> DEFINITION ---------------------- Applid: SPVIRE2 15:52:26 SMTP Name this ENTRY POINT (LOGON DATA) Receive e-mail for file transfer SMTP Prefix for associated transactions If videotex, keyword or $NONE$ Server types NOT to emulate 1.18. Incoming E-mails 235 Virtel User Guide, Release 4.57 Time out ===> 0005 minutes Do if timeout ===> 0 Emulation ===> EMAIL MINITEL : 40 or 80 columns HTML : Web Browser EBCDIC : not translated Signon program ===> Menu program ===> VIR0021B Identification scenario ===> Type 3 compression ===> Mandatory identification ===> 3270 swap key ===> Extended colors ===> P1=Update Enter=Add Maximum inactive time 0=logoff 1=bip+logoff 2=anti pad Type of terminal: PC : Emulation done by VirtelPC VT : VT 100 X25 : uses low level dialog Controls user name and password List of transactions eg XML identification Discover typical screens (Virtel/PC) (PC or minitel) eg P24 E: extended X: extended + DBCS P3=Return P4=Transactions Entry point for file transfer by SMTP TRANSACTION DETAIL DEFINITION ---------------------- Applid: SPVIRE2 15:56:00 Internal name ===> SMTP-05 To associate with an entry point name External name ===> E-Mail Name displayed on user menu Description ===> File transfer by SMTP Application ===> VIR0041B Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 2 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed How started ===> 1 1=menu 2=sub-menu 3=auto Security ===> 1 0=none 1=basic 2=NTLM 3=TLS 4=HTML Translation(s) ===> 0=idem 1=8040 2=8080 3=4040 4=auto Logon message ===> TIOA at logon ===> TIOA at logoff ===> Initial Scenario ===> Input Scenario ===> P1=Update Final Scenario Output Scenario P3=Return ===> ===> P12=Server Transaction for file transfer by SMTP 1.18.3 Starting an application by E-Mail When an entry point is used for starting an application by e-mail, the application must be associated with a relay (or pseudo-3270 terminal) through which the application can retrieve the contents of the e-mail. It is therefore necessary to specify the name of a relay LU in the definition of the terminals attached to the SMTP line (refer to the VIRTEL Connectivity Reference documentation for details of defining an SMTP line). For this type of application, the entry point chosen by the rules of the SMTP line has a single VIRTEL transaction, defined with application type 1 and integration mode 1, which calls the target VTAM application (such as CICS). The name of the CICS transaction to be started can be specified in the “TIOA at logon” field of the VIRTEL transaction definition. 236 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 The menu program specified in the entry point must be VIR0021B. ENTRY POINT DETAIL DEFINITION ---------------------- Applid: SPVIRE2 16:07:14 Name ===> SMTPCICS Name this ENTRY POINT (LOGON DATA) Description ===> CICS transaction started by email Transactions ===> SMCICS Prefix for associated transactions Videotex key ===> If videotex, keyword or $NONE$ Transparency ===> Server types NOT to emulate Time out ===> 0001 minutes Maximum inactive time Do if timeout ===> 0 0=logoff 1=bip+logoff 2=anti pad Emulation ===> EMAIL Type of terminal: MINITEL : 40 or 80 columns PC : Emulation done by VirtelPC HTML : Web Browser VT : VT 100 EBCDIC : not translated X25 : uses low level dialog Signon program ===> Controls user name and password Menu program ===> VIR0021B List of transactions Identification scenario ===> eg XML identification Type 3 compression ===> Discover typical screens (Virtel/PC) Mandatory identification ===> (PC or minitel) 3270 swap key ===> eg P24 Extended colors ===> E: extended X: extended + DBCS P1=Update Enter=Add P3=Return P4=Transactions Entry point for application started by SMTP TRANSACTION DETAIL DEFINITION ---------------------- Applid: SPVIRE2 15:56:00 Internal name ===> SMCICS-1 To associate with an entry point name External name ===> MAILIN Name displayed on user menu Description ===> CICS transaction started by Email Application ===> SPCICST Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 1 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed How started ===> 1 1=menu 2=sub-menu 3=auto Security ===> 1 0=none 1=basic 2=NTLM 3=TLS 4=HTML Translation(s) ===> 0=idem 1=8040 2=8080 3=4040 4=auto Logon message ===> TIOA at logon ===> MELI TIOA at logoff ===> Initial Scenario ===> Input Scenario ===> P1=Update Final Scenario Output Scenario P3=Return ===> ===> P12=Server Transaction for application started by SMTP The corresponding CICS definition is shown in the example below: DEFINE PROFILE(MELPROF) GROUP(VIRTSMTP) DESCRIPTION(TRANSACTION TO PROCESS INCOMING EMAILS) UCTRAN(NO) DEFINE TRANSACTION(MELI) GROUP(VIRTSMTP) DESCRIPTION(TRANSACTION TO PROCESS INCOMING EMAILS) 1.18. Incoming E-mails 237 Virtel User Guide, Release 4.57 PROGRAM(SMTPMELI) PROFILE(MELPROF) DEFINE PROGRAM(SMTPMELI) GROUP(VIRTSMTP) DESCRIPTION(PROGRAM TO PROCESS INCOMING EMAILS) CICS definitions for application started by e-mail Note that the UCTRAN(NO) parameter must be specified both in the PROFILE and in the TYPETERM, and that the RECEIVESIZE specified in the TYPETERM must be sufficient to contain the e-mail response data structured field. One the application has been launched, it can retrieve data from the e-mail by sending an FAC8 code 12 structured field to VIRTEL via the relay LU and reading the response (see “Retrieve Data From An E-Mail”). 238 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 1.19 VIRTEL Batch The VIRTEL Batch facility allows you to run VIRTEL as a batch job to execute HTTP-like requests. VIRTEL reads HTTP-like requests from a SYSIN dataset, executes the desired transaction, and writes an HTTP-like response to a SYSOUT dataset. When all of the HTTP-like requests have been processed, VIRTEL terminates if requested. VIRTEL runs as a batch job when both of the following conditions are true: 1. The VIRTCT contains a BATCH1 parameter. For details, refer to “Parameters of the VIRTCT” in the VIRTEL Installation Guide manual. 2. A BATCH line is defined in the VIRTEL configuration in the VIRARBO file. For details, refer to “Definition of a BATCH line” in the VIRTEL Connectivity Reference manual. Before running a VIRTEL Batch job for the first time, several preparatory steps must be performed:• A VIRTCT for VIRTEL Batch must be assembled and link-edited into the VIRTEL load library • A configuration file (VIRARBO) for VIRTEL Batch must be built • A page template file (HTMLTRSF) for the VIRTEL Batch job must be allocated and loaded • Work files (VIRSWAP, VIRHTML) for the VIRTEL Batch job must be allocated and initialized These preparatory steps, which in general only need to be performed once, are described in the following sections. 1.19.1 Assembling the VIRTCT for VIRTEL Batch VIRTEL Batch requires a special VIRTCT which must be assembled and link-edited into the VIRTEL load library. The figure below shows SAMPLIB member VIRTCTBA, which is an example VIRTCT suitable for running VIRTEL Batch. The job ASMTCT in the VIRTEL SAMPLIB should be run once to assemble and link-edit this module as VIRTCTBA in the VIRTEL load library: VIRTCTBA TITLE 'VIRTCT FOR VIRTEL BATCH' PRINT GEN VIRTERM TYPE=INITIAL,APPLID=*NOAPPL*, * BATCH1=(SYSIN,DCBI1,SYSPRINT,DCBO1), * VIRSV1=(VIRSV), * HTVSAM=VIRHTML, * BUFSIZE=16000, * STATS=NO, * UFILE1=(HTMLTRSF,ACBH1,0,10,01), * MEMORY=ABOVE, * COMPANY='YOUR COMPANY NAME', * ADDR1='YOUR COMPANY ADDRESS', * ADDR2='YOUR COMPANY ADDRESS', * LICENCE='YOUR LICENCE ID', * EXPIRE=(2008,12,31), * CODE='00000000' TITRE1='VIRTEL BATCH' *---------------------------------------------------------------------* ACBH1 ACB AM=VSAM,DDNAME=HTMLTRSF,MACRF=(SEQ,DIR,OUT,LSR), * STRNO=3 *---------------------------------------------------------------------* DCBI1 DCB DDNAME=SYSIN, SYSIN DD * DCBE=DCBI1X, * LRECL=80, * 1.19. VIRTEL Batch 239 Virtel User Guide, Release 4.57 DSORG=PS, * RECFM=FB, * MACRF=(GL) DCBI1X DCBE EODAD=0,RMODE31=BUFF *---------------------------------------------------------------------* DCBO1 DCB DDNAME=SYSPRINT, SYSPRINT DD * DCBE=DCBO1X, * LRECL=133, * DSORG=PS, * RECFM=FBA, * MACRF=(PM) DCBO1X DCBE RMODE31=BUFF *---------------------------------------------------------------------* END Example VIRTCT for VIRTEL Batch 1.22.1.2. Building the configuration file for VIRTEL Batch VIRTEL Batch requires its own configuration file (VIRARBO) which defines a Batch Line, the page template dataset, a Batch Entry Point, and the Transactions which will be executed by the VIRTEL Batch job. The figure below shows SAMPLIB member VIRBATAR, which is an example of a job to create the VIRARBO file for use by VIRTEL Batch. This job should be run once before the first execution of a VIRTEL Batch job: //VIRBATAR JOB 1,VIRBATAR,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID // SET LOADLIB=yourqual.VIRTnnn.LOADLIB //DEFINE EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* DELETE (yourqual.VIRBATCH.ARBO) CLUSTER PURGE SET MAXCC = 0 DEFINE CLUSTER(NAME(yourqual.VIRBATCH.ARBO) KEYS(9 0) RECSZ(100 4089) FSPC(10 10) VOL(XXXXXX) REC(250,50) SHR(4) SPEED) DATA(NAME(yourqual.VIRBATCH.ARBO.DATA) CISZ(4096)) INDEX(NAME(yourqual.VIRBATCH.ARBO.INDEX)) //CONFIG EXEC PGM=VIRCONF,COND=(0,NE),PARM='LOAD,LANG=&LANG' //STEPLIB DD DSN=&LOADLIB,DISP=SHR //SYSPRINT DD SYSOUT=* //VIRARBO DD DSN=yourqual.VIRBATCH.ARBO,DISP=SHR LINE ID=B-BT1,NAME=BATCH-L1, DESC='VIRTEL Batch line', TYPE=BATCH1,ENTRY=EPBATCH,TERMINAL=BT, INOUT=1,PROTOCOL=VIRHTTP,RULESET=B-BT1 TERMINAL ID=BTLOC000, DESC='VIRTEL Batch terminals (no relay)', TYPE=3,COMPRESS=2,INOUT=3,STATS=12,REPEAT=4 TERMINAL ID=BTVTA000,RELAY=*HTTPOOL, DESC='VIRTEL Batch terminals (with relay)', TYPE=3,COMPRESS=2,INOUT=3,STATS=12,REPEAT=4 TERMINAL ID=BTVTP000,RELAY=RVIRBT00,POOL=*HTTPOOL, DESC='Relay pool for HTTP', TYPE=3,COMPRESS=2,INOUT=3,STATS=12,REPEAT=4 SUBDIR ID=W2H-DIR, DESC='Pages for WEB2HOST', FSTYPE=V,DDNAME=HTMLTRSF,KEY=W2H-KEY, NAMELEN=64,AUTHUP=X,AUTHDOWN=X,AUTHDEL=X ENTRY ID=EPBATCH, 240 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 DESC='VIRTEL Batch entry point', TRANSACT=BAT,TIMEOUT=1,ACTION=0,EXTCOLOR=X, EMUL=HTML,SIGNON=VIR0020H,MENU=VIR0021A TRANSACT ID=BAT-00,NAME=EPBATCH, DESC='Default directory = entry point name', APPL=W2H-DIR,TYPE=4, TERMINAL=BTLOC,integration=2,SECURITY=0 TRANSACT ID=BAT-14,NAME='Protide', DESC='XML conversion', APPL=$NONE$,TYPE=2, TERMINAL=BTLOC,integration=1,SECURITY=0, TIOASTA='&/S OK &/T', EXITSTA=SCENSVIO * END OF CONFIGURATION Job to build configuration file for VIRTEL Batch 1.19.2 Allocating the page template file for VIRTEL Batch Each VIRTEL Batch job requires an HTMLTRSF file which contains the page templates used by the transactions which will be executed by the VIRTEL Batch job. The figure below shows SAMPLIB member VIRBATAT, which is an example job to allocate the HTMLTRSF file and to copy the page templates from the sample file (SAMPTRSF) distributed with VIRTEL. This job should be run once before the first execution of a VIRTEL Batch job: //VIRBATAT JOB 1,VIRBATAT,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //*-------------------------------------------------------------------* //* DEFINITION OF FILE HTMLTRSF * //*-------------------------------------------------------------------* //SAMPTRF EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* DELETE (yourqual.VIRBATCH.HTMLTRSF) CLUSTER PURGE SET MAXCC = 0 DEFINE CLUSTER (NAME(yourqual.VIRBATCH.HTMLTRSF) VOL(XXXXXX) SHR(2) KEYS(16 0) RECSZ(100 32758) REC(250 100)) DATA (NAME(yourqual.VIRBATCH.HTMLTRSF.DATA) SPANNED CISZ(4096)) INDEX (NAME(yourqual.VIRBATCH.HTMLTRSF.INDEX) CISZ(512)) //*-------------------------------------------------------------------* //* INITIALISATION OF FILE HTMLTRSF * //*-------------------------------------------------------------------* //SAMPTRF EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SAMPTRSF DD DSN=yourqual.VIRTnnn.SAMP.TRSF,DISP=SHR //HTMLTRSF DD DSN=yourqual.VIRBATCH.HTMLTRSF,DISP=OLD //SYSIN DD * REPRO INFILE(SAMPTRSF) OUTFILE(HTMLTRSF) Job to allocate page template file for VIRTEL Batch 1.19.3 Allocating work files for VIRTEL Batch Each VIRTEL Batch job requires its own VIRSWAP and VIRHTML files. The figure below shows SAMPLIB member VIRBATAW, which is an example job to allocate these files: 1.19. VIRTEL Batch 241 Virtel User Guide, Release 4.57 //VIRBATAW JOB 1,VIRBATAW,CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //*----------------------------------------------------------------* //* DEFINITION OF FILES VIRSWAP AND VIRHTML * //*----------------------------------------------------------------* //VIRWORK EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* DELETE (yourqual.VIRBATCH.SWAP) CLUSTER PURGE DELETE (yourqual.VIRBATCH.HTML) CLUSTER PURGE SET MAXCC = 0 DEFINE CLUSTER (NAME(yourqual.VIRBATCH.SWAP) VOL(XXXXXX) KEYS(16 0) REC(10,5) RECSZ(100 8185) REUSE FSPC(10 10) SHR(2) SPEED) DATA (NAME(yourqual.VIRBATCH.SWAP.DATA) CISZ(8192)) INDEX (NAME(yourqual.VIRBATCH.SWAP.INDEX)) DEFINE CLUSTER (NAME(yourqual.VIRBATCH.HTML) VOL(XXXXXX) KEYS(64 0) REC(5 5) RECSZ(1000 4089) FSPC(10 10) SHR(4) SPEED) DATA (NAME(yourqual.VIRBATCH.HTML.DATA) CISZ(4096)) INDEX (NAME(yourqual.VIRBATCH.HTML.INDEX)) //*----------------------------------------------------------------* //* INITIALISATION OF FILE VIRHTML * //*----------------------------------------------------------------* //INIHTML EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INIT DD DATA,DLM=AA $$$$IWS.WORKREC.INW$TEMP AA //VIRHTML DD DSN=yourqual.VIRBATCH.HTML,DISP=OLD REPRO INFILE(INIT) OUTFILE(VIRHTML) Job to allocate work files for VIRTEL Batch 1.19.4 Running the VIRTEL Batch job The figure below shows SAMPLIB member VIRBATCH, which contains an example of a VIRTEL Batch job: //VIRBATCH JOB 1,VIRBATCH,CLASS=G,MSGCLASS=X,NOTIFY=&SYSUID // SET TCT=BA // SET QUAL1=yourqual.VIRT457 // SET QUAL2=yourqual.VIRBATCH //VIRBAT EXEC PGM=VIR0000,REGION=64M,PARM=&TCT //STEPLIB DD DISP=SHR,DSN=&QUAL1..LOADLIB //DFHRPL DD DISP=SHR,DSN=&QUAL1..LOADLIB //SERVLIB DD DISP=SHR,DSN=&QUAL1..LOADLIB //VIRARBO DD DISP=OLD,DSN=&QUAL2..ARBO //VIRSWAP DD DISP=OLD,DSN=&QUAL2..SWAP //VIRHTML DD DISP=OLD,DSN=&QUAL2..HTML //HTMLTRSF DD DISP=OLD,DSN=&QUAL2..HTMLTRSF //SYSIN DD * (commands and data statements, see below) //SYSPRINT DD SYSOUT=* //VIRLOG DD SYSOUT=* Example JCL for VIRTEL Batch The SYSIN file contains commands and data statements. The following commands are valid in the SYSIN 242 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 file: .GET indicates the start of an HTTP GET command .POST indicates the start of an HTTP POST command .RAW indicates the start of a raw HTTP request command .END indicates the end of a GET, POST, or RAW command .EOJ causes VIRTEL to terminate These commands are described in the following sections. 1.19.5 VIRTEL Batch commands VIRTEL Batch GET command The following figure shows an example SYSIN file containing two GET commands: .GET /protide.htm+protide VIRTEL transaction name schema=TCC Schema name in='TCC.DATA' Input dataset name out='TCC.XML' Output dataset name mode=wb,recfm=vb,lrecl=512,space=(cyl,(10,5)) Output file attributes output_encoding=U Output encoding U or E .END .GET /protide.htm+protide VIRTEL transaction name schema=CRPR Schema name in='CRPR.XML' Input dataset name out='CRPR.DATA' Output dataset name mode=wb,recfm=fb,lrecl=200 Output file attributes input_encoding=U Input encoding U or E .END .EOJ Example VIRTEL Batch GET commands Each .GET command is followed by one or more data statements. The first statement following the .GET command is the VIRTEL URL of the HTTP request (see “Virtel URL formats”). Only the pathname, pagename, and tranname parts of the URL are required. The http: //ipaddr:port part of the URL must be omitted. All subsequent statements (if any) following the .GET command are appended to the URL as query parameters. To conform with standard HTTP query syntax, VIRTEL adds a “?” before the first parameter and a “&” before each subsequent parameter. Thus, in the above example, VIRTEL generates two HTTP requests: GET /protide.htm+protide? schema=TCC&in='TCC.DATA'&out='TCC.XML'&mode=wb,recfm=vb,lrecl=512, space=(cyl,(10,5))&output_encoding=U HTTP/1.1 GET /protide.htm+protide?schema=CRPR&in='CRPR.XML'&out='CRPR.DATA'&mode=wb, recfm=fb,lrecl=200&input_encoding=U HTTP/1.1 Example VIRTEL Batch GET requests 1.19. VIRTEL Batch 243 Virtel User Guide, Release 4.57 VIRTEL Batch POST command The following figure shows an example SYSIN file containing a POST command followed by XML data: .POST text/xml /xmldemo.xml+tran3 T000-GAL 3270 FIELD001 A .END .EOJ Example VIRTEL Batch POST command Each .POST command is followed by two or more data statements containing the URL and the request body. The first statement following the .POST command is the VIRTEL URL of the HTTP request (see “Virtel URL formats”). Only the pathname, pagename, and tranname parts of the URL are required. The http: //ipaddr:port part of the URL must be omitted. All subsequent statements following the .POST command are considered to be the request body. VIRTEL automatically generates a Content-length: header corresponding to the size of the request body. VIRTEL also adds a Content-type: header if the content type is specified as an operand of the .POST command as shown in the example. Thus, in the above example, VIRTEL generates the following HTTP request: POST /xmldemo.xml+tran3 HTTP/1.1 Content-Length: 00000201 Content-Type: text/xml Special: GIVE-LENGTH-PREFIX T000-GAL 3270 FIELD001 A Example VIRTEL Batch POST request 1.19.6 VIRTEL Batch RAW command The following figure shows an example SYSIN file containing a RAW command followed by HTTP request data: .RAW POST /virmsg.txt+uplw2h HTTP/1.1 Content-Type: multipart/form-data; boundary=-----------------9503744825200 Content-Length: 227 244 Chapter 1. The Virtel Engine Virtel User Guide, Release 4.57 -------------------9503744825200 Content-Disposition: form-data; name="file"; filename="test.txt" Content-Type: text/plain This is the test data file for upload More test data here -------------------9503744825200-.END .EOJ Example VIRTEL Batch RAW command Each .RAW command is followed by one or more data statements containing the HTTP request line, the request headers, and the request body. A blank line separates the request headers from the request body. VIRTEL generates an HTTP request exactly as contained in the data statements. 1.19.7 VIRTEL Batch return codes When a VIRTEL Batch job terminates, the condition code is set to the highest ERROR$ code set by the of the scenarios executed (value 0 to 255). The condition code may also be set to 4 or 5 (unless a scenario has indicated a higher value) if a request executed by the batch job produced an HTTP response code in the range 4xx or 5xx. In the case of a scenario abend, the completion code contains the offset of the abend within the scenario. If the VIRTEL Batch job terminates because of an error condition (for example, an invalid batch command, missing DD statement, or insufficient memory) then the condition code is set to 16. 1.19. VIRTEL Batch 245 Virtel User Guide, Release 4.57 246 Chapter 1. The Virtel Engine CHAPTER TWO OUTGOING CALLS 2.1 Outgoing E-mails The FAD4 structured field allows a host application to send an e-mail. This function is described in the VIRTEL Programming Interface documentation 280. The entry point used to invoke the host application must contain a type-3 transaction with external name $MAIL$. The “Application” field must contain the name of the SMTP line to be used for sending the outgoing e-mail. An example transaction is shown below: TRANSACTION DETAIL DEFINITION ---------------------- Applid: SPVIRE2 13:43:23 Internal name ===> W2H-75 To associate with an entry point name External name ===> $mail$ Name displayed on user menu Description ===> Send messages via SMTP Application ===> S-SMTP Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 3 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed How started ===> 2 1=menu 2=sub-menu 3=auto Security ===> 1 0=none 1=basic 2=NTLM 3=TLS 4=HTML Translation(s) ===> 0=idem 1=8040 2=8080 3=4040 4=auto Logon message ===> TIOA at logon ===> TIOA at logoff ===> Initial Scenario ===> Input Scenario ===> P1=Update Final Scenario Output Scenario P3=Return ===> ===> P12=Server Transaction definition for outgoing e-mails Refer to the VIRTEL Connectivity Reference documentation for details of defining transactions, entry points, and SMTP lines. 247 Virtel User Guide, Release 4.57 248 Chapter 2. Outgoing Calls CHAPTER THREE PROGRAMMING INTERFACES Certain VIRTEL functions can be driven by application programs. These functions are generally requested by sending specially formatted commands to VIRTEL on the same 3270 session through which the application communicates with the end user. An application can request VIRTEL functions in the following ways: • By sending a message containing structured fields recognized by VIRTEL • By embedding HOST4WEB commands in the 3270 screen (available from VIRTEL version 4.28 onwards) 3.1 Structred Fields In addition to sending normal screen display data, a 3270 application may also send data in specially formatted fields known as “structured fields”. Structured fields are sent using a special 3270 command “Write Structured Field” (code X’F3’). Each structured field contains a 2-byte identification code. VIRTEL intercepts structured fields whose code begins with X’FA’. By sending structured fields to VIRTEL on the 3270 session, the VIRTEL Web Integration application can direct VIRTEL to perform certain functions. The operations available to VIRTEL Web Integration applications via structured fields are as follows: • Specify the HTML page template to be used to format 3270 screens for the browser • Specify the directory from which HTML page templates are to be retrieved • Send a list of values (a table variable) to an HTML page • Send an outgoing e-mail • Retrieve the contents of an incoming e-mail 3.1.1 General format of a 3270 structured field As a general rule, the format of a structured field is as shown below: X'nnnnccccdd....dd' nnnn The length. The length includes the length of the nnnn and cccc fields, thus nnnn is always 4 more than the length of the data. cccc the identification code dd….dd the data. 249 Virtel User Guide, Release 4.57 3.1.2 Sending structured fields via the Write Structured Field command VIRTEL recognizes that a message contains structured fields whenever the application uses the 3270 command X’F3’ (Write Structured Field) to send the message to the terminal. For CICS applications, the STRFIELD option of the EXEC CICS SEND command requests CICS to send the message using command code X’F3’: EXEC CICS SEND FROM(DATA1) LENGTH(LENGTH OF DATA1) STRFIELD END-EXEC. For non-CICS applications, the appropriate method of generating a Write Structured Field command should be used. It is also possible to convert a normal message into a structured field message by means of VIRTEL exit 4 (outbound message exit). 3.1.3 Sending structured fields using the SRTVIRTEL prefix If the application monitor does not support the X’F3’ (Write Structured Field) command for sending structured fields (for example, IMS), VIRTEL provides an alternative method for processing structured field data. If the 3270 message begins with the special header: X'1140401D40',C'SRTVIRTEL',X'11404B' then VIRTEL treats the remainder of the message as structured fields. The SRTVIRTEL header is built by the application, and the application monitor adds 3270 command byte X’F1’ (Write), X’F5’ (Erase/Write), or X‘7E’ (Erase/Write Alternate), followed by an appropriate WCC (Write Control Character). For example, F1 C3 1140401D40 C’SRTVIRTEL’ 11404B 0016 FAE5 08 08 E3D9F0F0F0F0F0F1 818683A796A34040 is processed identically to: F3 0016 FAE5 08 08 E3D9F0F0F0F0F0F1 818683A796A34040 3.1.4 How To Determine If Running Under Virtel Because the structured fields described in this chapter are understood only by VIRTEL and not by regular 3270 terminals, your application will need to determine whether it is communicating with a VIRTEL pseudo-terminal before writing a VIRTEL structured field. This section describes some techniques that your application can use to decide if it is communicating with VIRTEL pseudo-terminal or with a regular 3270 terminal. 3.1.5 Use a different transaction code By defining two different transaction codes which invoke the same CICS application program (for example, DEMO for 3270, and VEMO for VIRTEL), the application can test the field EIBTRNID to determine if it is running under VIRTEL. The figure below shows sample DFHCSDUP statements to associate two transaction codes (DEMO and VEMO) with a single application program DEMOPROG: DEFINE TRANSACTION(DEMO) GROUP(DEMOGRP) PROGRAM(DEMOPROG) PROFILE(DFHCICST) STATUS(ENABLED) DEFINE TRANSACTION(VEMO) GROUP(DEMOGRP) PROGRAM(DEMOPROG) PROFILE(DFHCICST) STATUS(ENABLED) 250 Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 Defining an alternate CICS transaction code for an application The figure below shows sample VIRCONF statements to define a VIRTEL transaction which starts the application using the CICS transaction code VEMO: TRANSACT ID=CLI-10, NAME='CICS', DESC='Logon to DEMO application', APPL=DBDCCICS, TYPE=1, TERMINAL=CLVTA, integration=1, SECURITY=1, TIOASTA="Signon&/W&*7D4C7D&'114BE9'&U&'114CF9'&P&/Acomplete&/W VEMO&/A" Invoking the alternate transaction code from VIRTEL The figure below shows sample COBOL statements which allow the DEMOPROG program to take different actions based upon the CICS transaction code: In Working-Storage: 01 THIS-IS-VIRTEL-CALL-SW 88 THIS-IS-VIRTEL-CALL 88 THIS-IS-NOT-VIRTEL-CALL PIC X. VALUE 'Y'. VALUE 'N'. In the Procedure Division: IF EIBTRNID (1 : 1) = 'V' MOVE 'Y' TO THIS-IS-VIRTEL-CALL-SW ELSE MOVE 'N' TO THIS-IS-VIRTEL-CALL-SW END-IF Detecting VIRTEL by testing the transaction code 3.1.6 Include parameters after the transaction code By adding additional data after the transaction code when the transaction is invoked by VIRTEL, the application can receive the parameter data to verify whether it is running under VIRTEL. In the following example we add a V after the transaction code when the application is called via VIRTEL. The figure below shows sample VIRCONF statements to define a VIRTEL transaction which starts the CICS transaction DEMO with an additional parameter (“V”): TRANSACT ID=CLI-10, NAME='CICS', DESC='Logon to DEMO application', APPL=DBDCCICS, TYPE=1, TERMINAL=CLVTA, integration=1, SECURITY=1, TIOASTA="Signon&/W&*7D4C7D&'114BE9'&U&'114CF9'&P&/Acomplete&/W DEMOV&/A" Invoking a CICS transaction with additional parameters The figure below shows sample COBOL statements which must be added to the DEMOPROG program to receive and test the parameter data. When the transaction is started by VIRTEL, the parameter field 3.1. Structred Fields 251 Virtel User Guide, Release 4.57 contains “V”. When the transaction is started from a terminal, using the transaction code DEMO with no additional parameters, the parameter field contains spaces: in Working-Storage: 01 CICS-TIOA. 02 CICS-TIOA-TRANID PIC X(4) VALUE SPACES. 02 CICS-TIOA-PARAMV PIC X(1) VALUE SPACES. 02 FILLER PIC X(75) VALUE SPACES. 01 THIS-IS-VIRTEL-CALL-SW PIC X. 88 THIS-IS-VIRTEL-CALL VALUE 'Y'. 88 THIS-IS-NOT-VIRTEL-CALL VALUE 'N'. in the Procedure Division: EXEC CICS RECEIVE INTO(CICS-TIOA) END-EXEC IF CICS-TIOA-PARAMV = 'V' MOVE 'Y' TO THIS-IS-VIRTEL-CALL-SW ELSE MOVE 'N' TO THIS-IS-VIRTEL-CALL-SW END-IF Detecting VIRTEL by inspecting the contents of the TIOA 3.1.7 Use a specific range of terminal names Since all VIRTEL requests are made from the VIRTEL terminal pool, the application program can test the CICS terminal id or the VTAM LU name to determine if it is running under VIRTEL, as shown in the following example: TERMINAL ID=W2HTP000, RELAY=VIRTVT00, POOL=*W2HPOOL, DESC='Relay pool for HTTP', RELAY2=VIRTPR00, TYPE=3, COMPRESS=2, INOUT=3, STATS=12, REPEAT=0080 Defining the VIRTEL terminal pool VIRTVT?? APPL AUTH=(ACQ,PASS),MODETAB=ISTINCLM,DLOGMOD=SNX32702,EAS=1 VTAM definition for the VIRTEL terminal pool In Working-Storage: 01 THIS-IS-VIRTEL-CALL-SW PIC X. 88 THIS-IS-VIRTEL-CALL VALUE 'Y'. 88 THIS-IS-NOT-VIRTEL-CALL VALUE 'N'. In the Procedure Division: 252 Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 IF EIBTRMID (1 : 2) = 'VT' MOVE 'Y' TO THIS-IS-VIRTEL-CALL-SW ELSE MOVE 'N' TO THIS-IS-VIRTEL-CALL-SW END-IF Detecting VIRTEL by testing the CICS terminal id In Working-Storage: 01 MYLUNAME 01 THIS-IS-VIRTEL-CALL-SW 88 THIS-IS-VIRTEL-CALL 88 THIS-IS-NOT-VIRTEL-CALL PIC X(8). PIC X. VALUE 'Y'. VALUE 'N'. In the Procedure Division: EXEC CICS ASSIGN NETNAME(MYLUNAME) END-EXEC IF MYLUNAME (1 : 4) = 'VIRT' MOVE 'Y' TO THIS-IS-VIRTEL-CALL-SW ELSE MOVE 'N' TO THIS-IS-VIRTEL-CALL-SW END-IF Detecting VIRTEL by testing the VTAM LU name 3.1.8 FA88: Transmit large data message to application By using the FA88 structured field, an application can request data from an HTTP terminal without being limited to the size of a 3270 screen. The application sends an FA88 structured field containing the name of a URL parameter to be retrieved. The “send message to terminal” flag causes VIRTEL to send an HTTP response to the terminal. When the terminal sends its next URL, VIRTEL sends to the application an FA88 structured field response containing the value of the URL parameter. The application may retrieve the value in multiple segments. If the value exceeds 32K in size then it must be retrieved in multiple segments. Once the first segment has been received, the application requests subsequent segments by sending another FA88 structured field containing the “immediate answer” flag and the offset of the segment requested. VIRTEL responds with an FA88 structured field response containing the segment requested. In each response VIRTEL sets the flag byte to indicate whether there is more data to be retrieved, and if so the number of bytes remaining. The application continues the procedure until there is no more data to be retrieved. The format of the FA88 structured field sent by the application is shown below: - 2 2 1 1 - 2 4 2 n bytes Length of structured field = 14 + n bytes Structured field identification code = X'FA88' bytes X'00' bytes Flags: X'01' = immediate answer X'04' = send message to terminal bytes Maximum segment size requested (m) bytes Offset of requested segment (o) bytes Length of name (n) bytes Name of URL parameter 3.1. Structred Fields 253 Virtel User Guide, Release 4.57 Format of structured field FA88 The format of the FA88 structured field response returned by VIRTEL is shown below: - 2 2 1 1 bytes bytes bytes bytes - 2 4 2 n x bytes bytes bytes bytes bytes Length of structured field = 14 + n + x Structured field identification code = X'FA88' X'00' Flags: X'02' = there is more data Length of segment returned (x) Number of bytes remaining (r) Length of name (n) Name of variable Requested data segment Format of structured field response FA88 3.1.9 FAC8: Selection of page template VIRTEL recognizes the FAC8 structured field for the following operations: - Change of directory for HTML page templates - Change of HTML page template To perform more than one function at a time, multiple FAC8 structured fields can be sent in the same message. Structured field FAC8 code 06 Structured field FAC8 code 06 allows the application to specify the name of the VIRTEL directory to be used to retrieve the page template for the current 3270 screen and all subsequent screens. The format of a structured field FAC8 code 06 is: - 2 2 1 8 bytes bytes bytes bytes Length of structured field = X'000D' Structured field identification code = X'FAC8' Code = X'06' (change VIRTEL directory) Directory name Format of structured field FAC8 code 06 Structured field FAC8 code 07 Structured field FAC8 code 07 allows the application to specify the name of the page template for the current 3270 screen and all subsequent screens. The format of a structured field FAC8 code 07 is: - 2 2 1 n bytes bytes bytes bytes Length of structured field = variable (n+5) Structured field identification code = X'FAC8' Code = X'07' (change HTML page template) Page template name Format of structured field FAC8 code 07 254 Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 COBOL example using FAC8 in Working-Storage: *////////////////////////////////////////////////////////////////* *///* - FAC8 request to VIRTEL (HTML page management) *///* *///* - send structured field: *///* *///* F3 LLLL FAC8 F PAGE or DIRECTORY *///* *///* LLLL: Length of structured field (2 BYTES) *///* *///* FAC8: Structured field id code (2 BYTES) *///* *///* F : Requested function (1 BYTE BINARY) *///* *///* 06: change VIRTEL directory *///* *///* 07: change HTML page template *///* *///* PAGE or DIRECTORY: name (8 bytes) *///* *////////////////////////////////////////////////////////////////* 01 FAC8-DEM. 05 05 05 05 FAC8-LONG PIC S9(4) COMP VALUE +5. FAC8-FILL1 PIC X(02) VALUE X'FAC8'. FAC8-FONCTION PIC X(01) VALUE ' '. FAC8-ARGUMENT PIC X(08) VALUE SPACES. 01 FAC8-DEM-REPERTOIRE PIC X(01) VALUE X'06'. 01 FAC8-DEM-PAGE-HTML PIC X(01) VALUE X'07'. in the Procedure Division: MOVE LENGTH OF FAC8-DEM TO FAC8-LONG. MOVE FAC8-DEM-PAGE-HTML TO FAC8-FONCTION. MOVE 'TOUTNOIR' TO FAC8-ARGUMENT. PERFORM 8150-ENVOI-FAC8 THRU 8150-FIN PERFORM 8830-ENVOI-MAP THRU 8830-FIN. *////////////////////// SEND STRUCTURED FIELD ///////////////////* 8150-ENVOI-FAC8. EXEC CICS SEND FROM (FAC8-DEM) FROMLENGTH (FAC8-LONG) STRFIELD END-EXEC. 8150-FIN. */////////////////////// SEND MESSAGE 3270 ///////////////////////* 8830-ENVOI-MAP. EXEC CICS SEND MAP ('NOMMAP2') MAPSET ('NONMAP2') ERASE CURSOR (CICS-TS-POS-CURS) END-EXEC. 8830-FIN. Example of sending structured field FAC8 An example of this function is supplied in member FAC8SAMP of the VIRTEL SAMPLIB. 3.1. Structred Fields 255 Virtel User Guide, Release 4.57 3.1.10 FAE5, FAE6: Sending a table variable Structured field FAE5 allows the application to send a named data table (“table variable”) to VIRTEL. The data in the table variable is made available for insertion in the current HTML page by means of VIRTEL tags coded in the page template (see “Handling table variables”), or by means of a scenario instruction (see “FIELD$ DEFINE-CHOICE”, page 174) which allows the application to supply lists of drop-down values for selection fields. Structured field FAE5 The application can send one or more FAE5 structured fields. Each structured field contains the name of a variable followed by a table of values. The format of structured field FAE5 is shown below: - 2 bytes 2 bytes 1 bytes 1 bytes n bytes p bytes p bytes etc Length of structured field = variable Structured field identification code = X'FAE5' Length of each value (p) Length of name (n) Name of variable Value 1 Value 2 Format of structured field FAE5 – format 1 The above format limits the length of each value to a maximum of 255 bytes. A second format of the FAE5 structured field allows the application to set a single value whose length is equal to the remainder of the structured field: - 2 2 1 1 n x bytes bytes bytes bytes bytes bytes Length of structured field = variable Structured field identification code = X'FAE5' X'00' Length of name (n) Name of variable Value (x=structured field length – 6 – n) Format of structured field FAE5 – format 2 After the application has sent a message containing an FAE5 structured field, VIRTEL considers the current screen complete and sends the response to the user. Structured field FAE6 Structured field FAE6 is identical to FAE5, except that VIRTEL does not consider the current screen to be complete, and waits for a further output message from the application before sending the response to the user. COBOL example using FAE5 in Working-Storage: 01 FAE5-LONG 01 FAE5-AREA. 05 FAE5-VARIABLE-1. 10 FAE5-SFLENGTH-1 256 PIC S9(4) COMP VALUE +0. PIC S9(4) COMP VALUE +0. Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 10 FILLER 10 FAE5-LONG-POSTE-1 10 FAE5-LONG-NOM-1 10 FAE5-NOM-1 10 FAE5-POSTE-1-1 10 FAE5-POSTE-1-2 10 FAE5-POSTE-1-3 05 FAE5-VARIABLE-2. 10 FAE5-SFLENGTH-2 10 FILLER 10 FAE5-LONG-POSTE-2 10 FAE5-LONG-NOM-2 10 FAE5-NOM-2 10 FAE5-POSTE-2-1 10 FAE5-POSTE-2-2 10 FAE5-POSTE-2-3 PIC PIC PIC PIC PIC PIC PIC X(2) X X X(8) X(10) X(10) X(10) VALUE VALUE VALUE VALUE VALUE VALUE VALUE X'FAE5'. X'0A'. X'08'. 'VARNAME1'. 'VALUE1'. 'VALUE2'. 'VALUE3'. PIC PIC PIC PIC PIC PIC PIC PIC S9(4) X(2) X X X(8) 9(6) 9(6) 9(6) COMP VALUE +0. VALUE X'FAE5'. VALUE X'04'. VALUE X'08'. VALUE 'VARNAME2'. VALUE 123. VALUE 234. VALUE 457. in the Procedure Division: MOVE MOVE MOVE EXEC LENGTH OF FAE5-VARIABLE-1 TO FAE5-SFLENGTH-1 LENGTH OF FAE5-VARIABLE-2 TO FAE5-SFLENGTH-2 LENGTH OF FAE5-AREA TO FAE5-LONG CICS SEND FROM(FAE5-AREA) LENGTH(FAE5-LONG) STRFIELD END-EXEC Example of sending structured field FAE5 3.1.11 Call Interface Application programs running in a CICS or IMS environment using Language Environment (LE) can request certain VIRTEL Web Integration functions by means of callable modules. These modules construct the necessary structured fields and send them to VIRTEL via CICS or IMS, thus simplifying the job of the application programmer. These modules are primarily designed to be called by CICS or IMS-COBOL programs, however they can also be used by application programs written in other languages. The modules, CALL VIRSETA, CALL VIRSETV (for CICS), CALL VIRSETAI, CALL VIRSETVI (for IMS) and CALL VIRTEL, are described in the following sections. CALL VIRSETA This module allows a CICS application program to copy an array of values into a VIRTEL table variable. The calling program supplies the name of the variable and an array containing the values. The VIRSETA module builds one or more FAE6 structured fields containing the variable name and the values, and sends the structured field(s) to VIRTEL using the EXEC CICS SEND STRFIELD command. The total size of the structured fields sent by a single call to VIRSETA cannot exceed 32K, but additional data can be added to the VIRTEL table variable by calling VIRSETA again with the same variable name. When VIRSETA is used to copy values into a VIRTEL table variable, all of the values must have the same length. To create a VIRTEL table variable containing values of varying lengths, use CALL VIRSETV described in the next section. 3.1. Structred Fields 257 Virtel User Guide, Release 4.57 CALL VIRSETA parameters Parameters passed by calling program: 1. DFHEIBLK 2. DFHCOMMAREA 3. Variable name (variable length EBCDIC string of 1-255 characters terminated by blank or X‘00’) 4. An array of elements each containing one data item 5. Element size (signed halfword) contains the length of each element of the array 6. Count (signed halfword) contains the number of elements in the array 7. Data length (signed halfword) contains the length of the data item contained in each element of the array. This may be less than or equal to the element size. CALL VIRSETA example in Working-Storage: 01 WS-ARRAY. 05 WS-ELEMENT OCCURS 50 TIMES. 10 WS-DATA-ITEM PIC X(80). 10 FILLER PIC X(20). 77 WS-ELEMENT-SIZE PIC S9(4) COMP SYNC. 77 WS-COUNT PIC S9(4) COMP SYNC. 77 WS-DATA-LENGTH PIC S9(4) COMP SYNC. in the Procedure Division: MOVE LENGTH OF WS-ELEMENT (1) TO WS-ELEMENT-SIZE. MOVE 50 TO WS-COUNT. MOVE LENGTH OF WS-DATA-ITEM (1) TO WS-DATA-LENGTH. CALL 'VIRSETA' USING DFHEIBLK DFHCOMMAREA BY CONTENT 'MYVAR ' BY REFERENCE WS-ARRAY WS-ELEMENT-SIZE WS-COUNT WS-DATA-LENGTH. Example of VIRTEL Web Integration application using CALL VIRSETA CALL VIRSETA return codes If the call was successful, VIRSETA returns to the calling program. Otherwise, VIRSETA terminates with an EXEC CICS ABEND. The following abend codes may be issued by VIRSETA: VSA1 Length of variable name is outside the range 1-255, or the required terminator (blank or X‘00’) is missing VSA2 Data length is less than 1, or exceeds the element length. VSA3 Count is less than 1. VSA4 Data exceeds the maximum allowed size. If the length of each data item is 255 or less, then the total size of the data (count x data length) must not exceed 32760 – N, where N is the number of characters in the variable name. If the length of each data item is 256 or more, then count x (data length + 6 + N) must not exceed 32767. 258 Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 Additionally CICS may issue an abend if the EXEC CICS SEND STRFIELD command is unsuccessful. CALL VIRSETV (CICS) This module allows a CICS application program to set the value of a VIRTEL variable. The calling program supplies the name of the variable and the value to be set. The VIRSETV module builds an FAE6 structured field containing the variable name and value, and sends the structured field to VIRTEL using the EXEC CICS SEND STRFIELD command. VIRTEL variables containing more than one value are known as table variables. The application program can create a table variable by calling the VIRSETV module several times with the same variable name. The first call creates the variable and adds the first value to it. Subsequent calls add additional values to the table variable. CALL VIRSETV parameters Parameters passed by calling program: 1. DFHEIBLK 2. DFHCOMMAREA 3. Variable name (variable length EBCDIC string of 1-255 characters terminated by blank or X‘00’) 4. Value (variable length) 5. Length (signed halfword field containing length of value) CALL VIRSETV example in Working-Storage: 77 WS-BUFFER PIC X(80) VALUE '** MY VALUE **'. 77 WS-LENGTH PIC S9(4) COMP SYNC. in the Procedure Division: MOVE LENGTH OF WS-BUFFER TO WS-LENGTH. CALL 'VIRSETV' USING DFHEIBLK DFHCOMMAREA BY CONTENT 'MYVAR ' BY REFERENCE WS-BUFFER WS-LENGTH. Example of VIRTEL Web Integration application using CALL VIRSETV CALL VIRSETV return codes If the call was successful, VIRSETV returns to the calling program. Otherwise, VIRSETV terminates with an EXEC CICS ABEND. The following abend codes may be issued by VIRSETV: VSV1 Length of variable name is outside the range 1-255, or the required terminator (blank or X‘00’) is missing VSV2 Length of value is negative or exceeds the maximum allowed length (32760 minus the length of the variable name). Additionally CICS may issue an abend if the EXEC CICS SEND STRFIELD command is unsuccessful. 3.1. Structred Fields 259 Virtel User Guide, Release 4.57 CALL VIRSETAI (IMS) This module allows an IMS application program to copy an array of values into a VIRTEL table variable. The calling program supplies the name of the variable and an array containing the values. The VIRSETAI module builds one or more FAE6 structured fields containing the variable name and the values, and sends the structured field(s) to VIRTEL using the CALL ‘CBLTDLI’ USING ISRT, LS-IOPCB, OUTPUT-MESSAGE, MFS command. The total size of the structured fields sent by a single call to VIRSETAI cannot exceed 32K, but additional data can be added to the VIRTEL table variable by calling VIRSETAI again with the same variable name. When VIRSETAI is used to copy values into a VIRTEL table variable, all of the values must have the same length. To create a VIRTEL table variable containing values of varying lengths, use CALL VIRSETVI described in the next section. CALL VIRSETAI parameters Parameters passed by calling program: 1. Variable name (variable length EBCDIC string of 1-255 characters terminated by blank or X‘00’) 2. An array of elements each containing one data item 3. Element size (signed halfword) contains the length of each element of the array 4. Count (signed halfword) contains the number of elements in the array 5. Data length (signed halfword) contains the length of the data item contained in each element of the array. This may be less than or equal to the element size. 6. IMS I/O PCB CALL VIRSETAI example in Working-Storage: 01 05 77 77 77 77 77 WS-TABLE. WS-ELEMENT PIC X(80) OCCURS 100 TIMES. WS-TESTDATA PIC X(10) VALUE 'TEST DATA'. WS-ELEMSIZE PIC S9(4) COMP SYNC. WS-COUNT PIC S9(4) COMP SYNC. WS-DATALEN PIC S9(4) COMP SYNC. WS-RC1 PIC X. in Procedure Division: MOVE WS-TESTDATA TO WS-ELEMENT (1). MOVE WS-TESTDATA TO WS-ELEMENT (2). MOVE WS-TESTDATA TO WS-ELEMENT (3). MOVE LENGTH OF WS-ELEMENT (1) TO WS-ELEMSIZE. MOVE 3 TO WS-COUNT. MOVE LENGTH OF WS-TESTDATA TO WS-DATALEN. CALL 'VIRSETAI' USING CONTENT 'MYVAR ' REFERENCE WS-TABLE WS-ELEMSIZE WS-COUNT WS-DATALEN LS-IOPCB 260 Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 RETURNING WS-RC1. IF WS-RC1 NOT EQUAL 0 GO TO ERROR. Example of VIRTEL Web Integration application using CALL VIRSETAI CALL VIRSETVI (IMS) This module allows an IMS application program to set the value of a VIRTEL variable. The calling program supplies the name of the variable and the value to be set. The VIRSETVI module builds an FAE6 structured field containing the variable name and value, and sends the structured field to VIRTEL using the CALL ‘CBLTDLI’ USING ISRT, LS-IOPCB, OUTPUT-MESSAGE, MFS command. VIRTEL variables containing more than one value are known as table variables. The application program can create a table variable by calling the VIRSETVI module several times with the same variable name. The first call creates the variable and adds the first value to it. Subsequent calls add additional values to the table variable. CALL VIRSETVI parameters Parameters passed by calling program: 1. Variable name (variable length EBCDIC string of 1-255 characters terminated by blank or X‘00’) 2. Value (variable length) 3. Length (signed halfword field containing length of value) 4. IMS I/O PCB CALL VIRSETVI example in Working-Storage: 77 WS-BUFFER PIC X(80) VALUE '** MY VALUE **'. 77 WS-LENGTH PIC S9(4) COMP SYNC. 77 WS-RC1 PIC X. in Procedure Division: MOVE LENGTH OF WS-BUFFER TO WS-LENGTH. CALL 'VIRSETVI' USING CONTENT 'MYVAR ' REFERENCE WS-BUFFER WS-LENGTH LS-IOPCB RETURNING WS-RC1. IF WS-RC1 NOT EQUAL 0 GO TO ERROR. Example of VIRTEL Web Integration application using CALL VIRSETVI CALL VIRTEL (CICS) Application programs running in a CICS environment with LE can also call a module named VIRTEL (see source delivered in the VIRTEL SAMPLIB library at installation time) which builds and sends the structured fields necessary to invoke the following functions: - specify page template and directory (structured field FAC8) - send data for table variables (structured field FAE6) 3.1. Structred Fields 261 Virtel User Guide, Release 4.57 CALL VIRTEL example The following COBOL example shows how to use CALL VIRTEL to send two table variables (CHP_NUM1 and CPT_NUM1) and to request the use of a specific page template (page WEB2VIRT in directory DEMO): in Working-Storage: * CALL 'VIRTEL' takes one parameter with maximum size 2048 bytes 01 PARAMETRES-VIRTEL-FAC8. 02 VIRTEL-FONCTION-FAC8 PIC X(10) VALUE 'SENDPAGW'. 02 VIRTEL-CODE-RETOUR-FAC8 PIC 9(02) VALUE 0. 02 VIRTEL-PAGE-HTML PIC X(10) VALUE 'WEB2VIRT'. 02 VIRTEL-REPERTOIRE PIC X(10) VALUE 'DEMO '. 02 VIRTEL-FILLER-FAC8 PIC X(2016). 01 PARAMETRES-VIRTEL-FAE6. 02 VIRTEL-FONCTION-FAE6 PIC X(10) VALUE 'SENDTABW'. 02 VIRTEL-CODE-RETOUR-FAE6 PIC 9(02) VALUE 0. 02 VIRTEL-LONG-NOM PIC 9(02). 02 VIRTEL-LONG-POSTE PIC 9(02). 02 VIRTEL-NBR-POSTE PIC 9(03). 02 VIRTEL-FAE6-DATA. 05 VIRTEL-NOM PIC X(08). 05 VIRTEL-POSTE-01 PIC X(10). 05 VIRTEL-POSTE-02 PIC X(10). 05 VIRTEL-POSTE-03 PIC X(10). 05 VIRTEL-POSTE-04 PIC X(10). 05 VIRTEL-POSTE-05 PIC X(10). 05 VIRTEL-POSTE-06 PIC X(10). 05 VIRTEL-POSTE-07 PIC X(10). 05 VIRTEL-POSTE-08 PIC X(10). 05 VIRTEL-POSTE-09 PIC X(10). 05 VIRTEL-FILLER-FAE6 PIC X(1937). 02 VIRTEL-FAE6-DATA1 REDEFINES VIRTEL-FAE6-DATA. 05 VIRTEL-NOM1 PIC X(08). 05 VIRTEL-POSTE1-01 PIC X(10). 05 VIRTEL-POSTE1-02 PIC X(10). 05 VIRTEL-POSTE1-03 PIC X(10). 05 VIRTEL-POSTE1-04 PIC X(10). 05 VIRTEL-POSTE1-05 PIC X(10). 05 VIRTEL-POSTE1-06 PIC X(10). 05 VIRTEL-POSTE1-07 PIC X(10). 05 VIRTEL-POSTE1-08 PIC X(10). 05 VIRTEL-POSTE1-09 PIC X(10). 05 VIRTEL-FILLER1-FAE6 PIC X(913). in the Procedure Division: MOVE MOVE MOVE MOVE MOVE CALL MOVE MOVE MOVE MOVE 262 'SENDPAGW' TO VIRTEL-FONCTION-FAC8 0 TO VIRTEL-CODE-RETOUR-FAC8 'WEB2VIRT' TO VIRTEL-PAGE-HTML 'DEMO ' TO VIRTEL-REPERTOIRE SPACES TO VIRTEL-FILLER-FAC8 'VIRTEL' USING DFHEIBLK PARAMETRES-VIRTEL-FAC8 'SENDTABW' TO VIRTEL-FONCTION-FAE6 0 TO VIRTEL-CODE-RETOUR-FAE6 08 TO VIRTEL-LONG-POSTE. 9 TO VIRTEL-NBR-POSTE. Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE CALL 08 TO VIRTEL-LONG-NOM. 'CHP_NUM1' TO VIRTEL-NOM. 'VAL-001' TO VIRTEL-POSTE-01 'VAL-002' TO VIRTEL-POSTE-02. 'VAL-003' TO VIRTEL-POSTE-03. 'VAL-004' TO VIRTEL-POSTE-04. 'VAL-005' TO VIRTEL-POSTE-05. 'VAL-006' TO VIRTEL-POSTE-06. 'VAL-007' TO VIRTEL-POSTE-07. 'VAL-008' TO VIRTEL-POSTE-08. 'VAL-009' TO VIRTEL-POSTE-09. SPACES TO VIRTEL-FILLER-FAE6 'VIRTEL' USING DFHEIBLK PARAMETRES-VIRTEL-FAE6 MOVE VIRTEL-CODE-RETOUR-FAE6 TO TD-MSG-RETCODE MOVE 'SENDTABW' TO VIRTEL-FONCTION-FAE6 MOVE 0 TO VIRTEL-CODE-RETOUR-FAE6 MOVE 08 TO VIRTEL-LONG-POSTE. MOVE 9 TO VIRTEL-NBR-POSTE. MOVE 08 TO VIRTEL-LONG-NOM. MOVE 'CPT_NUM1' TO VIRTEL-NOM1. MOVE 'CPT-0001' TO VIRTEL-POSTE1-01. MOVE 'CPT-0002' TO VIRTEL-POSTE1-02. MOVE 'CPT-0003' TO VIRTEL-POSTE1-03. MOVE 'CPT-0004' TO VIRTEL-POSTE1-04. MOVE 'CPT-0005' TO VIRTEL-POSTE1-05. MOVE 'CPT-0006' TO VIRTEL-POSTE1-06. MOVE 'CPT-0007' TO VIRTEL-POSTE1-07. MOVE 'CPT-0008' TO VIRTEL-POSTE1-08. MOVE 'CPT-0009' TO VIRTEL-POSTE1-09. MOVE SPACES TO VIRTEL-FILLER1-FAE6 CALL 'VIRTEL' USING DFHEIBLK PARAMETRES-VIRTEL-FAE6 MOVE VIRTEL-CODE-RETOUR-FAE6 TO TD-MSG-RETCODE Example of VIRTEL Web Integration application using CALL VIRTEL CALL VIRTEL return codes Return codes for the SENDPAGW function The VIRTEL-CODE-RETOUR field should be initialized to 0. The following values may be returned: 0 OK, VIRTEL request accepted (does not guarantee that page has been displayed in browser) 1 Invalid function 2 HTML page name invalid (blank or low-value) 3 Directory name invalid (blank or low-value) Return codes for the SENDTABW function The VIRTEL-CODE-RETOUR field should be initialized to 0. The following values may be returned: 0 OK, VIRTEL request accepted (does not guarantee that page has been displayed in browser) 1 Invalid function 3.1. Structred Fields 263 Virtel User Guide, Release 4.57 11 Length of NAME non-numeric 12 Length of VALUE non-numeric 13 Number of values is non-numeric 264 Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 3.1.12 HOST4WEB commands When an application is invoked from a browser via an entry point defined with emulation type HOST4WEB, the application can use a set of VIRTEL control commands known as “HOST4WEB” commands, which are coded in the 3270 screen.2 Processing conditions HOST4WEB commands are recognized by VIRTEL when the entry point definition specifies emulation type HTML, HOST4WEB, or H4W, and any of the following conditions is true: • the VIRTEL transaction definition contains value 1 in the “H4W Commands” field • the VIRTEL transaction definition contains value 2 in the “H4W Commands” field and the message has a ‘2VIRTEL’ prefix (see below) • the VIRTEL transaction definition contains value 4 in the “H4W Commands” field and the entry point definition specifies emulation type HOST4WEB or H4W • the VIRTEL transaction definition contains value 4 in the “H4W Commands” field and the entry point definition specifies emulation type HTML and the message has a ‘2VIRTEL’ prefix (see below) • the previous screen contained the HOST4WEB command C SCAN NEXT SCREEN • the application previously sent an FAD5 code 01 structured field All HOST4WEB commands must begin immediately after a 3270 attrbute byte, in other words each command must appear at the start of a 3270 field. The non-display attribute may be used, if desired, to prevent the command appearing on the screen. To define a non-display field in BMS, specify ATTRB=(ASKIP,DRK). To define a non-display field in ISPF, use an attribute character defined as INTENS(NON) in the )ATTR section of the panel. ISPF applications must use the ISPEXEC CONTROL DISPLAY REFRESH command before the ISPEXEC DISPLAY PANEL command to ensure that HOST4WEB commands are transmitted to VIRTEL in their entirety. 2VIRTEL prefix An application can send a 3270 message with a special prefix to indicate to VIRTEL that the screen contains HOST4WEB commands. The prefix consists of a 3270 field starting with the characters ‘2VIRTEL’. This field must be the first field transmitted in the message. The field can be defined with the “non-display” attribute, if desired, to prevent the prefix appearing on the screen. List of commands C AUTO VARIABLES (Command Auto Variables) C AUTO VARIABLES Requests VIRTEL to automatically free all variables whenever a user response is sent to the application. This command cancels the effect of the KEEP VARIABLES command. Note: Structured field FAD5 code 08 produces the same effect as this command. 3.1. Structred Fields 265 Virtel User Guide, Release 4.57 C KEEP VARIABLES (Command Keep Variables) :: C KEEP VARIABLES Requests VIRTEL to keep all variables created by the application. Normally VIRTEL will free all variables whenever a user response is sent to the application. This command allows the variables to be kept for use by a subsequent output screen. The variables may be freed by a subsequent KILL VARIABLES command, otherwise they will be automatically freed at the end of the transaction. Note: Structured field FAD5 code 02 produces the same effect as this command. C KILL VARIABLES (Command Kill Variables) C KILL VARIABLES Requests VIRTEL to free all variables. Note: Structured field FAD5 code 04 produces the same effect as this command. C RETURN (Command Return) C RETURN Requests VIRTEL to immediately return a response to the application with a simulated “Enter”. The screen containing this command is never displayed to the user. C SCAN NEXT SCREEN (Command Scan) C SCAN NEXT SCREEN Indicates that the following screen will contain HOST4WEB commands, which will be processed by VIRTEL without the need for a ‘2VIRTEL’ prefix. Note: Structured field FAD5 code 01 produces the same effect as this command. C WAIT NEXT SCREEN (Command Wait) C WAIT NEXT SCREEN Indicates that the current screen should not be sent to the user yet. C TERMSESS (Command Terminate Session) C TERMSESS 266 Chapter 3. Programming Interfaces Virtel User Guide, Release 4.57 Allows a service transaction to request termination of the host application session after the current message has been sent. G EMULATION TYPE (Get Emulation Type) G EMULATION TYPE When VIRTEL returns the next input to the application, the contents of this field are replaced by the emulation type defined in the entry point. G PAGE NAME (Get Current Template Name) G PAGE NAME When VIRTEL returns the next input to the application, the contents of this field are replaced by the name of the current page template. G URL PARAMETER (Get URL Parameter) G URL PARAMETER paramname When VIRTEL returns the next input to the application, the contents of this field are replaced by the value of the parameter paramname in the URL. S DIRECTORY (Set Temporary Directory Name) S DIRECTORY dirname Indicates the name of the directory from which VIRTEL is to retrieve the page template for the current 3270 screen (but not for subsequent screens). dirname is the name of a VIRTEL directory defined in the Directory Management sub-application (as described 23). This name must not contain any blanks. S GLOBAL PAGE (Set Global Template Name) S GLOBAL PAGE pagename Indicates the name of the page template to be used for the current 3270 screen and all subsequent screens. This name must not contain any blanks. S PAGE (Set Temporary Template Name) S PAGE pagename Indicates the name of the page template to be used for the current 3270 screen (but not for subsequent screens). This name must not contain any blanks. 3.1. Structred Fields 267 Virtel User Guide, Release 4.57 S VARIABLE (Set Variable) S VARIABLE varname+value+ Adds a new value to a table variable named varname. The variable is automatically created if necessary. The value is contained in the 3270 field immediately following the S VARIABLE varname command, and the value has the same length as the 3270 field which contains it. The “+” characters in the figure above represent the 3270 attribute bytes which act as field delimiters. 268 Chapter 3. Programming Interfaces CHAPTER FOUR INCOMING CALLS 4.1 Incoming E-mails 4.1.1 FAC8: Retrieve data from an e-mail An application started by an incoming e-mail (see “Incomming e-mails”) can retrieve data from the content of the e-mail. To request VIRTEL to extract the data from the e-mail, the application sends a structured field FAC8 code 12 or 13 to the associated relay (3270 pseudo-terminal). VIRTEL intercepts the structured field and sends a response to the application in the form of a QUERY REPLY (x‘88’) structured field. FAC8 - Structured field code 13 The format of a structured field FAC8 code 12 is: - 2 bytes Length of structured field = X'0007' - 2 bytes Structured field identification code = X'FAC8' - 1 bytes Code = X'12' (extraction of e-mail data) - 2 bytes Option indicating the category of data requested: 0004 Received: 0008 Message-ID: 000C Date: 0010 References: 0014 Content-Type: 0018 MIME-Version: 001C Subject: 0020 (message text) 003C MAIL FROM: (see note) 0040 RCPT TO: (see note) Format of structured field FAC8 code 12 Note: MAIL FROM and RCPT TO are respectively the name of the sender and recipient as specified in the SMTP envelope. The response consists of one or more structured fields, prefixed by an AID byte x‘88’ (QUERY REPLY). The format of the query reply structured field is: - 2 bytes Length of structured field = variable - 2 bytes Type of response data. Values are same as the ‘option’ field of the corresponding request. - 4 bytes (type 0020 only) number of lines of text 269 Virtel User Guide, Release 4.57 - 4 bytes (type 0020 only) flags (reserved) - n bytes Data (in EBCDIC) Format of the response to structured field FAC8 code 12 Note: • Response types other than 0020 do not contain the number of lines or flags. • Response types are returned in the same order as specified in the request. • All of the response types requested are present, even if they are zero length. • Lines of message text are delimited by X‘0D25’ (EBCDIC carriage-return / line-feed). FAC8 - Structured field code 13 Structured field FAC8 code 13 searches the e-mail for a specific character string, then returns the string together with the remainder of the line. The format of a structured field FAC8 code 13 is: - 2 bytes Length of structured field = 7 + length of string - 2 bytes Structured field identification code = X'FAC8' - 1 bytes Code = X'13' (scan e-mail data) - 2 bytes Option indicating the category of data to be searched: (see structured field FAC8 code 12) - n bytes Character string to search for Format of structured field FAC8 code 13 The response consists of one or more structured fields, prefixed by an AID byte x‘88’ (QUERY REPLY). The format of the query reply structured field is: - 2 bytes Length of structured field = variable - 2 bytes Type of response data. Values are same as the ‘option’ field of the corresponding request. - n bytes Data (in EBCDIC) Format of the response to structured field FAC8 code 13 Note: • The data returned includes the character string searched for, and all characters which follow, up to the end of the line. The characters X‘0D25’, indicating the end of line, are not included in the response. • Response types are returned in the same order as specified in the request. • All of the response types requested are present, even if they are zero length. • Structured fields FAC8 code 12 and code 13 can be combined in the same request / response. COBOL FAC8 example Example (in Cobol format) of receiving an e-mail: 270 Chapter 4. Incoming Calls Virtel User Guide, Release 4.57 in Working-Storage: * Request FAC812 to VIRTEL 01 FAC812-DEM-LENG PIC S9(4) COMP VALUE +0. 01 FAC812-DEM-EMAIL. 05 FILLER PIC S9(4) COMP VALUE +7. 05 FILLER PIC X(3) VALUE X'FAC812'. 05 FAC812-DEM-OPTION-SUBJ PIC X(2) VALUE X'001C'. 05 FILLER PIC S9(4) COMP VALUE +7. 05 FILLER PIC X(3) VALUE X'FAC812'. 05 FAC812-DEM-OPTION-TEXT PIC X(2) VALUE X'0020'. 05 FILLER PIC S9(4) COMP VALUE +17. 05 FILLER PIC X(3) VALUE X'FAC813'. 05 FAC813-DEM-OPTION-OREF PIC X(2) VALUE X'0020'. 05 FILLER PIC X(10) VALUE 'Order ref:'. * Response from Virtel following FAC812 01 FAC812-REP-LENG PIC S9(4) COMP VALUE +0. 01 FAC812-REP-AREA. 05 FAC812-REP-SUBJ-LENG PIC S9(4) COMP. 05 FAC812-REP-SUBJ-CODE PIC X(2). 05 FAC812-REP-SUBJ-DATA. 10 FAC812-REP-SUBJ-CHAR PIC X OCCURS 0 TO 256 TIMES DEPENDING ON SUBJ-LENG. 05 FAC812-REP-TEXT-LENG PIC S9(4) COMP. 05 FAC812-REP-TEXT-CODE PIC X(2). 05 FAC812-REP-TEXT-NLIG PIC S9(8) COMP. 05 FAC812-REP-TEXT-FLAG PIC X(4). 05 FAC812-REP-TEXT-DATA. 10 FAC812-REP-TEXT-CHAR PIC X OCCURS 0 TO 1000 TIMES DEPENDING ON TEXT-LENG. 05 FAC813-REP-OREF-LENG PIC S9(4) COMP. 05 FAC813-REP-OREF-CODE PIC X(2). 05 FAC813-REP-OREF-DATA. 10 FAC813-REP-OREF-CHAR PIC X OCCURS 0 TO 256 TIMES DEPENDING ON OREF-LENG. 01 SUBJ-LENG PIC S9(4) COMP VALUE +0. 01 SUBJ-MESSAGE. 05 FILLER PIC X(5) VALUE 'SUBJ:'. 05 SUBJ-DATA PIC X(50). 01 TEXT-LENG PIC S9(4) COMP VALUE +0. 01 TEXT-MESSAGE. 05 FILLER PIC X(5) VALUE 'TEXT:'. 05 TEXT-DATA PIC X(80). 01 OREF-LENG PIC S9(4) COMP VALUE +0. 01 OREF-MESSAGE. 05 FILLER PIC X(5) VALUE 'OREF:'. 05 OREF-DATA PIC X(50). 01 ERR-MESSAGE PIC X(40) VALUE 'RBC8 UNEXPECTED RESPONSE FROM VIRTEL'. in the Procedure Division: MOVE +256 TO SUBJ-LENG MOVE +1000 TO TEXT-LENG MOVE +256 TO OREF-LENG 4.1. Incoming E-mails 271 Virtel User Guide, Release 4.57 MOVE LENGTH OF FAC812-DEM-EMAIL TO FAC812-DEM-LENG MOVE LENGTH OF FAC812-REP-AREA TO FAC812-REP-LENG EXEC CICS CONVERSE FROM(FAC812-DEM-EMAIL) FROMLENGTH(FAC812-DEM-LENG) INTO(FAC812-REP-AREA) TOLENGTH(FAC812-REP-LENG) STRFIELD END-EXEC IF EIBAID EQUAL X'88' SUBTRACT 4 FROM FAC812-REP-SUBJ-LENG GIVING SUBJ-LENG MOVE FAC812-REP-SUBJ-DATA TO SUBJ-DATA EXEC CICS WRITEQ TD QUEUE('CSMT') FROM(SUBJ-MESSAGE) END-EXEC SUBTRACT 12 FROM FAC812-REP-TEXT-LENG GIVING TEXT-LENG MOVE FAC812-REP-TEXT-DATA TO TEXT-DATA EXEC CICS WRITEQ TD QUEUE('CSMT') FROM(TEXT-MESSAGE) END-EXEC SUBTRACT 4 FROM FAC813-REP-OREF-LENG GIVING OREF-LENG MOVE FAC813-REP-OREF-DATA TO OREF-DATA EXEC CICS WRITEQ TD QUEUE('CSMT') FROM(OREF-MESSAGE) END-EXEC ELSE EXEC CICS WRITEQ TD QUEUE('CSMT') FROM(ERR-MESSAGE) END-EXEC END-IF EXEC CICS ISSUE DISCONNECT END-EXEC. Example of sending structured field FAC8 code 12 and 13 4.1.2 FAD4: Sending an e-mail from a host application It is possible at any time to send an e-mail from a host application under VIRTEL control. This operation is performed by sending a WRITE STRUCTURED FIELD to the 3270 session which is intercepted by VIRTEL. The structured field data consists of a sequence of FAD4 structured fields as described below: - 2 2 n n bytes bytes bytes bytes Length of structured field = variable Structured field identification code = X'FAD4' Command code Value associated with command code Format of structured field FAD4 The possible command codes are: N (Name) e-mail address of recipient. F (From) e-mail address of sender. If this code is not supplied, the default sender address specified on the SMTP line will be used. X’CD’ (Code) Message identification. S (Subject) Message subject line. 272 Chapter 4. Incoming Calls Virtel User Guide, Release 4.57 T (Text) Message text. The sequence X‘0D25’ (EBCDIC carriage-return / line-feed) can be used to separate lines of text. C (Charset) Add a message header indicating the character set used; ISO-8859-15 for European character set with Euro currency sign. H (Header) Add one or more headers. The sequence X‘0D25’ (EBCDIC carriage-return / line-feed) indicates the end of each of the headers in this structured field. The entry point used to invoke the host application must contain a type-3 transaction whose external name is $MAIL$ and whose “Application” field contains the name of the SMTP line to be used for sending the outgoing e-mail. COBOL FAD4 example Example (in Cobol format) of sending an e-mail : in Working-Storage: 01 FAD4-LONG PIC S9(4) COMP VALUE +0. 01 FAD4-AREA. 05 FAD4-COMMANDE-N. 10 FAD4-SFLENGTH-N PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAD4'. 10 FILLER PIC X VALUE 'N'. 10 FAD4-DESTINATION PIC X(22) VALUE 'bowler@saint.cloud.com'. 05 FAD4-COMMANDE-F. 10 FAD4-SFLENGTH-F PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAD4'. 10 FILLER PIC X VALUE 'F'. 10 FAD4-SENDER PIC X(22) VALUE 'virtel@saint.cloud.com'. 05 FAD4-COMMANDE-CD. 10 FAD4-SFLENGTH-CD PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAD4'. 10 FILLER PIC X VALUE X'CD'. 10 FAD4-MESSAGE-ID PIC X(32) VALUE '20010321174652K07F44354K608EAF00'. 05 FAD4-COMMANDE-S. 10 FAD4-SFLENGTH-S PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAD4'. 10 FILLER PIC X VALUE 'S'. 10 FAD4-SUBJECT PIC X(17) VALUE 'email from virtel'. 05 FAD4-COMMANDE-T. 10 FAD4-SFLENGTH-T PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAD4'. 10 FILLER PIC X VALUE 'T'. 10 FAD4-TEXT-LINE-1 PIC X(14) VALUE 'Balance report'. 10 FILLER PIC X(2) VALUE X'0D25'. 10 FAD4-TEXT-LINE-2 PIC X(9) VALUE 'Total is '. 10 FAD4-CURRENCY PIC X VALUE X'9F'. 10 FAD4-AMOUNT PIC 9999 VALUE 2345. 10 FILLER PIC X(2) VALUE X'0D25'. 05 FAD4-COMMANDE-H. 10 FAD4-SFLENGTH-H PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAD4'. 4.1. Incoming E-mails 273 Virtel User Guide, Release 4.57 10 FILLER PIC X VALUE 'H'. 10 FAD4-HEADER-1 PIC X(33) VALUE 'X-Transaction-Server: CICS-TS 2.2'. 10 FILLER PIC X(2) VALUE X'0D25'. 10 FAD4-HEADER-2 PIC X(28) VALUE 'X-Operating-System: z/OS 1.4'. 10 FILLER PIC X(2) VALUE X'0D25'. 05 FAD4-COMMANDE-C. 10 FAD4-SFLENGTH-C PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAD4'. 10 FILLER PIC X VALUE 'C'. 10 FAD4-CHARSET PIC X(33) VALUE 'ISO-8859-15'. in the Procedure Division: MOVE MOVE MOVE MOVE MOVE MOVE MOVE MOVE EXEC LENGTH OF LENGTH OF LENGTH OF LENGTH OF LENGTH OF LENGTH OF LENGTH OF LENGTH OF CICS SEND FAD4-COMMANDE-N TO FAD4-SFLENGTH-N FAD4-COMMANDE-F TO FAD4-SFLENGTH-F FAD4-COMMANDE-CD TO FAD4-SFLENGTH-CD FAD4-COMMANDE-S TO FAD4-SFLENGTH-S FAD4-COMMANDE-T TO FAD4-SFLENGTH-T FAD4-COMMANDE-H TO FAD4-SFLENGTH-H FAD4-COMMANDE-C TO FAD4-SFLENGTH-C FAD4-AREA TO FAD4-LONG FROM(FAD4-AREA) LENGTH(FAD4-LONG) STRFIELD END-EXEC. Example of sending structured field FAD4 Example of the e-mail generated by the above program: Date: Fri, 30 Apr 2004 15:14:05 +0100 From: virtel@saint.cloud.com Organization: SYSPERTEC COMMUNICATION To: bowler@saint.cloud.com Message-id: <20010321174652K07F44354K608EAF00-bowler@saint.cloud.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Transaction-Server: CICS-TS 2.2 X-Operating-System: z/OS 1.4 Subject: email from virtel Balance report Total is €2345 Example of e-mail generated by structured field FAD4 274 Chapter 4. Incoming Calls CHAPTER FIVE SECURITY 5.1 VIRTEL Web Access Security VIRTEL examines the URL of every VIRTEL Web Access request which arrives from a browser. Since there is no permanent IP session between the browser and VIRTEL, there is less risk of a session being “hijacked”. In addition to standard network security features (firewall, network sign on, SSO, etc.), each URL sent to VIRTEL has a structure which allows VIRTEL to enforce authorization rules based on Entry Point, Rules, and Transactions, which are VIRTEL entities described in the “VIRTEL Connectivity Reference” manual. 5.1.1 Specifying security in the entry point VIRTEL supplies a signon program for HTTP lines called VIR0020H (refer to the “VIRTEL Connectivity Reference” manual for more details about how to specify a signon program in an entry point). When the first call is made to a secure transaction under an entry point which specifies VIR0020H as its signon program, VIRTEL requests the browser (via a 401 response) to display a dialog box inviting the user to enter a userid and password. VIRTEL passes the userid and password to the security manager (RACF, etc.) for validation. VIRTEL can also propagate the userid and password to other applications (for example, CICS) by means of connection / disconnection scripts defined in the transaction (see the “VIRTEL Connectivity Reference” manual for details). Depending on the userid, the security manager may authorize or deny access to the requested transaction. 275 Virtel User Guide, Release 4.57 Example of signon dialog box displayed by browser 5.1.2 Specifying security in the transaction To display the signon dialog box shown above, the transaction under the entry point must specify SECURITY 1 (standard). Refer to the “Transactions” section of the “VIRTEL Connectivity Reference” manual for details of the security field in the VIRTEL transaction definition. Security can be specified either on the application transaction (transaction type 1, 2, 3), or on the directory transaction (transaction type 4). In the above example, “SECURE” is the directory transaction, and “Cics” is the application transaction. Specifying security at the directory level can be useful in that it forces the user to sign on even when displaying a static page which has no associated application transaction. 5.1.3 Mixed-case password support If SECUR=RACROUTE or SECUR=(RACROUTE,RACF) is specified in the VIRTCT, and if the security manager reports that it supports lower-case characters in passwords, then VIRTEL will pass all passwords to the security manager in mixed case as entered by the user. Otherwise VIRTEL will translate all passwords to upper case before passing them to the security manager. Message VIR0861I at integration indicates that VIRTEL will use mixed-case passwords. 5.1.4 Automatic retrieval of username NTLM security allows VIRTEL to retrieve the username under which the user has already signed on to Windows. This allows VIRTEL Web Access to sign on the user without requiring him or her to enter a username and password. 276 Chapter 5. Security Virtel User Guide, Release 4.57 When SECURITY 2 (NTLM) is specified in the VIRTEL transaction definition (either the application transaction or the directory transaction) VIRTEL requests the browser to supply the Windows username. Note: When the user is identified by NTLM, VIRTEL does not have access to the user’s password, and therefore VIRTEL cannot verify the validity of the username, and cannot propagate the signon to other applications such as CICS. Before NTML can be used with the Firefox browser, the server name must be configured into the browser. Type about:config in the address bar, and enter the VIRTEL Web Access server address (for example, 192.168.235.61:41000) as the value of the network.automatic-ntlm-auth.trusted-uris parameter. 5.1.5 Data encryption by AT-TLS/SSL The AT-TLS feature (“Application Transparent Transport Layer Security”), available with z/OS Communication Server V1R7 and later releases, allows direct access to the VIRTEL Web Access server in SSL mode (HTTPS), without using an intermediate server. The SSLSETUP job in the VIRTEL SAMPLIB contains an example of the definitions required to place VIRTEL Web Access sessions under AT-TLS control. For VSE sites, or earlier versions of MVS where AT-TLS is not available, access to VIRTEL in HTTPS mode can be achieved by means of an intermediate server (such as Apache) operating in Reverse-Proxy mode. The function of the reverse proxy is to transform the dataflow into HTTP mode before sending it on to VIRTEL. Warning: Higher CPU usgage will result in the TCP/IP address space if this feature is used without the services of a hardware Crypto Card. 5.1.6 Identification by certificate The definition of a transaction with SECURITY 3 (TLS) allows VIRTEL to recognize a VIRTEL Web Access user by means of a digital certificate installed in the user’s web browser. VIRTEL will use the RACF userid associated with the certificate to determine the user’s authority to execute the transaction. VIRTEL is able to obtain the client’s userid, without requiring the user to sign on, when all of the following conditions are true: - The user enters VIRTEL via a secure https session using the AT-TLS function of z/OS V1R7 or later - The TTLSConnectionAction or TTLSEnvironmentAction statement in the policy agent configuration file contains the parameter HandshakeRole ServerWithClientAuth - The client’s browser presents a valid certificate during SSL handshake - The z/OS Security Server (RACF) recognizes the certificate as belonging to the user (Refer to “Chapter 21 RACF and Digital Certificates” in “SA22-7683-05 z/OS Security Server RACF Security Administrator’s Guide” for more information on associating user IDs with certificates) The sample job SSLUCERT in the VIRTEL SAMPLIB illustrates how to generate a user client certificate using RACF. The certificate is registered in the RACF database and is exported to a PKCS12 (.P12) file which contains both the user certificate and the user’s private key encrypted under a passphrase. The .P12 file must be downloaded in binary to the user’s workstation and installed in the user’s browser. Note: When a user is identified by certificate, VIRTEL does not have access to the user’s password, and therefore cannot propagate the signon to other applications such as CICS. 5.1. VIRTEL Web Access Security 277 Virtel User Guide, Release 4.57 5.1.7 Password encryption VIRTEL Web Access offers the possibility of encrypting passwords (3270 non-display fields) transmitted in HTML pages. VIRTEL uses the encryption facilities provided by the System z hardware through the z/OS Integrated Cryptographic Service Facility (ICSF). Password encryption is available only when using VIRTEL Web Access in Ajax mode using the WEB2AJAX.htm page template (see “Presentation modes”). To activate the password encryption option for WEB2AJAX.htm you must specify a CRYPTn parameter in the VIRTCT (see “Parameters of the VIRTCT” in the VIRTEL Installation Guide). The CRYPTn parameter must specify CRYPT3270 as the name and ICSF as the encryption engine, as in example shown below: CRYPT1=(CRYPT3270,3TDEA,RSA-1024,ICSF,HEX), * CRYPTn parameter for password encryption using WEB2AJAX.htm 5.1.8 Signon using HTML fields The definition of a transaction with SECURITY 4 (HTML) allows VIRTEL to obtain the userid and password from fields embedded in the HTML page. When a security type 4 transaction is requested, and the user is not already signed on, VIRTEL will send the requested page to the browser without connecting to the application. The page template must use the CREATE-VARIABLE-IF tag (described 62) to determine whether signon is required, and the DECLAREFIELD-AS tag (described 62) to declare the username and password fields. Following an unsuccessful signon attempt, the special variable $ERRMSG$ contains one or more error messages which may be included in the page template. The figure below shows an example of a transaction with security type 4: TRANSACTION DETAIL DEFINITION ---------------------- Applid: SP3VIR5 11:35:36 Internal name ===> HTTP-16 To associate with an entry point name External name ===> cicsHtml Name displayed on user menu Description ===> Access CICSD with HTML security Application ===> SPCICSD Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 1 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> HTVT Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed How started ===> 2 1=menu 2=sub-menu 3=auto Security ===> 4 0=none 1=basic 2=NTLM 3=TLS 4=HTML H4W commands ? ===> 0=no 1=yes 2=if2VIRTEL 4=auto Logon message ===> TIOA at logon ===> Signon to CICS&/W&'114BE9'&U&'114CF9'&P&/A TIOA at logoff ===> &£6D Initial Scenario ===> Input Scenario ===> P1=Update Final Scenario ===> Output Scenario ===> P3=Return P12=Server HTML security: Example transaction with security type 4 The figure below shows an example of a page template containing userid and password fields which can be used with the security type 4 transaction as shown above. 278 Chapter 5. Security Virtel User Guide, Release 4.57 {{{ SET-OUTPUT-ENCODING-UTF-8 "" }}} {{{CREATE-VARIABLE-IF (SIGNON-IS-NEEDED) "$$SIGTYPE"}}} {{{CREATE-VARIABLE-IF (APPLICATION-IS-CONNECTED) "$$APP"}}} {{{WHEN-EXISTS "$$SIGTYPE"}}} {{{NAME-OF (VIRTEL)}}} signon {{{DECLARE-FIELD-AS (USERNAME) "USERNAME"}}} {{{DECLARE-FIELD-AS (PASSWORD,HEX) "PASSWORD"}}} {{{DECLARE-FIELD-AS (NEW-PASSWORD,HEX) "NEWPASSWORD"}}} {{{DEFINE-HTML-PFKEY "pf"}}} {{{END-WHEN-EXISTS "$$SIGTYPE"}}} {{{WHEN-NOT-EXISTS "$$SIGTYPE"}}}

Logged in as {{{TRIMMED-VALUE-OF "$$SIG"}}}

{{{FOR-EACH-VALUE-IN "$ERRMSG$"}}}

{{{CURRENT-VALUE-OF "$ERRMSG$"}}}

{{{END-FOR "$ERRMSG$"}}}
{{{ GENERATE-HTML (1,1,5000) }}}
{{{ DEFINE-HTML-PFKEY "pf" }}} {{{ DEFINE-HTML-FOCUS-FIELD "focusField" }}}
{{{END-WHEN-NOT-EXISTS "$$SIGTYPE"}}} HTML security: Example page template 5.1.9 Virtel Rules The rules attached to an HTTP line allow security to be implemented at the entry point level. The following example shows a set of three rules which are used to filter incoming HTTP calls. The first rule, 1HT00100, assigns an entry point specifically for users known to VIRTEL and identified by means of a “cookie” included in their HTTP request. In this case, the entry point will be chosen according to the set of rules associated with that particular user. See Correspondent Management in the Virtel Administration Guide. The second rule, 1HT00200, assigns the entry point EPINTERN to clients whose IP address is 192.168.n.n, and only 5.1. VIRTEL Web Access Security 279 Virtel User Guide, Release 4.57 during the period Monday to Friday during the hours 08:30 to 17:30. The third rule, 1HT00900, assigns the entry point EPPUBLIC to all other requests (this entry point could, for example, display a page containing the message “Access not authorised”). LIST of RULES in RULE SET: H-HTTP ---------------- Applid: SPVIRD2 13:57:53 Name 1HT00100 1HT00200 1HT00900 Status ACTIVE ACTIVE ACTIVE P1=Update P6=1st page Description HTTP access (users authorised by cookie) HTTP access (internal network, working hours) HTTP access (other users) P2=Suppress P7=Page-1 Entry Point $COOKIE$ EPINTERN EPPUBLIC P3=Return P8=Page+1 P12=Edit HTTP security by rule: List of rules DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: SPVIRE2 15:46:00 Name ===> 1HT00100 Rule priority is per name Status ===> ACTIVE 19 May 2004 15:46:00 VIRDBA Description ===> HTTP access (Users authorised by cookie) Entry point ===> $COOKIE$ Target Entry Point Parameter ===> Trace ===> 1=commands 2=data 3=partner C 0 0 0 0 0 0 0 : 0=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT IP Subnet ===> Mask ===> Host ===> eMail ===> Calling DTE ===> Calling DTE address Called ===> Called DTE address CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) User Data ===> 0 Days 0 Start time P1=Update P4=Activate CREATION OK ===> M: ===> H: T: M: W: S: T: F: S: End time ===> H: P3=Return P5=Inactivate S: M: S: Enter=Add P12=Entry P. HTTP security by rule: Users authorized by cookie DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: SPVIRE2 15:46:00 Name ===> 1HT00200 Rule priority is per name Status ===> ACTIVE 19 May 2004 15:46:00 VIRDBA Description ===> HTTP access (Internal network, working hours) Entry point ===> EPINTERN Target Entry Point Parameter ===> 280 Chapter 5. Security Virtel User Guide, Release 4.57 Trace C 1 0 0 0 0 0 0 ===> 1=commands 2=data 3=partner : 0=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT IP Subnet ===> 192.168.000.000 Mask ===> 255.255.000.000 Host ===> eMail ===> Calling DTE ===> Calling DTE address Called ===> Called DTE address CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) User Data ===> 1 Days 1 Start time ===> M: X ===> H: 08 T: X M: 30 P1=Update P4=Activate W: X S: 00 T: X F: X S: End time ===> H: 17 S: M: 30 P3=Return P5=Inactivate S: 00 Enter=Add P12=Entry P. HTTP security by rule: Internal network, working hours DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: SPVIRE2 15:46:00 Name ===> 1HT00900 Rule priority is per name Status ===> ACTIVE 19 May 2004 15:46:00 VIRDBA Description ===> HTTP access (Other users) Entry point ===> EPPUBLIC Target Entry Point Parameter ===> Trace ===> 1=commands 2=data 3=partner C 0 0 0 0 0 0 0 : 0=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT IP Subnet ===> 000.000.000.000 Mask ===> 000.000.000.000 Host ===> eMail ===> Calling DTE ===> Calling DTE address Called ===> Called DTE address CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) User Data ===> 0 Days 0 Start time ===> M: ===> H: T: M: P1=Update P4=Activate W: S: T: F: S: End time ===> H: P3=Return P5=Inactivate S: M: S: Enter=Add P12=Entry P. HTTP security by rule: Other users 5.1. VIRTEL Web Access Security 281 Virtel User Guide, Release 4.57 282 Chapter 5. Security CHAPTER SIX HOWTOS 6.1 How To Use Different Screen Sizes Although the standard 3270 screen size is 24 rows by 80 columns, certain applications benefit from the use of terminals with larger screen sizes. The screen size is determined by the LOGMODE used for the session between VIRTEL and the host application. VTAM offers logmodes for the following standard screen sizes: • model 2 : 24x80 (logmode SNX32702) • model 3 : 32x80 (logmode SNX32703) • model 4 : 43x80 (logmode SNX32704) • model 5 : 27x132 (logmode SNX32705) There are two different ways that the VIRTEL administrator can set up the configuration to allow the VIRTEL Web Access user to select the desired logmode: • define a separate VIRTEL transaction for each screen size, and allow the user to select the appropriate transaction • group the VTAM relay LUs into pools, each pool having a different logmode, and allow the user to select the pool by coding an appropriate parameter on the URL 6.1.1 LOGMODE defined by the transaction With this method, the administrator defines multiple VIRTEL transactions for a single application, each transaction specifying a different logmode. For example, transactions Tso2 and Tso5 delivered in the sample configuration both define TSO as the target application, but specify different logmodes SNX32702 and SNX32705 respectively. The user selects the desired transaction from the applist menu displayed by the “Other applications” link in the VIRTEL Web Access menu. The figure below shows the definition of the Tso5 transaction defined under the WEB2HOST entry point: TRANSACTION DETAIL DEFINITION ---------------------- Applid: VIRTEL 17:12:54 Internal name ===> W2H-13M5 To associate with an entry point name External name ===> Tso5 Name displayed on user menu Description ===> Logon to Tso (3270 model 5) Application ===> TSO Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 1 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> DEVT Prefix of name of partner terminals Logmode ===> SNX32705 Specify when LOGMODE must be changed How started ===> 1 1=menu 2=sub-menu 3=auto Security ===> 0 0=none 1=basic 2=NTLM 3=TLS 4=HTML 283 Virtel User Guide, Release 4.57 H4W commands ? Logon message ===> ===> TIOA at logon ===> TIOA at logoff ===> Initial Scenario ===> Input Scenario ===> P1=Update 0=no 1=yes 2=if2VIRTEL 4=auto Final Scenario ===> Output Scenario ===> P3=Return P12=Server Example of TSO transaction TSO specifying logmode SNX32705 The URL to access this transaction could be of the format: http://n.n.n.n:41001/w2h/WEB3270.htm+Tso5 6.1.2 Assigning a LOGMODE by URL parameter The URL which allows the browser to connect to a host application via VIRTEL may contain a parameter, such as “model5” as shown in this example: http://n.n.n.n:41001/w2h/WEB3270.htm+Tso+model5 This form of a VIRTEL URL is described in the section “Dynamic URL with user data”. This form of URL is processed by VIRTEL with reference to the “rule set” associated with the HTTP line. VIRTEL looks for a rule whose “User Data” field matches the value of the parameter (model5). The “Parameter” field of the selected rule assigns a relay LU name from the pool defined with logmode SNX32705. The VTAM definition of the relay pool is shown in the example below. In this example, LU names in the range RHTVT5nn are defined to have the model5 logmode SNX32705: VIRTAPPL VBUILD TYPE=APPL * ------------------------------------------------------------------ * * RHTVTxxx : Relay for VTAM applications acceded by WEB to HOST * * ------------------------------------------------------------------ * * 3270 model 2 terminals RHTVT0?? APPL AUTH=(ACQ,PASS),MODETAB=ISTINCLM,DLOGMOD=SNX32702,EAS=1 * 3270 model 5 terminals RHTVT5?? APPL AUTH=(ACQ,PASS),MODETAB=ISTINCLM,DLOGMOD=SNX32705,EAS=1 VTAM definition of terminal groups The screen below shows an example rule which assigns a relay LU from the range RHTVT5nn when the URL contains the parameter model5: DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: SPVIRE2 17:15:15 Name ===> WHT00150 Rule priority is per name Status ===> ACTIVE 19 May 2004 15:46:00 VIRDBA Description ===> HTTP access (With model5 URL parameter) Entry point ===> WEB2HOST Target Entry Point Parameter ===> RHTVT5* &1 value or LUNAME Trace ===> 1=commands 2=data 3=partner C : 0=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT 284 Chapter 6. HOWTOs Virtel User Guide, Release 4.57 0 0 0 0 0 0 0 IP Subnet Host eMail Calling DTE Called CUD0 (Hex) User Data 0 Days 0 Start time ===> ===> ===> ===> ===> ===> ===> model5 ===> M: ===> H: Mask ===> Calling DTE address Called DTE address First 4 bytes of CUD (X25 protocol) T: M: P1=Update P4=Activate W: S: T: F: S: End time ===> H: P3=Return P5=Inactivate S: M: S: Enter=Add P12=Entry P. Example rule for selection of logmode by URL The LU name (RHTVT5nn) assigned by the rule must belong to the LU pool shared assigned to the HTTP line, as shown in the example below: TERMINAL DETAIL DEFINITION ------------------------- Applid: VIRTEL 13:32:28 Terminal ===> W2HTP500 ?wxyZZZZ for dynamic allocation w : Sna or Non-sna or * (category) x : 1, 2, 3, 4, 5 or * (model) y : Colour, Monochrome or * Z : any characters Relay ===> RHTVT500 Name seen by VTAM applications = : copied from the terminal name *Pool name ===> *W2HPOOL Pool where to put this terminal Description ===> Relay pool for HTTP (3270 model 5) Entry Point ===> 2nd relay ===> Terminal type ===> Compression ===> Possible Calls ===> Write Stats to ===> 12 Enforced Entry Point Possible 2nd relay (Printer) 1=LU1 2=3270 3=FC P=Printer S=Scs 0, 1, 2 or 3 : compression type 0=None 1=Inbound 2=Outbound 3=Both 1,4=VIRSTAT 2=VIRLOG RHTIM500 3 2 3 Repeat ===> 0020 Number of generated terminals P1=Update P3=Return Enter=Add P12=Server Definition of model 5 terminals in the W2HPOOL pool 6.1.3 User-specified LOGMODE When the entry point definition specifies SCENLOGM in the “Identification scenario” field, the user may override the default logmode by appending an additional parameter LOGMODE=modename to the URL, as shown in this example: http://n.n.n.n:41001/w2h/WEB3270.htm+Tso?logmode=SNX32705 The source code for the SCENLOGM scenario is supplied in the VIRTEL SAMPLIB. Note: To activate this functionality, SCENLOGM must be specified in the “Identification scenario” field 6.1. How To Use Different Screen Sizes 285 Virtel User Guide, Release 4.57 of the ENTRY POINT (not the transaction definition) 6.1.4 Dynamic logmode with user-specified screen size VIRTEL Web Access also supports the use of “dynamic” logmodes, such as D4A32XX3, which allow the user to specify a non-standard alternate screen size. When the entry point definition specifies SCENLOGM in the “Identification scenario” field, the user may also append ROWS and COLS parameters to the URL, as shown in this example: http://n.n.n.n:41001/w2h/WEB3270.htm+Tso?logmode=D4A32XX3&rows=54&cols=132 VIRTEL allows a maximum screen size of 62 rows by 160 columns. The host application must also support the use of non-standard screen sizes. 6.2 How To Support Multiple Codes Pages VIRTEL can use two methods of EBCDIC translation and this is governed by the template or web page being displayed. If the page contains the embedded VIRTEL tag {{{SET-OUTPUT-ENCODING-UTF-8}}} than the TCT DEFUTF8 parameter is used. If the page doesn’t contain the tag then the code pages identified by the COUNTRY parameter are used. (See “COUNTRY” and “DEFUTF8” parameters in the VIRTEL Installation Guide for further details). Code Page Support can be provided at the following levels: • TCT Level - This would provide Code Page translation defaults for all lines and transaction. Effectively a Global option for an instance of VIRTEL. • URL Level – This overrides the TCT default. • Transaction level - Code pages can be determined through the VIRTEL Scenario language using the SET$ ENCODING and SET$ URL-ENCODING instructions. 6.2.1 Defining Code Pages translation defaults This is done by defining a default value for “COUNTRY” and “DEFUTF8” parameters in the VIRTEL TCT (see “Parameters of the VIRTCT” in the VIRTEL Installation Guide). Override the TCT defaults at URL level Users who require a codepage different from the TCT definition can specify the code page as a parameter of the URL. For example: http://n.n.n.n:41001/w2h/WEB2AJAX.htm+Tso?codepage=IBM1047 Note: To activate this functionality, SCENLOGM must be specified in the “Identification scenario” field of the ENTRY POINT (not the transaction definition). The value of the CODEPAGE parameter may be either: • one of the values listed for the DEFUTF8 parameter of the VIRTCT (see “Parameters of the VIRTCT” in the VIRTEL Installation Guide); or 286 Chapter 6. HOWTOs Virtel User Guide, Release 4.57 • one of the additional codepages you have specified in the CHARSET parameter in your VIRTCT at VIRTEL installation time Override the TCT defaults at business logic level At a transaction level code pages can be determined through the VIRTEL Scenario language using the SET$ ENCODING and SET$ URL-ENCODING instructions. These are described in the VWA Users Guide. 6.2.2 Supporting multiple countries. If we take the scenario that applications can be accessible globally than VIRTEL can incorporate the country differences through one of the following methods. In most case the TCT or URL override will accommodate such a set up. • For each country supported, have a different instance of VIRTEL specifying the relevant country code pages at the TCT level. • For each country supported, have a separate line/port and use the URL overrides. • For each country supported, have a common line/port and use the URL overrides. 6.3 How To Handle Host Session Termination When the user terminates the application session by pressing the “Disconnect” button in the browser, various options are available: - Return to the application selection menu - Display a specific HTML page - Close the browser window and return to the desktop Remember that it is always best to exit cleanly from the host application by pressing the “Disconnect” button, rather than closing the browser window. If the browser window is closed abruptly, the host session resources may not be freed until the expiry of the timeout period specified in the entry point definition. 6.3.1 Return to the application selection menu When a “Disconnect” request is received, VIRTEL returns to the root URL and displays the default page for the line, which will normally be an application selection menu. For detailed information, see “Virtel URL formats”. The user can then choose to connect to the same or a different application by clicking on the appropriate link in the application selection menu. 6.3.2 Displaying a specific page on disconnection Those sites wishing to display a specific page at the end of a session may use the “Last page” field in definition of the entry point associated with the HTTP line or the entry point selected by the rules of line. The “Last page” field indicates the name of the page to be displayed following disconnection from host application. The indicated file must be uploaded to the same directory as specified in the URL for host application (for example W2H-DIR if the URL specifies /w2h/WEB3270.htm). the the the the The “Last page” may contain instructions to the user and may include system information provided by VIRTEL (such as the application and terminal name, date and time, etc.) 6.3. How To Handle Host Session Termination 287 Virtel User Guide, Release 4.57 6.3.3 Closing the browser window automatically Sites who wish to close the browser window and return to the desktop when the user disconnects from the host application may specify close.htm in the “Last page” field of the entry point definition. This page contains JavaScript code which will attempt to close the current browser window. Depending on the browser version and security settings, the window may close, a prompt may be issued, or the window may remain open. The close.htm page is delivered as standard in the W2H-DIR directory but may be copied to another directory if required. The figure below shows an example of an entry point definition with close.htm specified as the “Last page”: ENTRY POINT DETAIL DEFINITION ---------------------- Applid: SPVIRE2 15:52:26 Name ===> WEB2HOST Name this ENTRY POINT (LOGON DATA) Description ===> HTTP entry point (SysperTec menu) Transactions ===> W2H Prefix for associated transactions Last page ===> CLOSE.HTM Displayed at end of session Transparency ===> Server types NOT to emulate Time out ===> 0005 minutes Maximum inactive time Do if timeout ===> 0 0=logoff 1=bip+logoff 2=anti pad Emulation ===> HTML Type of terminal: HOST4WEB : program driven HTML : Web Browser SCENARIO : script driven EMAIL : SMTP client MINITEL : 40 or 80 columns X25 : uses low level dialog Signon program ===> VIR0020H Controls user name and password Menu program ===> VIR0021A List of transactions Identification scenario ===> eg XML identification Type 3 compression ===> Discover typical screens (Virtel/PC) Mandatory identification ===> (PC or minitel) 3270 swap key ===> eg P24 Extended colors ===> X E: extended X: extended + DBCS P1=Update Enter=Add P3=Return P4=Transactions Example of entry point with last page 6.4 How To Access A Host Application Directly It is not always necessary to pass via an application selection menu to connect to a host application. A host application may be accessed directly by opening the URL containing the complete path to the application. This URL may result in the display of the host signon screen, the first application screen, or possibly (if a script or scenario is used), a subsequent screen sent by the application. For more information about how VIRTEL can be used to automate the process of connection to a host application, see “Virtel URL formats” of this manual, and “Connection/Disconnection Scripts” in the VIRTEL Connectivity Reference manual. 6.4.1 Full path URL For example, you can access the VIRTEL transaction whose external name is “CICS” by pointing the browser at a URL of the following format: http://n.n.n.n:41001/w2h/WEB2AJAX.htm+Cics At the end of the session with the host application, VIRTEL examines the “Last page” field (see previous section) to decide whether to return to the desktop or to redisplay the application selection menu. 288 Chapter 6. HOWTOs Virtel User Guide, Release 4.57 6.4.2 Default URL for the entry point An application URL may be coded in the “TIOA at logon” field of the default transaction for the entry point (the default transaction is the transaction whose external name is the same as the entry point name). This allows the user to go directly to the host application simply by entering a URL of the format: http://n.n.n.n:41001 The example below shows the default transaction for the WEB2HOST entry point set up to go directly to the transaction whose external name is “Cics”: TRANSACTION DETAIL DEFINITION ———————- Applid: VIRTEL 15:01:02 Internal name ===> W2H-00 To associate with an entry point name External name ===> WEB2HOST Name displayed on user menu Description ===> Default directory = entry point name Application ===> W2H-DIR Application to be called PassTicket ===> 0 Name ===> 0=no 1=yes 2=unsigned Application type ===> 4 1=VTAM 2=VIRTEL 3=SERV 4=PAGE 5=LINE Pseudo-terminals ===> DELOC Prefix of name of partner terminals Logmode ===> Specify when LOGMODE must be changed How started ===> 2 1=menu 2=sub-menu 3=auto Security ===> 0 0=none 1=basic 2=NTLM 3=TLS 4=HTML H4W commands ? ===> 0=no 1=yes 2=if2VIRTEL 4=auto Check URL Prefix ===> TIOA at logon ===> /w2h/WEB2AJAX.htm+Cics TIOA at logoff ===> Initial Scenario ===> Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update P3=Return P12=Server Example of default URL For more information see “Virtel URL formats”. 6.5 How To Change The Font For Web Access The “Web Access settings menu” allows you to change the font family and font size. By default VIRTEL will calculate an appropriate font size to fit the browser window size, but you can choose a fixed font size if you prefer. VIRTEL Web Access uses a fixed-pitch font to display the 3270 screen. If you do not like the default font then you can choose any fixed-pitch font installed on the workstation. Typical fonts available on Windows workstations are Courier New, Fixedsys, Terminal, Consolas, and Lucida Console. You can use the Windows Control Panel – Fonts dialog to view the installed fonts. 6.6 How To Change The 3270 Display Style The “Web Access settings menu” allows you to change the display style to suit your needs. By default VIRTEL provides 3 defaults models named “3270”, “Gray” and “White”, If you need some more, you must request your Administrators. Selecting display pattern : The display model changes will take effect at the next connection to a 3270 application. 6.5. How To Change The Font For Web Access 289 Virtel User Guide, Release 4.57 6.7 How To Customize The Enter Key Settings Many 3270 users prefer to customize the keyboard mapping so that the “Enter” key on the main keyboard is handled as a 3270 newline, while the right “Ctrl” key and the “Enter” key on the numeric keypad are treated as 3270 Enter. The “Web Access settings menu” allows you to specify this configuration using the following settings: "ctrl":"ENTER", "enter":"Newline", "kpenter":"ENTER" Versions 6, 7, and 8 of Internet Explorer do not distinguish between the Enter key on the main keyboard and the Enter key on the numeric keypad. For users who want the two “Enter” keys to be handled differently, Syspertec supplies an additional DLL to be installed in Internet Explorer as a “Browser Helper Object”. This DLL can be installed by clicking on the “Install VirtKey BHO” link on the VIRTEL Web Access menu. After installing the DLL, go to “Tools” – “Internet Options” – “Advanced” and check that the option “Enable third-party browser extensions” is ticked, then stop and restart Internet Explorer. Administrator privilege is needed to install the Browser Helper Object, but once installed the BHO can be used by users without administrator privileges. Although other browsers (including Internet Explorer 9) are capable of recognizing the keypad Enter key without the need for a BHO, older releases of Firefox, Chrome, and Safari do not distinguish between the left and right Ctrl keys. This means that when “ctrl” is set to “ENTER” then both Ctrl keys will be handled as 3270 Enter. In addition, the AltGr key will be treated as Ctrl under Firefox. The most recent versions of Firefox (from version 15 onwards for Windows 7 and from version 17 onwards for Windows XP) and Chrome (from version 23 onwards) are capable of distinguishing between the left and right Ctrl keys like Internet Explorer. 6.7.1 Managing CTRL keydown being lost With some Windows Operating System, the CTRL keydown events may be lost half the time. In such case, you must turn on a special feature by introducing the following command into a “custom.js” file. /* * The workaround for missing CTRL key events (on some Windows system) is * activated if this property is set to true. * Default value (if unspecified) : false */ w2hparm.fixMissingCtrlKeydown = true; 6.8 How To Customize Display Styles VIRTEL users can customise the screen display to suit their needs. An exception to this is the model type which is an Administration function. Administrators will configure model types which can then be selected by a user. 6.8.1 Add or remove a display style To add a new display style, you must : • Create a CSS file with a “.css” extension name, 290 Chapter 6. HOWTOs Virtel User Guide, Release 4.57 • Load this file in any directory of your choice except in W2H-DIR, • Make sure that this directory is referenced in the entry point by using a transaction that contains the string “/w2h/custom-css” (without the quotes) in the “URL prefix” field. • Create (or modify) a custom.js file to reference the recently added CSS file (see below): – Load the custom.js file in any directory of your choice except in W2H-DIR, – Make sure that this directory is referenced in the entry point by using a transaction that contains the string “/w2h/custom-js” (without the quotes) in the “URL prefix” field. /*===================================================================== * * CUSTOM CODE SAMPLE TO ADD A CUSTOM CSS FILE * OR TO REMOVE A DEFAULT CSS FILE * *====================================================================*/ /* * This implementation adds 3 custom CSS to the settings "Display Style" list choice, * and removes the "white" default choice from this list. */ function modify_settingsValues(name, values) { // The target is the "style" list settings if (name == "style") { // Remove the "white" default entry from the list of choices values.splice( values.indexOf('white'), 1); // Append 3 custom styles to the list of choices return values.concat( "GREEN.CSS" , "BLUE.CSS" , "RED.CSS" ); } } /* * This block of code sets a specific label for each style added. * If this code is omitted, the raw value of the entries are displayed instead. */ oVWAmsg.custom( { "style:GREEN.CSS" : "Custom" // Use this label instead of 'GREEN.CSS ,→' , "style:BLUE.CSS" : "Test" // Use this label instead of 'BLUE.CSS' , "style:RED.CSS" : "Red !" // Use this label instead of 'RED.CSS' }); Example of a custom.js file to add or remove a display style 6.8.2 Add or remove a print style To add a new print style, proceed as for a display style, but in the VWAmsg.custom order, replace the word “style” by “printstyle”. /*===================================================================== * * CUSTOM CODE SAMPLE TO ADD A CUSTOM CSS FILE * OR TO REMOVE A DEFAULT CSS FILE * *====================================================================*/ /* 6.8. How To Customize Display Styles 291 Virtel User Guide, Release 4.57 * This implementation adds 3 custom CSS to the settings "Display Style" list choice, * and removes the "white" default choice from this list. */ function modify_settingsValues(name, values) { // The target is the "printstyle" list settings if (name == "printstyle") { // Remove the "white" default entry from the list of choices values.splice( values.indexOf('white'), 1); // Append 3 custom print styles to the list of choices return values.concat( "GREEN.CSS" , "BLUE.CSS" , "RED.CSS" ); } } /* * This block of code sets a specific label for each print style added. * If this code is omitted, the raw value of the entries are displayed instead. */ oVWAmsg.custom( { "printstyle:GREEN.CSS" : "Custom" // Use this label instead of ,→'GREEN.CSS' , "printstyle:BLUE.CSS" : "Test" // Use this label instead of 'BLUE.CSS' , "printstyle:RED.CSS" : "Red !" // Use this label instead of 'RED.CSS' }); Example of a custom.js file to add or remove a print style 6.8.3 3270 support blinking fields Becoming unpopular over time, and even stated as being the cause of adverse reactions in people with epilepsy, the “” tag was retired from the HTML API, although it still remains within the browsers code. The feature can be reactivated through the use of CSS code but by doing so Web Accessibility guidelines may be compromised. This may be a violation in certain jurisdictions, contravening laws and regulations with regard to web design and accessibility and what is permissible. It is up to each individual to determine the purpose and usefulness of reactivating this feature. To reactivate blinking support, you can include the following code in your custom.css file : /* To support "BLINKING" in Virtel Web Access 3270 emulation, the following code has ,→to be included into your ".BBLUE, .BRED, .BPINK, .BGREEN, .BTURQUOISE, .BYELLOW, . ,→BWHITE { -webkit-animation: blink 1s step-end infinite; -moz-animation: blink 1s step-end infinite; -o-animation: blink 1s step-end infinite; animation: blink 1s step-end infinite; } @-webkit-keyframes blink { 67% { opacity: 0 } } @-moz-keyframes blink { 67% { opacity: 0 } } @-o-keyframes blink { 67% { opacity: 0 } } @keyframes blink { 67% { opacity: 0 } } 292 Chapter 6. HOWTOs Virtel User Guide, Release 4.57 This code can also be found into the “custom-blink.css” source file store into the “tools” subdirectory of any update delivered from number #5310 and over. 6.9 How To Change The Default User Settings The site default settings for Web Access are stored in the file w2hparm.js (see “Global modification of Web Access settings”) 6.10 How To Support A Reverse Proxy If your installation uses a reverse proxy (or bastion host) between the user’s browser and the VIRTEL Web Access server, then the VIRTEL log and statistics file will show the IP address of the proxy instead of the address of the end user. In order for VIRTEL to recognize and log the originating user’s IP address, you must declare the proxy in the HTFORWD parameter of the VIRTCT (see “Parameters of the VIRTCT” in the VIRTEL Installation Guide) or in a rule attached to the HTTP line (see “Rules” in the VIRTEL Connectivity Reference manual). 6.11 How To Support Virtual Hosting Name-based virtual hosting is a method for supporting multiple sites (for example, site1.mycompany.com and site2.mycompany.com) using the same IP address and port number. By means of the “HTTP Host” field in the rules attached to the HTTP line, VIRTEL can recognize the site name and direct the request to a specific entry point. Refer to “Rules” in the VIRTEL Connectivity Reference manual for further details. You can install a set sample definitions for virtual hosting by running the ARBOLOAD job (delivered in the VIRTEL SAMPLIB) with the VHOST=YES parameter. 6.12 How To Control APPLIST behaviour To open an application in a new TAB instead of the current window code the following in the customizable exit before_launchApplink(href). /* To open an application (issued from applist transaction) in a new TAB instead of ,→the same window */ function before_launchApplink(href) { return { url: href, // Return received URL target: '_blank' // Target is a new TAB }; } Create an options entry to support this modification against transaction applist (CLI-90). For example, using the Virtel HTML Admin. panel, select transaction applist and use the toolbox Icon to generate the options file. In the transaction set the options field to appmenu. Remember to save the changes to the transaction! Place the above code into a file called custJS.appmenu.js and upload to the directory defined for the ‘options’ path. 6.9. How To Change The Default User Settings 293 Virtel User Guide, Release 4.57 Note: You must have setup the “options” mode customization before you can generate “option” files. The ARBOLOAD job must be run with OPTIONS=YES to add the options transactions. See “customization modes” on how to set up customising with the options mode. 294 Chapter 6. HOWTOs CHAPTER SEVEN APPENDIX 7.1 Appendix A 7.1.1 Default values for W2H parameters Keyword “fontsize” “font” “autocapture” “autoprint” “cursor” “vline” “hline” “esc” “ctrl” “cmdleft” “cmdright” “enter” “home” “end” “pgup” “pgdn” “pause” “kpenter” “shiftenter” “shiftesc” “shiftins” “shiftdel” “shifthome” “shiftend” “shiftpgdn” “ctrlenter” “ctrlins” “ctrldel” “ctrlhome” “ctrlend” “altins” “althome” Caption Font size Font family Auto-capture Auto-print Cursor “Bar”, Vertical line Horiz line Esc key Ctrl key Left Cmd key Right Cmd key Enter key Home key End key PageUp key PageDown key Pause key Keypad Enter Shift+Enter Shift+Esc Shift+Insert Shift+Delete Shift+Home Shift+End Shift+PageDown Ctrl+Enter Ctrl+Insert Ctrl+Delete Ctrl+Home Ctrl+End Alt+Ins Alt+Home Possible values “window”, “screen”, “8”, “10”, “12”, “14”, “16” “font name” true, false true, false “Blink”, “Block” true, false true, false “no”, “ATTN”, “CLEAR”, “Reset” “no”, “ENTER”, “Newline” “no”, “Reset” “no”, “ENTER” “ENTER”, “Newline” “no”, “Home” “no”, “ErEof”, “End” “PF7”, “PF19”, “PA1”, “no” “PF8”, “PF20”, “PA2”, “no” “CLEAR”, “ATTN”, “PA3”, “no” “ENTER”, “Newline” “no”,”ENTER”, “Newline” “no”, “ATTN”, “CLEAR”, “Reset” “no”, “Dup” “no”, “ErEof” “no”, “FieldMark”, “Home” “no”, “ErEof”, “End” “no”, “PA3” “no”,”ENTER”, “Newline” “no”, “PA1” “no”, “PA2”, “ErEof” “no”, “PA3”, “Home”, “ChgCur” “no”, “ErEof”, “End” “no”, “PA1” “no”, “PA2” Continued on next page 295 Virtel User Guide, Release 4.57 Keyword “altpgup” “altpgdn” Table 7.1 – continued from previous page Caption Possible values Alt+PageUp “no”, “PA1” Alt+PageDown “no”, “PA2” “altpause” “altf1” “altf2” “altf3” “kpslash” “kpaster” “kpminus” “kpplus” “kpdot” “dblclick” “urlhotspot” “pfkhotspot” “pasteereof” “pastetyping” “movecursor” “style” “printstyle” “rtm” “omitnulls” “keepmacpad” “keepkeypad” “hiliteinput” “caretnot” “adaptfontratio” “charspace” “linespace” “settingsGUI” “preservein” “nolongpoll” “MirrorMode” “NOstretch” Alt+Pause Alt+F1 Alt+F2 Alt+F3 Keypad / Keypad * Keypad Keypad + Keypad . Double Click URL hotspots PF key hotspots Paste erase EOF Map Ctrl+V to Paste by Typing Move cursor on activat Style Print style Response time monitor Omit nulls from input Keep macro pad open Keep keypad open Highlight input fields Remap ^ to logical not Adapt font size ratio Character spacing Line spacing Uuser interface type Preserve insert mode AsynchSupport BiDirectional mode Font Size Stretch “no”, “ATTN”, “CLEAR”, “PA3” “no”, “PA1”, “ENTER” “no”, “PA2” “no”, “PA3”, “ChgCur” “/”, “PA1” “*”, “PA2” “-“, “Backtab” “+”, “Tab”, “Newline” “.”, “,” “Word”, “ENTER”, “no” true, false true, false true, false true, false true, false “3270”, “gray”, “white” “3270”, “color”, “white” true, false true, false true, false true, false true, false true, false true, false true, false true, false v2 true, false true, false true, false true, false Default W2H parameters: List of keywords and possible values Note: Some settings my be deprecated and therefore may no longer be in use. They remain for reasons of downward compatibility. 7.2 Trademarks SysperTec, the SysperTec logo, syspertec.com and VIRTEL are trademarks or registered trademarks of SysperTec Communication Group, registered in France and other countries. IBM, VTAM, CICS, IMS, RACF, DB2, MVS, WebSphere, MQSeries, System z are trademarks or registered trademarks of International Business Machines Corp., registered in United States and other countries. 296 Chapter 7. Appendix Virtel User Guide, Release 4.57 Adobe, Acrobat, PostScript and all Adobe-based trademarks are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and other countries. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States and other countries. UNIX is a registered trademark of The Open Group in the United States and other countries. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service names of others. 7.3 Open Source Software The current VIRTEL Web Access product uses the following open source software: • jQuery Under MIT license - https://jquery.org/license/ • StoreJson Under MIT license https://github.com/marcuswestin/store.js/commit/ baf3d41b7092f0bacd441b768a77650199c25fa7 • jQuery_UI Under MIT license - http://en.wikipedia.org/wiki/JQuery_UI 7.3. Open Source Software 297 INDEX $DECLARE Examples Scenario Instructions, 178 $UseCookieSessions$ Parameters, 22 2VIRTEL prefix HOST4WEB, 265 3270 data stream printers LU3 Printing, 84 3270 session management, 21 3287 Printing, 67 390 Object modules Virtel Web Modernisation, 155 Access Host Application Directly HOWTOs, 288 Accessing VTAM Applications, 100 ACTION$ ACTION$ DISCONNECT, 159 ACTION$ REFRESH-TERMINAL, 159 ACTION$ SERVE-ANOTHER_USER, 159 ACTION$ TERMSESS, 160 ACTION$ TO-APPLICATION, 160 ACTION$ TO-TERMINAL, 161 Scenario Instructions, 159 ACTION$ DISCONNECT ACTION$, 159 Scenario Instructions, 159 ACTION$ Examples Scenario Instructions, 161 ACTION$ REFRESH-TERMINAL ACTION$, 159 Scenario Instructions, 159 ACTION$ SERVE-ANOTHER_USER ACTION$, 159 Scenario Instructions, 159 ACTION$ TERMSESS ACTION$, 160 Scenario Instructions, 160 ACTION$ TO-APPLICATION ACTION$, 160 Scenario Instructions, 160 ACTION$ TO-TERMINAL ACTION$, 161 298 Scenario Instructions, 161 Add calendars to date fields Scenarios, 211 ADD-TO-FIELDS tags, 44 Adding a company logo Customization, 106 Adding a screen watermark Customization, 113 Adding text to the toolbar Customization, 103 ADVANCE-TO-THE-NEXT-VALUE-OF tags, 52 AFTER-NOT-LAST-VALUE tags, 56 after_responseHandle Exits, 108 after_StandardInit Exits, 108 AJAX-SESSION-CODE tags, 34 Allocating work files Virtel Batch, 241 Application Selection Menu, 80 Applist transaction, 81 Appmenu template, 81 Presentaion Modes, 80 Applist transaction Application Selection Menu, 81 Appmenu template Application Selection Menu, 81 Assembling TCT Virtel Batch, 239 AT-TLS Certificates, 277 Encryption, 277 Autoconnect Printing, 86 Automatic Scenario Generation Virtel Web Intergration, 232 AUTOREFRESH Scenario Instructions, 214 Virtel User Guide, Release 4.57 before_launchApplink Exits, 108 before_submitForm Exits, 108 Build and send structured fields VIRTEL, 261 C AUTO VARIABLES HOST4WEB, 265 HOST4WEB Commands, 265 C KEEP VARIABLES HOST4WEB, 265 HOST4WEB Commands, 265 C KILL VARIABLES HOST4WEB, 266 HOST4WEB Commands, 266 C RETURN HOST4WEB, 266 HOST4WEB Commands, 266 C SCAN NEXT SCREEN HOST4WEB, 266 HOST4WEB Commands, 266 C TERMSESS HOST4WEB, 266 HOST4WEB Commands, 266 C WAIT NEXT SCREEN HOST4WEB, 266 HOST4WEB Commands, 266 Cache management, 63 Call Interface VIRSETA, 257 VIRSETA Example, 258 VIRSETA Parameters, 257 VIRSETA return codes, 258 VIRSETAI, 259 VIRSETAI Example, 260 VIRSETAI parameters, 260 VIRSETV (CICS), 259 VIRSETV Example, 259 VIRSETV Parameters, 259 VIRSETV return codes, 259 VIRSETVI, 261 VIRTEL, 261, 263 Call interface Virtel, 257 capability tokens, 65 capability types Virtel, 65 Capability URLs, 22 CASE$ Scenario Instructions, 162 CASE$ Examples Scenario Instructions, 163 Certificates Index AT-TLS, 277 Virtel Web Access Security, 277 Change default settings HOWTOs, 293 Change Display Style HOWTOs, 289 Change Font HOWTOs, 289 Change Key Settings HOWTOs, 289 Changing the back ground colour Customization, 107 Chrome Copy, cut and Paste, 121 Chrome Extension Copy, Cut and Paste, 125 Host managed, 125 w2hparm.js setting, 125 waaoAddOnHost.js file, 125 CICS definitions Printing, 87 COBOL Example Programming Interfaces, 254 COBOL Example using FAE5 Programming Interfaces, 256 COBOL FAC8 example Incoming E-mails, 270 Programming Interfaces, 270 COBOL FAD4 example Incoming E-Mails, 273 Programming Interfaces, 273 Colors and Logo Customization, 102 Colour and font management, 42 Commands HOST4WEB, 265 Virtel Batch, 243 COMMAREA Conversion Example Scenarios, 231 Virte Web Intergration, 231 XML, 231 Commarea Example Scenarios, 220 COMMAREA-To-XML Example Scenarios, 230 Virte Web Intergration, 230 XML, 230 Compatibility mode Customization, 102, 108, 130 Compatibility Option id Customization, 134 Conditional generation, 56 Control APPLIST behaviour HOWTOs, 293 299 Virtel User Guide, Release 4.57 CONVERT$ Scenario Instructions, 164, 165 Copy an array VIRSETAI, 259 Copy, Cut and Paste, 118 Chrome Extension, 125 Copy, cut and Paste Chrome, 121 Edge, 129 Firefox, 118 Internet Explorer, 118 COPY-FROM tags, 37 COPY$ COPY$ FIELD-NAME-TO-VARIABLE, 165 COPY$ INPUT-FILE-TO-VARIABLE, 166 COPY$ INPUT-TO-SCREEN, 166 COPY$ INPUT-TO-VARIABLE, 166 COPY$ LIST-TO-VARIABLE, 167 COPY$ OUTPUT-FILE-TO-VARIABLE, 167 COPY$ SCREEN-TO-VARIABLE, 168 COPY$ SYSTEM-TO-VARIABLE, 168 COPY$ VALUE-TO-SCREEN, 173 COPY$ VALUE-TO-VARIABLE, 173 COPY$ VARIABLE-TO-SCREEN, 174 COPY$ VARIABLE-TO-SYSTEM, 174 COPY$ VARIABLE-TO-VARIABLE, 175 Scenario Instructions, 165 COPY$ FIELD-NAME-TO-VARIABLE COPY$, 165 COPY$ INPUT-FILE-TO-VARIABLE COPY$, 166 COPY$ INPUT-TO-SCREEN COPY$, 166 COPY$ INPUT-TO-VARIABLE COPY$, 166 COPY$ LIST-TO-VARIABLE COPY$, 167 COPY$ OUTPUT-FILE-TO-VARIABLE COPY$, 167 COPY$ SCREEN-TO-VARIABLE COPY$, 168 COPY$ SYSTEM-TO-VARIABLE COPY$, 168 COPY$ VALUE-TO-SCREEN COPY$, 173 COPY$ VALUE-TO-VARIABLE COPY$, 173 COPY$ VARIABLE-TO-SCREEN COPY$, 174 COPY$ VARIABLE-TO-SYSTEM COPY$, 174 COPY$ VARIABLE-TO-VARIABLE COPY$, 175 300 COUNTRY-CODE tags, 62 Create a list of values for selected field Scenarios, 210 CREATE-VARIABLE-FROM tags, 37 CREATE-VARIABLE-IF tags, 58 CSS Customization, 102 CURRENT-VALUE-OF tags, 51 Cursor management, 45 custom.css Customization, 102 custom.js Customization, 108 Customization Adding a company logo, 106 Adding a screen watermark, 113 Adding text to the toolbar, 103 Changing the back ground colour, 107 Colors and Logo, 102 Compatibility mode, 102, 108, 130 Compatibility Option id, 134 CSS, 102 custom.css, 102 custom.js, 108 Customizing non-standard Icons, 110 Customizing Toolbar Icons, 109 Default mode, 130 Defining Transaction options, 134 Global level modifications, 131 Hiding information, 104 Hiding the toolbar, 105 Icon display, 107 Installing a Custom Help Page, 116 Javascript, 108 Javascript Exits, 108 Modifying colors, 105 Modifying the text of the status bar, 111 Modifying Web Access Settings, 114 Option mode, 102, 108, 130 Positioning Toolbar Icons, 111 Removing effects from a company logo, 106 Removing Toolbar Icons, 110 Setting Custom Hotspots, 112 Standard Help Page, 115 Toolbar color, 103 TRansaction level modifications, 133 Customize Display Styles HOWTOs, 290 Customizing non-standard Icons Customization, 110 Index Virtel User Guide, Release 4.57 Customizing Toolbar Icons Customization, 109 Customizing Virtel, 130 DDI Files Dynamic Directories Interface, 152 DDI Macro Errors, 154 Macros, 154 DEBUG$ Scenario Intructions, 176 DEBUG$ Example Scenario Intructions, 177 Debugging facilities, 58 DECLARE and JavaScript functions Scenario Instructions, 178 DECLARE-FIELD-AS tags, 61 DECLARE$ Scenario Instructions, 177 DECLARE_FIELD_AS tags, 59 Default mode Customization, 130 DEFAULT-FIELD-WITH-CURSOR tags, 46 DEFINE-AUTOMATIV-COUNTER tags, 53 DEFINE-DFHMDF-COLUMN tags, 40 DEFINE-DFHMDF-NAME tags, 39 DEFINE-HTML-FIELD tags, 39 DEFINE-HTML-FIELD-NAME tags, 38 DEFINE-HTML-FOCUS-FIELD tags, 45 DEFINE-HTML-PFKEY tags, 47 DEFINE-SUB-VARIABLE tags, 53 Defining Transaction options Customization, 134 DELETE-ALL-VARIABLES tags, 54 Directory Management, 25 Disable Function Keys, 48 Display Web Access Settings, 70 DO-COUNT-UP-WITH tags, 52 Dynamic Directories Interface DDI Files, 152 Index Macros, 146 Dynamic Pages URL Formats, 19 Dynamic URL with parameters URL Formats, 20 Dynamic URL with userdata URL Formats, 19 Edge Copy, cut and Paste, 129 Encoding XML Data Virtel Web Intergration, 222 XML, 222 Encryption AT-TLS, 277 Virtel Web Access Security, 277 Encryption management, 60 ENCRYPTION-PARAMETERS tags, 60 END-DO-COUNT tags, 53 END-WHEN-EXISTS tags, 57 END-WHEN-NEXT-EVENT tags, 57 END-WHEN-NOT-BLANK tags, 57 END-WHEN-NOT-EXISTS tags, 57 END-WHILE-EVENT tags, 57 ENDFOR$ Scenario Instructions, 179 Entry point security Virtel Web Access Security, 275 ERROR$ Scenario Instructions, 179 Example of using XML Data Virte Web Intergration, 224 XML, 224 Exits after_responseHandle, 108 after_StandardInit, 108 before_launchApplink, 108 before_submitForm, 108 modify_settingsValue, 109 when_focusGained, 109 when_focusLost, 109 when_init, 109 Extracting Query Data Scenarios, 220 FA88 - Request data Programming Interfaces, 253 301 Virtel User Guide, Release 4.57 FAC8 - Retrieve data from email Programming Interfaces, 269 FAC8 - Structured field code 12 Incoming E-mails, 269 Programming Interfaces, 269 FAC8 - Structured field code 13 Incoming E-mails, 270 Programming Interfaces, 270 FAC8 Structured field Programming Interfaces, 254 FAC8.06 - Specify Virtel directory Programming Interfaces, 254 FAC8.07 - Specify template Programming Interfaces, 254 FAD4 - Send e-mail from application Incoming E-Mails, 272 Programming Interfaces, 272 FAE5 - Send a table variable Programming Interfaces, 255 FAE5 - Structured fields Programming Interfaces, 256 FAE5 and FAE6 Virtel Structured field, 50 FAE5 Example Virtel Structured field, 53 FAE6 - Send a table variable Programming Interfaces, 255 FAE6 - Structured fields Programming Interfaces, 256 FIELD$ DEFINE-CHOICE FIELDS$, 180 Scenario Instructions, 180 FIELD$ DEFINE-VARIABLE-CHOICE FIELDS$, 180 Scenario Instructions, 180 FIELD$ IS-BINARY-CHOICE FIELDS$, 181 Scenario Instructions, 181 FIELDS$ FIELD$ DEFINE-CHOICE, 180 FIELD$ DEFINE-VARIABLE-CHOICE, 180 FIELD$ IS-BINARY-CHOICE, 181 Scenario Instructions, 180 File Transfer by E-Mail SMTP, 235 File Trasnfer by E-Mail Incoming E-Mail Calls, 235 FILTER Scenario Instructions, 181 Final Scenarios, 157 Firefox Copy, cut and Paste, 118 FOR-EACH-VALUE 302 tags, 51 FOREACH Scenario Instructions, 182 Format of macros.json Macros, 153 Function key management, 47 Function Keys Disable, 48 G EMULATION TYPE HOST4WEB, 267 HOST4WEB Commands, 267 G PAGE NAME HOST4WEB, 267 HOST4WEB Commands, 267 G URL PARAMETER HOST4WEB, 267 HOST4WEB Commands, 267 GENERATE-HTML tags, 36 GENERATE-VARIABLES tags, 41 GENERATE-VIR3270 tags, 41 GET Command Virtel Batch, 243 Virtel Batch Commands, 243 Global level modifications Customization, 131 Global modification Web Access Settings, 77 global-settings property Web Customization, 78 GOTO$ Scenario Instructions, 182 HANDLE$ Scenario Instructions, 182 Handling table variables, 50 Hiding information Customization, 104 Hiding settings Web Customization, 79 Hiding the toolbar Customization, 105 Host managed Chrome Extension, 125 HOST4WEB, 265 2VIRTEL prefix, 265 C AUTO VARIABLES, 265 C KEEP VARIABLES, 265 C KILL VARIABLES, 266 C RETURN, 266 C SCAN NEXT SCREEN, 266 Index Virtel User Guide, Release 4.57 C TERMSESS, 266 C WAIT NEXT SCREEN, 266 Commands, 265 G EMULATION TYPE, 267 G PAGE NAME, 267 G URL PARAMETER, 267 HOST4WEB Commands, 265 Processing conditions, 265 S DIRECTORY, 267 S GLOBAL PAGE, 267 S PAGE, 267 S VARIABLE, 267 HOST4WEB Commands C AUTO VARIABLES, 265 C KEEP VARIABLES, 265 C KILL VARIABLES, 266 C RETURN, 266 C SCAN NEXT SCREEN, 266 C TERMSESS, 266 C WAIT NEXT SCREEN, 266 G EMULATION TYPE, 267 G PAGE NAME, 267 G URL PARAMETER, 267 HOST4WEB, 265 S DIRECTORY, 267 S GLOBAL PAGE, 267 S PAGE, 267 S VARIABLE, 267 How to if running under Virtel Programming Interfaces, 250 HOWTOs, 282 Access Host Application Directly, 288 Change default settings, 293 Change Display Style, 289 Change Font, 289 Change Key Settings, 289 Control APPLIST behaviour, 293 Customize Display Styles, 290 Session Termination, 287 Support a reverse proxy, 293 Support multile Code Pages, 286 Support Virtual Hosting, 293 Use different screen size, 283 Virtel, 283 HTML Template pages, 33 HTTP Protocol Management, 63 Icon display Customization, 107 Identification Scenarios, 156 IF-PRINT-IS-READY tags, 67 Index IF-SECURITY-TOKEN-IS-READY tags, 66 IF-USER-IS-ALLOWED tags, 56 IF$ Scenario Instructions, 183 Import/Export Web Access Settings, 76 Including Parameters Programming Interfaces, 251 Including Specific Terminal Ranges Programming Interfaces, 252 Incoming Calls, 269 Incoming Calls E-Mails, 269 Transactions, 269 Incoming Calls E-Mails Incoming Calls, 269 Incoming E-Mail Calls, 235 File Trasnfer by E-Mail, 235 SMTP, 235 SMTP line Rules, 235 Starting an application by E-Mail, 236 Incoming E-Mails COBOL FAD4 example, 273 FAD4 - Send e-mail from application, 272 Incoming E-mails COBOL FAC8 example, 270 FAC8 - Structured field code 12, 269 FAC8 - Structured field code 13, 270 Transactions, 269 INDSCEN$ Scenario Instructions, 184 Initial Scenarios, 157 Input Scenarios, 157 Inserting configuration values into a template, 54 Inserting host data Template pages, 36 Inserting host data into a template page, 36 Installing a Custom Help Page Customization, 116 Internet Explorer Copy, cut and Paste, 118 INVALID-PFKEYS tags, 48 IP-ADDRESS-OF-LINE tags, 54 IP-PORT-OF-LINE tags, 54 Javascript Customization, 108 Javascript Exits 303 Virtel User Guide, Release 4.57 Customization, 108 keepmacpad W2HParm Settings, 140 Key Mapping Web Access Settings, 75 Key mapping controls Macros, 140 keymapping W2HParm Settings, 140 LABEL$ Instruction Scenarios, 185 Load library Scenarios, 155 local Storage Macros, 140 Macro commands Macros, 153 Macro synchronization Virtel, 146 macroPad W2HParm Settings, 140 Macros, 139 DDI Macro Errors, 154 Dynamic Directories Interface, 146 Format of macros.json, 153 Key mapping controls, 140 local Storage, 140 Macro commands, 153 macros.json file, 140, 146 Managing macros with DDI, 146 Refreshling local macros, 153 Storing the macros, 139 synchronizing Macros, 146 Updating macros at the Group Level, 151 Uploading macros with DDI, 146 Using DDI to store macros, 143 Using Virtel storage for macros, 143 macros.json file Macros, 140, 146 macrosAutoRefresh W2HParm Settings, 145 Make clickable fields Scenarios, 210 MakePDF Printing, 88 Scenarios, 216 Managing macros with DDI Macros, 146 MAP$ MAP$ ABEND, 186 MAP$ AREA, 186 MAP$ BEGIN, 189 304 MAP$ END, 189 MAP$ EVENTUAL-AREA, 190 MAP$ EXECUTE, 191 MAP$ FROM-FIELD, 192 MAP$ FROM-INPUT, 192 MAP$ FROM-VARIABLE, 193 MAP$ TO-VARIABLE, 193 Scenario Instructions, 185 MAP$ ABEND MAP$, 186 Scenario Instructions, 186 MAP$ AREA MAP$, 186 Scenario Instructions, 186 MAP$ BEGIN MAP$, 189 Scenario Instructions, 189 MAP$ END MAP$, 189 Scenario Instructions, 189 MAP$ EVENTUAL-AREA MAP$, 190 Scenario Instructions, 190 MAP$ EXECUTE MAP$, 191 Scenario Instructions, 191 MAP$ FROM-FIELD MAP$, 192 Scenario Instructions, 192 MAP$ FROM-INPUT MAP$, 192 Scenario Instructions, 192 MAP$ FROM-VARIABLE MAP$, 193 Scenario Instructions, 193 MAP$ TO-VARIABLE MAP$, 193 Scenario Instructions, 193 MIME type management, 64 Miscellaneous Web Access Settings, 72 modify_settingsValue Exits, 109 Modifying colors Customization, 105 Modifying the text of the status bar Customization, 111 Modifying Web Access Settings Customization, 114 Multi-Session Scenarios, 209 NAME-OF tags, 54 Index Virtel User Guide, Release 4.57 NO-BLANKS-VALUE tags, 52 NULL-PF pfkField, 49 NUMBER-OF tags, 56 ON-ATTRIBUTE tags, 42 ON-CHARACTER-ATTRIBUTE tags, 43 ON-END-OF-ATTRIBUTE tags, 43 ON-END-OF-CHARACTER-ATTRIBUTE tags, 43, 47 Option mode Customization, 102, 108, 130 OPTION$ OPTION$ FOR-HTTP, 193 OPTION$ FOR-HTTP Example, 198 OPTION$ FOR-IND$FILE, 194 OPTION$ FOR-IND$FILE Examples, 195 OPTION$ FOR-MQ, 196 OPTION$ FOR-QUICKLNK, 196 OPTION$ FOR-SMTP, 197 Scenario Instructions, 193 OPTION$ FOR-HTTP OPTION$, 193 Scenario Instructions, 193 OPTION$ FOR-HTTP Example OPTION$, 198 Scenario Instructions, 198 OPTION$ FOR-IND$FILE OPTION$, 194 Scenario Instructions, 194 OPTION$ FOR-IND$FILE Examples OPTION$, 195 Scenario Instructions, 195 OPTION$ FOR-MQ OPTION$, 196 Scenario Instructions, 196 OPTION$ FOR-QUICKLNK OPTION$, 196 Scenario Instructions, 196 OPTION$ FOR-SMTP OPTION$, 197 Scenario Instructions, 197 Outgoing Calls, 246, 247 Outgoing E-Mails, 247 Transactions, 247 Outgoing E-Mails Outgoing Calls, 247 Outgoing E-mails Transactions, 247 Index Output Scenarios, 157 Page Template File Virtel Batch, 241 Page template for XML output Virte Web Intergration, 227 XML, 227 Parameters $UseCookieSessions$, 22 PrintVirtelSession, 21 ValidateVirtelSession, 21 VirtelSession, 21 Parsing Query Parameters Virtel Web Intergration, 219 Password Encryption Virtel Web Access Security, 277 Password support Virtel Web Access Security, 276 Path name and Virtel directories URL Formats, 14 PCL to PDF conversion Printing, 88 PDF Output Generation Scenarios, 216 PDF-LINES-PER-PAGE tags, 68 PDF-NEW-DOCOPT tags, 68 PDF-NEW-INPUT tags, 68 PDF-NEW-LAYOUT tags, 68 PDF-OUTLINE tags, 68 PDF-PAGE-BREAK tags, 68 PDF-USE-DOCOPT tags, 69 PDF-USE-LAYOUT tags, 69 PDF-VARIABLE tags, 69 PERFORM$ Scenario Instructions, 199 pfkField NULL-PF, 49 Virtel fields, 47 POSITION-OF-THE-CURSOR tags, 46 Positioning Toolbar Icons Customization, 111 POST Command Virtel Batch, 243 305 Virtel User Guide, Release 4.57 Virtel Batch Commands, 243 Presentaion Modes Application Selection Menu, 80 Presentation modules Scenario instructions, 155 Scenarios, 155 Presentation of XML output Virte Web Intergration, 226 XML, 226 Presntation module Virtel Web Modernisation, 155 PRINT tags, 67 Printing 3270 data stream printers LU3, 84 Autoconnect, 86 CICS definitions, 87 MakePDF, 88 PCL to PDF conversion, 88 Scenarios for SCS printing, 88 SCS printers LU1, 84 SCS to PDF conversion, 88 VTAM definitions, 87 Printing with Web Access, 84 PrintVirtelSession Parameters, 21 Processing conditions HOST4WEB, 265 Processing XML Data Scenarios, 221 Virtel Web Intergration, 221 XML, 221 Programming Interfaces COBOL Example, 254 COBOL Example using FAE5, 256 COBOL FAC8 example, 270 COBOL FAD4 example, 273 FA88 - Request data, 253 FAC8 - Retrieve data from email, 269 FAC8 - Structured field code 12, 269 FAC8 - Structured field code 13, 270 FAC8 Structured field, 254 FAC8.06 - Specify Virtel directory, 254 FAC8.07 - Specify template, 254 FAD4 - Send e-mail from application, 272 FAE5 - Send a table variable, 255 FAE5 - Structured fields, 256 FAE6 - Send a table variable, 255 FAE6 - Structured fields, 256 How to if running under Virtel, 250 Including Parameters, 251 Including Specific Terminal Ranges, 252 SRTVIRTEL prefix, 250 Structured Fields, 249 306 Structured Fields Format Example, 249 Write Structured Field command, 249 Programming interfaces, 248 Propagation of signon by URL, 23 PUBLIC-KEY tags, 60 Query input Data Scenarios, 220 Virtel Web Intergration, 220 RAW Command Virtel Batch, 244 Virtel Batch Commands, 244 Read Only Mode Virtel, 145 Redefinition of data fields Virte Web Intergration, 225 XML, 225 Refreshling local macros Macros, 153 Removing effects from a company logo Customization, 106 Removing Toolbar Icons Customization, 110 Return Codes Virtel Batch, 245 Running the VIRTEL batch job Virtel Batch, 242 S DIRECTORY HOST4WEB, 267 HOST4WEB Commands, 267 S GLOBAL PAGE HOST4WEB, 267 HOST4WEB Commands, 267 S PAGE HOST4WEB, 267 HOST4WEB Commands, 267 S VARIABLE HOST4WEB, 267 HOST4WEB Commands, 267 Sample Template pages, 35 SCENARIO Scenario Instructions, 158 Scenario Instruction TOVAR$, 205 Scenario Instructions $DECLARE Examples, 178 ACTION$, 159 ACTION$ DISCONNECT, 159 ACTION$ Examples, 161 ACTION$ REFRESH-TERMINAL, 159 ACTION$ SERVE-ANOTHER_USER, 159 Index Virtel User Guide, Release 4.57 ACTION$ TERMSESS, 160 ACTION$ TO-APPLICATION, 160 ACTION$ TO-TERMINAL, 161 AUTOREFRESH, 214 CASE$, 162 CASE$ Examples, 163 CONVERT$, 164, 165 COPY$, 165 DECLARE and JavaScript functions, 178 DECLARE$, 177 ENDFOR$, 179 ERROR$, 179 FIELD$ DEFINE-CHOICE, 180 FIELD$ DEFINE-VARIABLE-CHOICE, 180 FIELD$ IS-BINARY-CHOICE, 181 FIELDS$, 180 FILTER, 181 FOREACH, 182 GOTO$, 182 HANDLE$, 182 IF$, 183 INDSCEN$, 184 MAP$, 185 MAP$ ABEND, 186 MAP$ AREA, 186 MAP$ BEGIN, 189 MAP$ END, 189 MAP$ EVENTUAL-AREA, 190 MAP$ EXECUTE, 191 MAP$ FROM-FIELD, 192 MAP$ FROM-INPUT, 192 MAP$ FROM-VARIABLE, 193 MAP$ TO-VARIABLE, 193 OPTION$, 193 OPTION$ FOR-HTTP, 193 OPTION$ FOR-HTTP Example, 198 OPTION$ FOR-IND$FILE, 194 OPTION$ FOR-IND$FILE Examples, 195 OPTION$ FOR-MQ, 196 OPTION$ FOR-QUICKLNK, 196 OPTION$ FOR-SMTP, 197 PERFORM$, 199 SCENARIO, 158 SCENARION SUBROUTINE, 209 SCREENS, 159 SCRNEND, 159 SEND$ AS-ANSWER, 200, 201 SEND$ TO, 201 SEND$ TO-LINE, 201 SEND$ VARIABLE-TO, 202 SEND$ VARIABLE-TO-LINE, 202 Sending Query Data with POST, 219 SET$ ENCODING, 203 SET$ PAGE, 203 Index SET$ PAGE-FROM-VARIABLE, 203 SET$ PRIORITY, 204 SET$ SCREEN-POSITION, 204 SET$ SCREEN-POSITION Example, 205 SET$ SIGNON, 204 SET$ TEMPORARY-PAGE, 205 SET$ TRANSACTION, 205 SET$ URL-ENCODING, 205 SUGGEST$, 213 SUGGEST$ installation, 214 SUGGEST$ Page Template, 214 TOVAR$ FROM-FIELD, 206 TOVAR$ FROM-INPUT, 206 TOVAR$ FROM-VARIABLE, 206 VIRSV$ - Allocating buffers, 208 Scenario instructions Presentation modules, 155 Scenario Intructions DEBUG$, 176 DEBUG$ Example, 177 SCENARION SUBROUTINE Scenario Instructions, 209 Scenarios Add calendars to date fields, 211 COMMAREA Conversion Example, 231 Commarea Example, 220 COMMAREA-To-XML Example, 230 Create a list of values for selected field, 210 Extracting Query Data, 220 Final, 157 Identification, 156 Initial, 157 Input, 157 LABEL$ Instruction, 185 Load library, 155 Make clickable fields, 210 MakePDF, 216 Multi-Session, 209 Output, 157 PDF Output Generation, 216 Presentation modules, 155 Processing XML Data, 221 Query input Data, 220 Using MAPGEN, 232 VIRKIX MAP$ Example, 228 Virtel Scenario language, 158 Virtel Web Modernisation, 155 VIRTEL-SUGGEST Function, 212 VSAM Directory, 155 Web Modernisation Scenario Example, 210 XML-To-COMMAREA Example, 229 Scenarios for SCS printing Printing, 88 SCREENS 307 Virtel User Guide, Release 4.57 Scenario Instructions, 159 SCRNEND Scenario Instructions, 159 SCS printers LU1 Printing, 84 SCS to PDF conversion Printing, 88 Security, 275 Virtel Rules, 279 Virtel Web Access Security, 275 SECURITY-TOKEN tags, 66 SEND$ SEND$ AS-ANSWER, 200, 201 SEND$ TO, 201 SEND$ TO-LINE, 201 SEND$ VARIABLE-TO, 202 SEND$ VARIABLE-TO-LINE, 202 SEND$ AS-ANSWER Scenario Instructions, 200, 201 SEND$, 200, 201 SEND$ TO Scenario Instructions, 201 SEND$, 201 SEND$ TO-LINE Scenario Instructions, 201 SEND$, 201 SEND$ VARIABLE-TO Scenario Instructions, 202 SEND$, 202 SEND$ VARIABLE-TO-LINE Scenario Instructions, 202 SEND$, 202 Sending Query Data with POST Scenario Instructions, 219 Virtel Web Intergration, 219 Service Transactions Virtel, 12 Session context management, 34 Session Termination HOWTOs, 287 SESSION-CODE tags, 12, 19, 34, 35, 67, 278 Virtel session, 5 Set value of variable VIRSETVI, 261 Set value of varibale VIRSETV, 259 SET-CONTENT-TYPE tags, 64 SET-COUNTRY-CODE tags, 61 SET-HEADER tags, 65 308 SET-HTTP-RETURN-CODE tags, 63 SET-INITIAL-TIMEOUT tags, 34 SET-LOCAL-OPTIONS tags, 50, 61 SET-MAX-AGE tags, 64 SET-OUTPUT-ENCODING tags, 62 SET-PAGE-CACHEABLE tags, 64 SET-PAGE-NON-CACHEABLE tags, 64 SET$ SET$ ENCODING, 203 SET$ PAGE, 203 SET$ PAGE-FROM-VARIABLE, 203 SET$ PRIORITY, 204 SET$ SCREEN-POSITION, 204 SET$ SCREEN-POSITION Example, 205 SET$ SIGON, 204 SET$ TEMPORARY-PAGE, 205 SET$ TRANSACTION, 205 SET$ URL-ENCODING, 205 SET$ ENCODING Scenario Instructions, 203 SET$, 203 SET$ PAGE Scenario Instructions, 203 SET$, 203 SET$ PAGE-FROM-VARIABLE Scenario Instructions, 203 SET$, 203 SET$ PRIORITY Scenario Instructions, 204 SET$, 204 SET$ SCREEN-POSITION Scenario Instructions, 204 SET$, 204 SET$ SCREEN-POSITION Example Scenario Instructions, 205 SET$, 205 SET$ SIGNON Scenario Instructions, 204 SET$ SIGON SET$, 204 SET$ TEMPORARY-PAGE Scenario Instructions, 205 SET$, 205 SET$ TRANSACTION Scenario Instructions, 205 SET$, 205 SET$ URL-ENCODING Index Virtel User Guide, Release 4.57 Scenario Instructions, 205 SET$, 205 Setting and unsetting local options, 49 Setting Custom Hotspots Customization, 112 Settings modes Web Customization, 79 Signing on using HTML fields Virtel Web Access Security, 278 Signon and password management, 58 Site Customization - Colors and Logo, 102 Site Customization - Javascript Functions, 108 Site Customization - The Help Page, 115 SMTP File Transfer by E-Mail, 235 Incoming E-Mail Calls, 235 SMTP line Rules, 235 Starting an application by E-Mail, 236 SMTP line Rules Incoming E-Mail Calls, 235 SMTP, 235 sources.zip Web Access Settings, 77 SRTVIRTEL prefix Programming Interfaces, 250 Standard Help Page Customization, 115 Starting an application by E-Mail Incoming E-Mail Calls, 236 SMTP, 236 Static Pages URL Formats, 13 Storing the macros Macros, 139 Structured Fields Programming Interfaces, 249 Structured Fields Format Example Programming Interfaces, 249 SUGGEST$ Scenario Instructions, 213 SUGGEST$ installation, 214 SUGGEST$ Page Template, 214 VIRTEL-SUGGEST Function, 212 SUGGEST$ installation Scenario Instructions, 214 SUGGEST$, 214 SUGGEST$ Page Template Scenario Instructions, 214 SUGGEST$, 214 Support a reverse proxy HOWTOs, 293 Support multile Code Pages HOWTOs, 286 Support Virtual Hosting Index HOWTOs, 293 synchronizeVirtelMacros W2HParm Settings, 146 synchronizing Macros Macros, 146 Sysplex distributor Virtel, 145 tags ADD-TO-FIELDS, 44 ADVANCE-TO-THE-NEXT-VALUE-OF, 52 AFTER-NOT-LAST-VALUE, 56 AJAX-SESSION-CODE, 34 COPY-FROM, 37 COUNTRY-CODE, 62 CREATE-VARIABLE-FROM, 37 CREATE-VARIABLE-IF, 58 CURRENT-VALUE-OF, 51 DECLARE-FIELD-AS, 61 DECLARE_FIELD_AS, 59 DEFAULT-FIELD-WITH-CURSOR, 46 DEFINE-AUTOMATIV-COUNTER, 53 DEFINE-DFHMDF-COLUMN, 40 DEFINE-DFHMDF-NAME, 39 DEFINE-HTML-FIELD, 39 DEFINE-HTML-FIELD-NAME, 38 DEFINE-HTML-FOCUS-FIELD, 45 DEFINE-HTML-PFKEY, 47 DEFINE-SUB-VARIABLE, 53 DELETE-ALL-VARIABLES, 54 DO-COUNT-UP-WITH, 52 ENCRYPTION-PARAMETERS, 60 END-DO-COUNT, 53 END-WHEN-EXISTS, 57 END-WHEN-NEXT-EVENT, 57 END-WHEN-NOT-BLANK, 57 END-WHEN-NOT-EXISTS, 57 END-WHILE-EVENT, 57 FOR-EACH-VALUE, 51 GENERATE-HTML, 36 GENERATE-VARIABLES, 41 GENERATE-VIR3270, 41 IF-PRINT-IS-READY, 67 IF-SECURITY-TOKEN-IS-READY, 66 IF-USER-IS-ALLOWED, 56 INVALID-PFKEYS, 48 IP-ADDRESS-OF-LINE, 54 IP-PORT-OF-LINE, 54 NAME-OF, 54 NO-BLANKS-VALUE, 52 NUMBER-OF, 56 ON-ATTRIBUTE, 42 ON-CHARACTER-ATTRIBUTE, 43 ON-END-OF-ATTRIBUTE, 43 309 Virtel User Guide, Release 4.57 ON-END-OF-CHARACTER-ATTRIBUTE, 43, Scenario Instructions, 206 47 TOVAR$, 206 PDF-LINES-PER-PAGE, 68 TOVAR$ FROM-VARIABLE PDF-NEW-DOCOPT, 68 Scenario Instructions, 206 PDF-NEW-INPUT, 68 TOVAR$, 206 PDF-NEW-LAYOUT, 68 Transaction PDF-OUTLINE, 68 Virtel Web Access Security, 276 PDF-PAGE-BREAK, 68 TRansaction level modifications PDF-USE-DOCOPT, 69 Customization, 133 PDF-USE-LAYOUT, 69 Transactions PDF-VARIABLE, 69 Incoming Calls, 269 POSITION-OF-THE-CURSOR, 46 Incoming E-mails, 269 PRINT, 67 Outgoing Calls, 247 PUBLIC-KEY, 60 Outgoing E-mails, 247 SECURITY-TOKEN, 66 Transmission of upload cookie by URL, 23 SESSION-CODE, 12, 19, 34, 35, 67, 278 Transmitting data, 35 SET-CONTENT-TYPE, 64 TSO File Transfer, 90 SET-COUNTRY-CODE, 61 UNSET-LOCAL-OPTIONS SET-HEADER, 65 tags, 50 SET-HTTP-RETURN-CODE, 63 Unviversal transaction, 24 SET-INITIAL-TIMEOUT, 34 Updating macros at the Group Level SET-LOCAL-OPTIONS, 50, 61 Macros, 151 SET-MAX-AGE, 64 Upload SET-OUTPUT-ENCODING, 62 Template pages, 66 SET-PAGE-CACHEABLE, 64 Uploading macros with DDI SET-PAGE-NON-CACHEABLE, 64 Macros, 146 UNSET-LOCAL-OPTIONS, 50 URL Examples USER-SIGNON-CODE, 59 URL Formats, 15 VALID-PFKEYS, 48 URL Formats, 13 WHEN-EXITS, 57 Dynamic Pages, 19 WHEN-NEXT-EVENT, 57 Dynamic URL with parameters, 20 WHEN-NOT-BLANK, 57 Dynamic URL with userdata, 19 WHEN-NOT-EXITS, 57 Path name and Virtel directories, 14 WHILE-EVENT, 57 Static Pages, 13 TCT URL Examples, 15 VSAMTYP=READONLY, 145 Use different screen size Template page upload, 66 HOWTOs, 283 Template pages USER-SIGNON-CODE HTML, 33 tags, 59 Inserting host data, 36 Username retrieval Sample, 35 Virtel Web Access Security, 276 Upload, 66 useVirtelMacros XML, 33 W2HParm Settings, 145 Toolbar color Using DDI to store macros Customization, 103 Macros, 143 TOVAR$ Using MAPGEN Scenario Instruction, 205 Scenarios, 232 TOVAR$ FROM-FIELD, 206 Virtel Web Intergration, 232 TOVAR$ FROM-INPUT, 206 Using Virtel storage for macros TOVAR$ FROM-VARIABLE, 206 Macros, 143 TOVAR$ FROM-FIELD Scenario Instructions, 206 VALID-PFKEYS TOVAR$, 206 tags, 48 TOVAR$ FROM-INPUT 310 Index Virtel User Guide, Release 4.57 ValidateVirtelSession Parameters, 21 VIRKIX VIRKIX MAP$ Example, 228 Virte Web Intergration, 228 VIRKIX MAP$ Example Scenarios, 228 VIRKIX, 228 Virte Web Intergration, 228 VIRSETA Call Interface, 257 VIRSETA Example, 258 VIRSETA Parameters, 257 VIRSETA return codes, 258 VIRSETA Example Call Interface, 258 VIRSETA, 258 VIRSETA Parameters Call Interface, 257 VIRSETA, 257 VIRSETA return codes Call Interface, 258 VIRSETA, 258 VIRSETAI Call Interface, 259 Copy an array, 259 VIRSETAI Example, 260 VIRSETAI parameters, 260 VIRSETAI Example Call Interface, 260 VIRSETAI, 260 VIRSETAI parameters Call Interface, 260 VIRSETAI, 260 VIRSETV Set value of varibale, 259 VIRSETV Example, 259 VIRSETV Parameters, 259 VIRSETV return codes, 259 VIRSETV (CICS) Call Interface, 259 VIRSETV Example Call Interface, 259 VIRSETV, 259 VIRSETV Parameters Call Interface, 259 VIRSETV, 259 VIRSETV return codes Call Interface, 259 VIRSETV, 259 VIRSETVI Call Interface, 261 Set value of variable, 261 VIRSV$ Index VIRSV$ - Allocating buffers, 208 VIRSV$ - Allocating buffers Scenario Instructions, 208 VIRSV$, 208 Virte Web Intergration COMMAREA Conversion Example, 231 COMMAREA-To-XML Example, 230 Example of using XML Data, 224 Page template for XML output, 227 Presentation of XML output, 226 Redefinition of data fields, 225 VIRKIX, 228 VIRKIX MAP$ Example, 228 XML Parser/Generator, 228 XML-To-COMMAREA Example, 229 VIRTEL Build and send structured fields, 261 Call Interface, 261, 263 VIRTEL Example, 261 VIRTEL return codes, 263 Virtel Call interface, 257 capability types, 65 HOWTOs, 283 Logical Pools, 1 Macro synchronization, 146 Read Only Mode, 145 Service Transactions, 12 Sysplex distributor, 145 Web Access, 3 Web Access Overview, 5 Web integration, 11 Web Modernisation, 8 Virtel Batch, 239 Allocating work files, 241 Assembling TCT, 239 Commands, 243 GET Command, 243 Page Template File, 241 POST Command, 243 RAW Command, 244 Return Codes, 245 Running the VIRTEL batch job, 242 VIRTEL Batch Commands, 243 VIRTEL Batch Commands Virtel Batch, 243 Virtel Batch Commands GET Command, 243 POST Command, 243 RAW Command, 244 VIRTEL Example VIRTEL, 261 Virtel fields pfkField, 47 311 Virtel User Guide, Release 4.57 VIRTEL return codes VIRTEL, 263 Virtel Rules Security, 279 Virtel Web Access Security, 279 Virtel Scenario language Scenarios, 158 Virtel session SESSION-CODE, 5 Virtel Structured field FAE5 and FAE6, 50 FAE5 Example, 53 Virtel Studio, 157 Virtel Web Modernisation, 155 Virtel tags, 33 Virtel template pages, 33 Virtel Web Access Security Certificates, 277 Encryption, 277 Entry point security, 275 Password Encryption, 277 Password support, 276 Security, 275 Signing on using HTML fields, 278 Transaction, 276 Username retrieval, 276 Virtel Rules, 279 Virtel Web integration (VWI), 219 Virtel Web Intergration Automatic Scenario Generation, 232 Encoding XML Data, 222 Parsing Query Parameters, 219 Processing XML Data, 221 Query input Data, 220 Sending Query Data with POST, 219 Using MAPGEN, 232 XML Data Transactions, 223 XML nput attrubutes and repeating Groups, 224 Virtel Web Modernisation, 155 390 Object modules, 155 Presntation module, 155 Scenarios, 155 Virtel Studio, 155 VIRTEL-SUGGEST Function Scenarios, 212 SUGGEST$, 212 VirtelSession Parameters, 21 VSAM Directory Scenarios, 155 VSAMTYP=READONLY TCT, 145 VTAM definitions Printing, 87 312 W2HParm Settings keepmacpad, 140 keymapping, 140 macroPad, 140 macrosAutoRefresh, 145 synchronizeVirtelMacros, 146 useVirtelMacros, 145 w2hparm.js Web Access Settings, 77 w2hparm.js defaults Web Customization, 79 w2hparm.js setting Chrome Extension, 125 w2hparmHide setting Web Customization, 79 waaoAddOnHost.js file Chrome Extension, 125 Web Access Virtel, 3 Web Access Overview Virtel, 5 Web Access Settings, 70 Display, 70 Global modification, 77 Import/Export, 76 Key Mapping, 75 Miscellaneous, 72 sources.zip, 77 w2hparm.js, 77 Web Customization global-settings property, 78 Hiding settings, 79 Settings modes, 79 w2hparm.js defaults, 79 w2hparmHide setting, 79 Web integration Virtel, 11 Web Modernisation Virtel, 8 Web Modernisation Scenario Example Scenarios, 210 WHEN-EXITS tags, 57 WHEN-NEXT-EVENT tags, 57 WHEN-NOT-BLANK tags, 57 WHEN-NOT-EXITS tags, 57 when_focusGained Exits, 109 when_focusLost Exits, 109 when_init Index Virtel User Guide, Release 4.57 Exits, 109 WHILE-EVENT tags, 57 Write Structured Field command Programming Interfaces, 249 XML COMMAREA Conversion Example, 231 COMMAREA-To-XML Example, 230 Encoding XML Data, 222 Example of using XML Data, 224 Page template for XML output, 227 Presentation of XML output, 226 Processing XML Data, 221 Redefinition of data fields, 225 Template pages, 33 XML Data Transactions, 223 XML nput attrubutes and repeating Groups, 224 XML Parser/Generator, 228 XML-To-COMMAREA Example, 229 XML Data Transactions Virtel Web Intergration, 223 XML, 223 XML nput attrubutes and repeating Groups Virtel Web Intergration, 224 XML, 224 XML Parser/Generator Virte Web Intergration, 228 XML, 228 XML-To-COMMAREA Example Scenarios, 229 Virte Web Intergration, 229 XML, 229 Index 313

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 321
Page Mode                       : UseOutlines
Author                          : Syspertec Communications
Title                           : Virtel User Guide
Subject                         : 
Creator                         : LaTeX with hyperref package
Producer                        : LuaTeX-1.0.4
Create Date                     : 2018:02:08 14:37:25+01:00
Modify Date                     : 2018:02:08 14:37:25+01:00
Trapped                         : False
PTEX Full Banner                : This is LuaTeX, Version 1.0.4 (MiKTeX 2.9.6350 64-bit)
EXIF Metadata provided by EXIF.tools

Navigation menu