.. toctree:: :maxdepth: 3 :caption: Table of Contents: .. _Virtel462UG: ================ User Guide V4.62 ================ |image1| **VIRTEL User Guide** Version : 4.62 Release Date : 23/06/2024. Publication Date : 17/03/2024 Virtel SAS, Syspertec Group 302 Bureaux de la Colline, 92213 Saint Cloud Cedex, France Tél. : +33 (0) 1 46 02 60 42 `www.virtelweb.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 Virtel SAS, is prohibited. Every possible effort has been made by Virtel SAS to ensure that this document is complete and relevant. In no case can Virtel SAS be held responsible for any damages, direct or indirect, caused by errors or omissions in this document. As Virtel SAS 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. "Virtel SAS" 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. .. raw:: latex \newpage .. _V462UG_Introduction: What's new in Virtel 4.62 .. note:: For a full list of changes delivered in Virtel V4.62, see the Virtel Technical Newsletter TN202403: What's new in Virtel 4.62. ***************** The Virtel Engine ***************** Introduction ============ .. index:: pair: Web Access; Virtel 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. |image0| *The Virtel Engine* 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 :ref:`Virtel Batch <#_V462UG_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 :ref:`Virtel URL Formats<#_V462UG_url_formats>`. .. raw:: latex \newpage .. index:: pair: Web Access Overview; Virtel 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 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. .. raw:: latex \newpage Let's look at how VWA works. |vwa_overview| *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. .. raw:: latex \newpage 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_example| *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. .. raw:: latex \newpage .. index:: pair: Web Modernisation; Virtel 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 :ref:`Creating HTML and XML templates <#_V462UG_creating_HTML>`, and the Virtel scenario language described in :ref:`Web Modernisation VIRTEL Scenarios <#_V462UG_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. .. raw:: latex \newpage 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| *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 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. .. raw:: latex \newpage .. index:: pair: Web integration; Virtel 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 home-grown (CICS socket programming) |vwi_overview| *VWI Overview* For more information, refer to the chapter :ref:`“Programming Interfaces” <#_V462UG_programming_interfaces>`. .. _#_V462UG_service_transactions: .. index:: pair: Service Transactions; Virtel pair: SESSION-CODE; tags 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 :ref:`ACTION$ SERVE-ANOTHER-USER <#_V462UG_ACTION$_serve-another-users>` 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. .. raw:: latex \newpage .. _#_V462UG_url_formats: .. index:: URL Formats pair: Static Pages; URL Formats VIRTEL URL Formats ================== 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. |static_pages| *Virtel Static Pages* Virtel stores pages and web elements within VIRTEL directories 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 :ref:`“How the path name corresponds to a VIRTEL directory” <#_V462UG_How_the_path_name>` below for details of how the pathname is 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 :ref:`“Directory Management” <#_V462UG_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. .. _#_V462UG_How_the_path_name: .. index:: pair: Path name and Virtel directories; URL Formats 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 case- sensitive 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:: - 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. .. index:: pair: URL Examples; URL Formats Examples ^^^^^^^^ Assume that entry point WEB2HOST contains the following transactions: |image67| *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:- |image68| *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. 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. |image69| *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:- |image70| *Providing access to a directory through a transactions external name* .. index:: pair: SESSION-CODE; tags pair: Dynamic Pages; URL Formats 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. .. _#_V462UG_dynamic_URL: .. index:: pair: Dynamic URL with userdata; URL Formats 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. 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. .. index:: pair: Dynamic URL with parameters; URL Formats Dynamic URL with parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^ A third form of URL allows one or more parameters to be passed to a transaction by means of an “Identification 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. Parameters can be used to override the Virtel defaults. For example, a different code page is required to the default code page defined in the TCT. The following parameters can be used to override Virtel TCT or session defaults :- LOGMODE Logmode for session ROWS Number of rows COLS Number of columns CODEPAGE codepage USEHTMINI Minitel HTTL support - Yes or No. 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 .. raw:: latex \newpage .. _#_V462UG_session_management: .. index:: single: 3270 session management pair: VirtelSession; Parameters 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 *{{{SESSION-CODE}}}* tag embedded in the template page (see :ref:`“Session And Context Management” <#_V462UG_session_context_mangement>`). .. index:: pair: PrintVirtelSession; Parameters 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 :ref:`“3287 Printing” <#_V462UG_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}}} .. index:: pair: ValidateVirtelSession; Parameters 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 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) .. index:: pair: $UseCookieSessions$; Parameters $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 :ref:`“Site customization of Javascript functions” <#_V462UG_customization_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* .. index:: single: Capability URLs 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 :ref:`“Capability Tokens” <#_V462UG_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 :ref:`“{{{SET-HEADER}}}” <#_V462UG_SET-HEADER>` tag. The code is case-sensitive and so the capitalization must be exactly the same as the generated token. .. _#_V462UG_cookie_upload: .. index:: single: Transmission of upload cookie by URL 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 :ref:`“Uploading HTML Pages” <#_V462UG_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. .. _#_V462UG_signon_propagation: .. index:: single: Propagation of signon by URL 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 :ref:`"({{{USER-SIGNON-CODE}}} tag "<#_V462UG_user-signon-code>`. 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}}} .. index:: single: Unviversal transaction 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. .. raw:: latex \newpage .. _#_V462UG_directory_management: Directory Management ==================== .. index:: single: 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 :ref:`“Uploading HTML Pages” <#_V462UG_uploading_HTML_pages>`. 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. 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:- |image113| *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. |image114| *Directory sub application* The directory management sub-application allows the administrator to define directories. The sub-application 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. 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. 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:- |image71| *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. 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]. Defining directory parameters ----------------------------- To access the detail screen for any directory, place the cursor on the directory name and press [PF12]: |image72| *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. 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: |image73| *Figure 1.8 Directory contents management screen* Associated functions -------------------- Functions are :- 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 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]. 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:- |image115| *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:- |image116| *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. |image117| *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. |image118| *Directory Detail Display* .. raw:: latex \newpage .. _#_V462UG_creating_HTML: .. index:: single: Virtel template pages Creating Virtel Template Pages ============================== .. index:: pair: HTML;Template pages pair: XML;Template pages 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. .. index:: single: Virtel tags 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
                
{{{ 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. .. _#_V462UG_session_context_mangement: .. index:: Session context management 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. .. index:: pair: SESSION-CODE; tags 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 :ref:`“Transmitting Data To The Host” <#_V462UG_transmitting_data>`, and :ref:`“3287 Printing” <#_V462UG_printing>`. .. index:: pair: AJAX-SESSION-CODE; tags 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 }}} .. index:: pair: SET-INITIAL-TIMEOUT; tags SET-INITIAL-TIMEOUT tag ^^^^^^^^^^^^^^^^^^^^^^^ The SET-INITIAL-TIMEOUT tag allows a timeout to be started when VIRTEL builds the page. :: {{{ 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. .. _#_V462UG_transmitting_data: .. index:: single: Transmitting data pair: SESSION-CODE; tags 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 :ref:`“Cursor management” <#_V462UG_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 : ::
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 :index:`template structure example `. :: {{{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. .. _#_V462UG_inserting_host_data: .. index:: single: Inserting host data into a template page pair: Inserting host data; Template pages 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. .. index:: pair: GENERATE-HTML; tags 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 :ref:`“{{{DEFINE-DFHMDF-COLUMN}}}” <#_V462UG_define_dfhmdf_column>`. :: {{{ GENERATE-HTML "name" }}} name symbolic name defined in a previous DEFINE-DFHMDF-NAME or DEFINE-DFHMDF-COLUMN tag. .. index:: pair: COPY-FROM; tags 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-BINARY-ZEROES option is set (see :ref:`“Setting and unsetting local options” <#_V462UG_setting_local_options>`) then binary zeroes will be converted to blanks. .. _#_V462UG_create-variable-from: .. index:: pair: CREATE-VARIABLE-FROM; tags 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. 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 .. index:: pair: DEFINE-HTML-FIELD-NAME; tags 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. :: {{{ 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. .. index:: pair: DEFINE-HTML-FIELD; tags 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. .. index:: pair: DEFINE-DFHMDF-NAME; tags 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 GENERATE-HTML 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" }}} 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. .. _#_V462UG_define_dfhmdf_column: .. index:: pair: DEFINE-DFHMDF-COLUMN; tags 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 GENERATE-HTML 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 DEFINE-HTML-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: :: {{{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. .. index:: pair: GENERATE-VARIABLES; tags 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 :ref:`“Setting and unsetting local options” <#_V462UG_setting_local_options>`) then binary zeroes will be converted to blanks. .. index:: pair: GENERATE-VIR3270; tags 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. :: {{{ 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 | Meaning | Values | +===================+===================+==================================================================+ | vt= | Field type | O = Output, I = Input, A = 3270 attribute, C = Character subspan | +-------------------+-------------------+------------------------------------------------------------------+ | vr= | Row | Row number (first row = 1) | +-------------------+-------------------+------------------------------------------------------------------+ | vc= | Column | Column number (first column = 1) | +-------------------+-------------------+------------------------------------------------------------------+ | vp= | Position | Offset from start of screen (R1C1 = 0) | +-------------------+-------------------+------------------------------------------------------------------+ | vl= | Length | Length of span or subspan | +-------------------+-------------------+------------------------------------------------------------------+ | continuing= | "YES" | 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 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-NO-MATCH-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. .. index:: pair: ON-END-OF-ATTRIBUTE; tags 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-END-OF-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* .. index:: pair: ON-CHARACTER-ATTRIBUTE; tags ON-CHARACTER-ATTRIBUTE tag ^^^^^^^^^^^^^^^^^^^^^^^^^^ If the page template contains ON-CHARACTER-ATTRIBUTE and ON-END-OF-CHARACTER-ATTRIBUTE 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. .. index:: pair: ON-END-OF-CHARACTER-ATTRIBUTE; tags 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) }}} .. index:: pair: ADD-TO-FIELDS; tags 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 (NORMAL,NOCOLOR) class="GREEN" }}} {{{ ADD-TO-FIELDS (INTENSIFIED,NOCOLOR) class="RED" }}} {{{ ADD-TO-FIELDS (BLUE) class="BLUE" }}} {{{ ADD-TO-FIELDS (RED) class="RED" }}} {{{ ADD-TO-FIELDS (PINK) class="PINK" }}} {{{ ADD-TO-FIELDS (GREEN) class="GREEN" }}} {{{ ADD-TO-FIELDS (TURQUOISE) class="TURQUOISE" }}} {{{ ADD-TO-FIELDS (YELLOW) class="YELLOW" }}} {{{ ADD-TO-FIELDS (WHITE) class="WHITE" }}} {{{ ADD-TO-FIELDS (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 :ref:`“Setting and unsetting local options” <#_V462UG_setting_local_options>`). .. note:: The ADD-TO-FIELDS tag affects input fields only .. _#_V462UG_cursor_management: .. index:: single: Cursor management 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-FIELDWITH- CURSOR 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. .. index:: pair: DEFINE-HTML-FOCUS-FIELD; tags 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. :: {{{ FIELD-WITH-CURSOR }}} .. index:: pair: DEFAULT-FIELD-WITH-CURSOR; tags 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-WITH-CURSOR 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)" }}} .. index:: pair: POSITION-OF-THE-CURSOR; tags 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 }}} .. index:: single: Function key management 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. .. _#_V462UG_pfkField: .. index:: pair: ON-END-OF-CHARACTER-ATTRIBUTE; tags .. index:: pair: pfkField; Virtel fields 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. :: .. index:: pair: DEFINE-HTML-PFKEY; tags 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 :: 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 | PfkField value | +====================+===================================================================+ | ENTER | ENTER | +--------------------+-------------------------------------------------------------------+ | CLEAR SCREEN | CLEAR | +--------------------+-------------------------------------------------------------------+ | PA1, PA2, PA3 | PA1, PA2, PA3 | +--------------------+-------------------------------------------------------------------+ | PF1 to PF24 | PF01 to PF24 (variations PF1, F1, F01, P1, P01 are also accepted) | +--------------------+-------------------------------------------------------------------+ | Attention | ATTN | +--------------------+-------------------------------------------------------------------+ *Function key values for pfkField* .. index:: pair: Disable; Function Keys Disallowed function keys ^^^^^^^^^^^^^^^^^^^^^^^^ .. index:: pair: INVALID-PFKEYS; tags 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) }}} .. index:: pair: VALID-PFKEYS; tags 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: :: 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 * .. index:: pair: NULL-PF; pfkField 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 .. _#_V462UG_setting_local_options: .. index:: single: Setting and unsetting local options 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 and GENERATE-VARIABLES tags (see :ref:`“Inserting host application data in a page” <#_V462UG_inserting_host_data>`). 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-BLANKS-VALUE-OF tags (see :ref:`“Handling table variables” <#_V462UG_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 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 ADD-TO-FIELDS tag are not added to clauses generated by the GENERATE-HTML 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-TO-FIELDS 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. .. index:: pair: Sending Query Data with POST; Virtel Web Intergration pair: Sending Query Data with POST; Scenario Instructions 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 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. .. index:: pair: Extracting Query Data; Scenarios 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. .. index:: pair: Commarea Example; Scenarios 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* .. index:: pair: Query input Data; Virtel Web Intergration pair: Query input Data; Scenarios 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. .. _#_VIRT462UG_transaction_detail: :: 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 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 ===> TIOA at logon ===> Signon to CICS&/W&*F34BE9&/A&(&/S VQRY&=MYAREA=&/A&) TIOA at logoff ===> Initial Scenario ===> SCENQRYI Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update P3=Return P12=Server *VIRTEL transaction definition for Query input data* .. _#_V462UG_XML_input_data: .. index:: pair: Processing XML Data; XML pair: Processing XML Data; Virtel Web Intergration 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* .. index:: pair: Processing XML Data; Scenarios pair: Processing XML Data; Virtel Web Intergration 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: :: SCENXMLI SCREENS APPL=SCENXMLI * SCENARIO INITIAL OUTAREA MAP$ BEGIN MAP$ AREA,WITH='screenname',LENGTH=8,TYPE=X PARAMS MAP$ BEGIN,WITH='params' MAP$ AREA,WITH='fieldname',LENGTH=8,TYPE=X MAP$ AREA,WITH='uinput',LENGTH=20,TYPE=X PARAMS MAP$ END OUTAREA MAP$ END * OUTAREA MAP$ FROM-INPUT OUTAREA 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* .. _#_V462UG_sending_XML: .. index:: pair: Encoding XML Data; XML pair: Encoding XML Data; Virtel Web Intergration 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

*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' .. index:: pair: XML Data Transactions; XML pair: XML Data Transactions; Virtel Web Intergration 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 ===> TIOA at logon ===> Signon to CICS&/W&*F34BE9&/A&(&/S VHLP&=MYAREA=&/A&) TIOA at logoff ===> Initial Scenario ===> SCENXMLI Final Scenario ===> Input Scenario ===> Output Scenario ===> SCENXMLO P1=Update P3=Return P12=Server *VIRTEL transaction definition for XML input data* .. index:: pair: XML nput attrubutes and repeating Groups; XML pair: XML nput attrubutes and repeating Groups; Virtel Web Intergration 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* .. index:: pair: Example of using XML Data; XML pair: Example of using XML Data; Virte Web Intergration 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 MAP$ BEGIN MAP$ AREA,WITH='id',LENGTH=5 MAP$ AREA-ATTRIBUTE,VALUEOF='date',LENGTH=8,TYPE=ONLY9 MAP$ AREA-ATTRIBUTE,VALUEOF='type',LENGTH=2 MAP$ AREA-ATTRIBUTE,VALUEOF='numreq',LENGTH=2,TYPE=9 DETAIL MAP$ BEGIN,WITH='part',OCCURS=5 MAP$ 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 DETAIL MAP$ END COMMAREA MAP$ END * COMMAREA MAP$ FROM-INPUT COMMAREA MAP$ TO-VARIABLE,VAR='MYCOMMAREA' SCENARIO END * 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* .. index:: pair: Redefinition of data fields; XML pair: Redefinition of data fields; Virte Web Intergration 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' MAP$ AREA,WITH='itemcode',LENGTH=6,TYPE=9 HEADER MAP$ END * HEADER MAP$ FROM-INPUT,FIELD='MYINPUT' HEADER MAP$ TO-VARIABLE,VAR='MYHEAD' * IF$ VARIABLE,'TRIGGER',EQ='A',THEN=TYPEA IF$ VARIABLE,'TRIGGER',EQ='B',THEN=TYPEB SCENARIO END * TYPEA EQU * DETAILA MAP$ BEGIN,WITH='details' MAP$ AREA,WITH='color',LENGTH=8,TYPE=X MAP$ AREA,WITH='quantity',LENGTH=5,TYPE=9 DETAILA MAP$ END * DETAILA MAP$ FROM-INPUT,FIELD='MYINPUT' DETAILA MAP$ TO-VARIABLE,VAR='MYBODY' SCENARIO END * TYPEB EQU * DETAILB MAP$ BEGIN,WITH='details' MAP$ AREA,WITH='lang',LENGTH=2,TYPE=X MAP$ AREA,WITH='format',LENGTH=8,TYPE=X DETAILB MAP$ END * DETAILB MAP$ FROM-INPUT,FIELD='MYINPUT' DETAILB 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* .. index:: pair: Presentation of XML output; XML pair: Presentation of XML output; Virte Web Intergration 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. 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 SCREENS EXEC=NO SCENARIO 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' SKIP04 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' SKIP05 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' SKIP06 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' SKIP07 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 :ref:`“FAE5” <#_V462UG_FAE5>` structured field, or via the HOST4WEB command :ref:`“SET VARIABLE” <#_V462UG_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. .. index:: pair: Page template for XML output; XML pair: Page template for XML output; Virte Web Intergration 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"}}} {{{END-FOR "ACCTNUM"}}} *Example page template for XML output data* .. _#_V462UG_XML_parser: .. index:: pair: XML Parser/Generator; XML pair: XML Parser/Generator; Virte Web Intergration 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. .. index:: pair: VIRKIX; Virte Web Intergration 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-LENGTH-PREFIX 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'. .. index:: pair: VIRKIX MAP$ Example; VIRKIX pair: VIRKIX MAP$ Example; Scenarios pair: VIRKIX MAP$ Example; Virte Web Intergration 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 MAP$ BEGIN MAP$ AREA,WITH='date',LENGTH=8,TYPE=(ONLY9,LEFT-ALIGNED), * FORMAT=('9999-99-99',9) IDENT 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 IDENT MAP$ END VERIF 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' VERIF MAP$ END MAP$ AREA,WITH='amount',LENGTH=5,TYPE=ONLY9, * FORMAT=('$999.99',9) CAREA MAP$ END *MAP$ statements for VIRTEL XML parser/generator* .. index:: pair: XML-To-COMMAREA Example; XML pair: XML-To-COMMAREA Example; Scenarios pair: XML-To-COMMAREA Example; Virte Web Intergration 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 :ref:`“SCONVXML” <#_V462UG_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 Final Scenario ===> Input 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: .. _#_V462UG_sconvxml: :: Member name SCONVXML SCONVXML SCREENS APPL=SCONVXML SCENARIO INITIAL COPY SCONVMAP (copy member shown in Figure 1 -126) CAREA MAP$ FROM-INPUT CAREA 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: :: 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* .. index:: pair: COMMAREA-To-XML Example; XML pair: COMMAREA-To-XML Example; Scenarios pair: COMMAREA-To-XML Example; Virte Web Intergration 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 :ref:`“SCONVPLA” <#_V462UG_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 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 ===> SCONVPLA Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update P3=Return P12=Server *VIRTEL transaction definition for commarea-to-XML conversion* .. _#_V462UG_sconvpla: .. index:: pair: COMMAREA Conversion Example; XML pair: COMMAREA Conversion Example; Scenarios pair: COMMAREA Conversion Example; Virte Web Intergration The initial scenario for commarea-to-XML conversion is shown below: :: 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 -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* .. index:: pair: Automatic Scenario Generation; Virtel Web Intergration Automatic scenario generation ----------------------------- .. index:: pair: Using MAPGEN; Virtel Web Intergration pair: Using MAPGEN; Scenarios 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) // 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 form-fields, and produces an output commarea. The generated scenario contains a :ref:`“MAP$ FROM-INPUT” <#_V462UG_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 :ref:`“MAP$ FROM-INPUT” <#_V462UG_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 :ref:`“MAP$ FROM-FIELD” <#_V462UG_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 :ref:`“TOVAR$ FROM-INPUT” <#_V462UG_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 :ref:`“MAP$ FROM-VARIABLE” <#_V462UG_MAP$_FROM-VARIABLE>` instruction. '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 :ref:`“MAP$ FROM-FIELD” <#_V462UG_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 :ref:`“Uploading pages by HTTP” <#_V462UG_uploading_HTML_pages>`). .. raw:: latex \newpage .. _#_V462UG_email_incoming: .. index:: single: Incoming E-Mail Calls pair: Incoming E-Mail Calls; SMTP 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) .. index:: pair: SMTP line Rules; SMTP pair: SMTP line Rules; Incoming E-Mail Calls 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: VIRTEL 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=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT 0 IP Subnet ===> 000.000.000.000 Mask ===> 000.000.000.000 1 Host ===> cicsmail@sample.com 1 eMail ===> customer@client.com 0 Calling DTE ===> Calling DTE address 0 Called ===> Called DTE address 0 CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) 0 User Data ===> 0 Days ===> M: T: W: T: F: S: S: 0 Start time ===> H: M: S: End time ===> H: M: S: P1=Update P3=Return Enter=Add P4=Activate P5=Inactivate P12=Entry P. CREATION OK *Rule for routing an incoming e-mail on an SMTP line* .. index:: pair: File Transfer by E-Mail; SMTP pair: File Trasnfer by E-Mail; Incoming E-Mail Calls 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 DEFINITION ---------------------- Applid: VIRTEL 15:52:26 Name ===> SMTP Name this ENTRY POINT (LOGON DATA) Description ===> Receive e-mail for file transfer Transactions ===> SMTP Prefix for associated transactions Videotex key ===> If videotex, keyword or $NONE$ 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 ===> 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 P3=Return P4=Transactions Enter=Add *Entry point for file transfer by SMTP* :: TRANSACTION DETAIL DEFINITION ---------------------- Applid: VIRTEL 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 ===> Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update P3=Return P12=Server *Transaction for file transfer by SMTP* .. index:: pair: Starting an application by E-Mail; Incoming E-Mail Calls pair: Starting an application by E-Mail; SMTP 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. The menu program specified in the entry point must be VIR0021B. :: ENTRY POINT DETAIL DEFINITION ---------------------- Applid: VIRTEL 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 P3=Return P4=Transactions Enter=Add *Entry point for application started by SMTP* :: TRANSACTION DETAIL DEFINITION ---------------------- Applid: VIRTEL 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 ===> Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update 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) 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 :ref:`“Retrieve Data From An E-Mail” <#_V462UG_email_retrieve_data>`). .. raw:: latex \newpage .. _#_V462UG_virtel_batch: .. index:: single: Virtel Batch 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. .. index:: pair: Assembling TCT; Virtel Batch 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, * 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(2) 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,RETRY=2, 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, 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* .. index:: pair: Page Template File; Virtel Batch 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* .. index:: pair: Allocating work files; Virtel Batch 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: :: //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(2) 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* .. index:: pair: Running the VIRTEL batch job; Virtel Batch 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.VIRT462 // 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 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 .. index:: pair: Commands; Virtel Batch These commands are described in the following sections. .. index:: pair: VIRTEL Batch Commands; Virtel Batch VIRTEL Batch commands --------------------- .. index:: pair: GET Command; Virtel Batch pair: GET Command; 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 :ref:`“Virtel URL formats” <#_V462UG_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* .. index:: pair: POST Command; Virtel Batch pair: POST Command; Virtel Batch Commands 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 :ref:`“Virtel URL formats” <#_V462UG_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* .. index:: pair: RAW Command; Virtel Batch .. index:: pair: RAW Command; Virtel Batch pair: RAW Command; Virtel Batch Commands 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 -------------------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. .. index:: pair: Return Codes; Virtel Batch 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. .. raw:: latex \newpage .. index:: single: Outgoing Calls ************** Outgoing Calls ************** .. index:: single: Outgoing Calls pair: Outgoing E-Mails;Outgoing Calls Outgoing E-mails ================ .. index:: pair: Transactions; Outgoing Calls pair: Transactions; 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: VIRTEL 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 ===> Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update 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. .. raw:: latex \newpage .. index:: single: Programming interfaces .. _#_V462UG_programming_interfaces: ********************** 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) .. index:: pair: Structured Fields; Programming Interfaces 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 .. index:: pair: Structured Fields Format Example; Programming Interfaces 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. .. index:: pair: Write Structured Field command; Programming Interfaces 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). .. index:: pair: SRTVIRTEL prefix; Programming Interfaces 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 .. index:: pair: How to if running under Virtel; Programming Interfaces 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. 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) *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 PIC X. 88 THIS-IS-VIRTEL-CALL VALUE 'Y'. 88 THIS-IS-NOT-VIRTEL-CALL 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* .. index:: pair: Including Parameters; Programming Interfaces 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 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* .. index:: pair: Including Specific Terminal Ranges; Programming Interfaces 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: 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 PIC X(8). 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 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* .. index:: pair: FA88 - Request data; Programming Interfaces 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 bytes Length of structured field = 14 + n - 2 bytes Structured field identification code = X'FA88' - 1 bytes X'00' - 1 bytes Flags: X'01' = immediate answer X'04' = send message to terminal - 2 bytes Maximum segment size requested (m) - 4 bytes Offset of requested segment (o) - 2 bytes Length of name (n) - n bytes Name of URL parameter *Format of structured field FA88* The format of the FA88 structured field response returned by VIRTEL is shown below: :: - 2 bytes Length of structured field = 14 + n + x - 2 bytes Structured field identification code = X'FA88' - 1 bytes X'00' - 1 bytes Flags: X'02' = there is more data - 2 bytes Length of segment returned (x) - 4 bytes Number of bytes remaining (r) - 2 bytes Length of name (n) - n bytes Name of variable - x bytes Requested data segment *Format of structured field response FA88* .. index:: pair: FAC8 Structured field; Programming Interfaces 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. .. index:: pair: FAC8.06 - Specify Virtel directory; Programming Interfaces 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 bytes Length of structured field = X'000D' - 2 bytes Structured field identification code = X'FAC8' - 1 bytes Code = X'06' (change VIRTEL directory) - 8 bytes Directory name *Format of structured field FAC8 code 06* .. index:: pair: FAC8.07 - Specify template; Programming Interfaces 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 bytes Length of structured field = variable (n+5) - 2 bytes Structured field identification code = X'FAC8' - 1 bytes Code = X'07' (change HTML page template) - n bytes Page template name *Format of structured field FAC8 code 07* .. index:: pair: COBOL Example; Programming Interfaces 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 FAC8-LONG PIC S9(4) COMP VALUE +5. 05 FAC8-FILL1 PIC X(02) VALUE X'FAC8'. 05 FAC8-FONCTION PIC X(01) VALUE ' '. 05 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. .. index:: pair: FAE5 - Send a table variable; Programming Interfaces pair: FAE6 - Send a table variable; Programming Interfaces 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 :ref:`“Handling table variables” <#_V462UG_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. .. _#_V462UG_FAE5: .. index:: pair: FAE5 - Structured fields; Programming Interfaces 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 Length of structured field = variable - 2 bytes Structured field identification code = X'FAE5' - 1 bytes Length of each value (p) - 1 bytes Length of name (n) - n bytes Name of variable - p bytes Value 1 - p bytes Value 2 - etc *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 bytes Length of structured field = variable - 2 bytes Structured field identification code = X'FAE5' - 1 bytes X'00' - 1 bytes Length of name (n) - n bytes Name of variable - x bytes 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. .. index:: pair: FAE6 - Structured fields; Programming Interfaces 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. .. index:: pair: COBOL Example using FAE5; Programming Interfaces COBOL example using FAE5 ^^^^^^^^^^^^^^^^^^^^^^^^ :: in Working-Storage: 01 FAE5-LONG PIC S9(4) COMP VALUE +0. 01 FAE5-AREA. 05 FAE5-VARIABLE-1. 10 FAE5-SFLENGTH-1 PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAE5'. 10 FAE5-LONG-POSTE-1 PIC X VALUE X'0A'. 10 FAE5-LONG-NOM-1 PIC X VALUE X'08'. 10 FAE5-NOM-1 PIC X(8) VALUE 'VARNAME1'. 10 FAE5-POSTE-1-1 PIC X(10) VALUE 'VALUE1'. 10 FAE5-POSTE-1-2 PIC X(10) VALUE 'VALUE2'. 10 FAE5-POSTE-1-3 PIC X(10) VALUE 'VALUE3'. 05 FAE5-VARIABLE-2. 10 FAE5-SFLENGTH-2 PIC S9(4) COMP VALUE +0. 10 FILLER PIC X(2) VALUE X'FAE5'. 10 FAE5-LONG-POSTE-2 PIC X VALUE X'04'. 10 FAE5-LONG-NOM-2 PIC X VALUE X'08'. 10 FAE5-NOM-2 PIC X(8) VALUE 'VARNAME2'. 10 FAE5-POSTE-2-1 PIC 9(6) VALUE 123. 10 FAE5-POSTE-2-2 PIC 9(6) VALUE 234. 10 FAE5-POSTE-2-3 PIC 9(6) VALUE 457. in the Procedure Division: MOVE LENGTH OF FAE5-VARIABLE-1 TO FAE5-SFLENGTH-1 MOVE LENGTH OF FAE5-VARIABLE-2 TO FAE5-SFLENGTH-2 MOVE LENGTH OF FAE5-AREA TO FAE5-LONG EXEC CICS SEND FROM(FAE5-AREA) LENGTH(FAE5-LONG) STRFIELD END-EXEC *Example of sending structured field FAE5* .. index:: pair: Call interface; Virtel 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. .. index:: pair: VIRSETA; Call Interface 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. .. index:: pair: VIRSETA Parameters; Call Interface pair: VIRSETA Parameters; VIRSETA 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. .. index:: pair: VIRSETA Example; Call Interface pair: VIRSETA Example; VIRSETA 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* .. index:: pair: VIRSETA return codes; Call Interface pair: VIRSETA return codes; 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. Additionally CICS may issue an abend if the EXEC CICS SEND STRFIELD command is unsuccessful. .. index:: pair: VIRSETV (CICS); Call Interface pair: Set value of varibale; VIRSETV 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. .. index:: pair: VIRSETV Parameters; Call Interface pair: VIRSETV Parameters; VIRSETV 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) .. index:: pair: VIRSETV Example; Call Interface pair: VIRSETV Example; VIRSETV 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* .. index:: pair: VIRSETV return codes; Call Interface pair: VIRSETV return codes; 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. .. index:: pair: VIRSETAI; Call Interface pair: Copy an array; VIRSETAI 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. .. index:: pair: VIRSETAI parameters; Call Interface pair: VIRSETAI parameters; VIRSETAI 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 .. index:: pair: VIRSETAI Example; Call Interface pair: VIRSETAI Example; VIRSETAI CALL VIRSETAI example ^^^^^^^^^^^^^^^^^^^^^ :: in Working-Storage: 01 WS-TABLE. 05 WS-ELEMENT PIC X(80) OCCURS 100 TIMES. 77 WS-TESTDATA PIC X(10) VALUE 'TEST DATA'. 77 WS-ELEMSIZE PIC S9(4) COMP SYNC. 77 WS-COUNT PIC S9(4) COMP SYNC. 77 WS-DATALEN PIC S9(4) COMP SYNC. 77 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 RETURNING WS-RC1. IF WS-RC1 NOT EQUAL 0 GO TO ERROR. *Example of VIRTEL Web Integration application using CALL VIRSETAI* .. index:: pair: VIRSETVI; Call Interface pair: Set value of variable; VIRSETVI 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* .. index:: pair: VIRTEL; Call Interface pair: Build and send structured fields; VIRTEL 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) .. index:: pair: VIRTEL; Call Interface pair: VIRTEL Example; VIRTEL 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 'SENDPAGW' TO VIRTEL-FONCTION-FAC8 MOVE 0 TO VIRTEL-CODE-RETOUR-FAC8 MOVE 'WEB2VIRT' TO VIRTEL-PAGE-HTML MOVE 'DEMO ' TO VIRTEL-REPERTOIRE MOVE SPACES TO VIRTEL-FILLER-FAC8 CALL 'VIRTEL' USING DFHEIBLK PARAMETRES-VIRTEL-FAC8 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 'CHP_NUM1' TO VIRTEL-NOM. MOVE 'VAL-001' TO VIRTEL-POSTE-01 MOVE 'VAL-002' TO VIRTEL-POSTE-02. MOVE 'VAL-003' TO VIRTEL-POSTE-03. MOVE 'VAL-004' TO VIRTEL-POSTE-04. MOVE 'VAL-005' TO VIRTEL-POSTE-05. MOVE 'VAL-006' TO VIRTEL-POSTE-06. MOVE 'VAL-007' TO VIRTEL-POSTE-07. MOVE 'VAL-008' TO VIRTEL-POSTE-08. MOVE 'VAL-009' TO VIRTEL-POSTE-09. MOVE SPACES TO VIRTEL-FILLER-FAE6 CALL '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* .. index:: pair: VIRTEL; Call Interface pair: VIRTEL return codes; 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 11 Length of NAME non-numeric 12 Length of VALUE non-numeric 13 Number of values is non-numeric .. raw:: latex \newpage .. _#_V462UG_host4web: .. index:: single: HOST4WEB pair: Commands; HOST4WEB 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 .. index:: pair: Processing conditions; HOST4WEB 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. .. index:: pair: 2VIRTEL prefix; HOST4WEB 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. .. index:: pair: HOST4WEB Commands; HOST4WEB List of commands ^^^^^^^^^^^^^^^^ .. index:: pair: C AUTO VARIABLES; HOST4WEB Commands pair: C AUTO VARIABLES; HOST4WEB 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. .. index:: pair: C KEEP VARIABLES; HOST4WEB Commands pair: C KEEP VARIABLES; HOST4WEB 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. .. index:: pair: C KILL VARIABLES; HOST4WEB Commands pair: C KILL VARIABLES; HOST4WEB 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. .. index:: pair: C RETURN; HOST4WEB Commands pair: C RETURN; HOST4WEB 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. .. index:: pair: C SCAN NEXT SCREEN; HOST4WEB Commands pair: C SCAN NEXT SCREEN; HOST4WEB 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. .. index:: pair: C WAIT NEXT SCREEN; HOST4WEB Commands pair: C WAIT NEXT SCREEN; HOST4WEB C WAIT NEXT SCREEN (Command Wait) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: C WAIT NEXT SCREEN Indicates that the current screen should not be sent to the user yet. .. index:: pair: C TERMSESS; HOST4WEB Commands pair: C TERMSESS; HOST4WEB C TERMSESS (Command Terminate Session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: C TERMSESS Allows a service transaction to request termination of the host application session after the current message has been sent. .. index:: pair: G EMULATION TYPE; HOST4WEB Commands pair: G EMULATION TYPE; HOST4WEB 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. .. index:: pair: G PAGE NAME; HOST4WEB Commands pair: G PAGE NAME; HOST4WEB 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. .. index:: pair: G URL PARAMETER; HOST4WEB Commands pair: G URL PARAMETER; HOST4WEB 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. .. index:: pair: S DIRECTORY; HOST4WEB Commands pair: S DIRECTORY; HOST4WEB 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. .. index:: pair: S GLOBAL PAGE; HOST4WEB Commands pair: S GLOBAL PAGE; HOST4WEB 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. .. index:: pair: S PAGE; HOST4WEB Commands pair: S PAGE; HOST4WEB 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. .. _#_V462UG_set_variable: .. index:: pair: S VARIABLE; HOST4WEB Commands pair: S VARIABLE; HOST4WEB 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. .. raw:: latex \newpage .. index:: single: Incoming Calls ************** Incoming Calls ************** .. index:: single: Incoming Calls pair: Incoming Calls E-Mails;Incoming Calls Incoming E-mails ================ .. _#_V462UG_email_retrieve_data: .. index:: pair: Transactions; Incoming Calls pair: Transactions; Incoming E-mails pair: FAC8 - Retrieve data from email; Programming Interfaces FAC8: Retrieve data from an e-mail ---------------------------------- An application started by an incoming e-mail (see :ref:`“Incomming e-mails” <#_V462UG_email_incoming>`) 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. .. index:: pair: FAC8 - Structured field code 12; Incoming E-mails pair: FAC8 - Structured field code 12; Programming Interfaces 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 - 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). .. index:: pair: FAC8 - Structured field code 13; Incoming E-mails pair: FAC8 - Structured field code 13; Programming Interfaces 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. .. index:: pair: COBOL FAC8 example; Incoming E-mails pair: COBOL FAC8 example; Programming Interfaces COBOL FAC8 example ^^^^^^^^^^^^^^^^^^ Example (in Cobol format) of receiving an e-mail: :: 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 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* .. index:: pair: FAD4 - Send e-mail from application; Incoming E-Mails pair: FAD4 - Send e-mail from application; Programming Interfaces 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 bytes Length of structured field = variable - 2 bytes Structured field identification code = X'FAD4' - n bytes Command code - n bytes 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. 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. .. index:: pair: COBOL FAD4 example; Incoming E-Mails pair: COBOL FAD4 example; Programming Interfaces 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'. 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 LENGTH OF FAD4-COMMANDE-N TO FAD4-SFLENGTH-N MOVE LENGTH OF FAD4-COMMANDE-F TO FAD4-SFLENGTH-F MOVE LENGTH OF FAD4-COMMANDE-CD TO FAD4-SFLENGTH-CD MOVE LENGTH OF FAD4-COMMANDE-S TO FAD4-SFLENGTH-S MOVE LENGTH OF FAD4-COMMANDE-T TO FAD4-SFLENGTH-T MOVE LENGTH OF FAD4-COMMANDE-H TO FAD4-SFLENGTH-H MOVE LENGTH OF FAD4-COMMANDE-C TO FAD4-SFLENGTH-C MOVE LENGTH OF FAD4-AREA TO FAD4-LONG EXEC CICS SEND 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* .. raw:: latex \newpage .. index:: single: Security .. _#_V462UG_security: ******** Security ******** .. index:: pair: Virtel Web Access Security; Security 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. .. index:: pair: Password restrictions; Passphrase restrictions Password and Passphrase constraints ----------------------------------- As of PTF5912 a password credential is considered to be eight characters or less. If the credentials are greater than eight characters, then the credential is considered to be a passphrase. A password cannot be replaced by a passphrase, and equally, a passphrase cannot be replaced by a password. For example, you cannot replace a 8 character password with a 12 character passphrase. .. index:: pair: Entry point security; Virtel Web Access Security 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. |image65| *Example of signon dialog box displayed by browser* .. index:: pair: Transaction; Virtel Web Access Security 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. .. index:: pair: Password support; Virtel Web Access Security 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. .. index:: pair: Username retrieval; Virtel Web Access Security 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. 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. .. _#_V462UG_data_encryption_SSL: .. index:: pair: Encryption; Virtel Web Access Security pair: Encryption; AT-TLS 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. .. index:: pair: Certificates; Virtel Web Access Security pair: Certificates; AT-TLS 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. .. _#_V462UG_password_encryption: .. index:: pair: Password Encryption; Virtel Web Access Security 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 :ref:`“Presentation modes” <#_V462UG_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* .. _#_V462UG_signon_using_HTML: .. index:: pair: Signing on using HTML fields; Virtel Web Access Security 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 DECLARE-FIELD-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: VIRTEL 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 ===> Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update P3=Return P12=Server *HTML security: Example transaction with security type 4* .. index:: pair: SESSION-CODE; tags 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. :: {{{ 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* .. index:: pair: Virtel Rules; Virtel Web Access Security pair: Virtel Rules; Security 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 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: VIRTEL 13:57:53 Name Status Description Entry Point 1HT00100 ACTIVE HTTP access (users authorised by cookie) $COOKIE$ 1HT00200 ACTIVE HTTP access (internal network, working hours) EPINTERN 1HT00900 ACTIVE HTTP access (other users) EPPUBLIC P1=Update P2=Suppress P3=Return P6=1st page P7=Page-1 P8=Page+1 P12=Edit *HTTP security by rule: List of rules* :: DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: VIRTEL 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=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT 0 IP Subnet ===> Mask ===> 0 Host ===> 0 eMail ===> 0 Calling DTE ===> Calling DTE address 0 Called ===> Called DTE address 0 CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) 0 User Data ===> 0 Days ===> M: T: W: T: F: S: S: 0 Start time ===> H: M: S: End time ===> H: M: S: P1=Update P3=Return Enter=Add P4=Activate P5=Inactivate P12=Entry P. CREATION OK *HTTP security by rule: Users authorized by cookie* :: DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: VIRTEL 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 ===> 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 1 IP Subnet ===> 192.168.000.000 Mask ===> 255.255.000.000 0 Host ===> 0 eMail ===> 0 Calling DTE ===> Calling DTE address 0 Called ===> Called DTE address 0 CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) 0 User Data ===> 1 Days ===> M: X T: X W: X T: X F: X S: S: 1 Start time ===> H: 08 M: 30 S: 00 End time ===> H: 17 M: 30 S: 00 P1=Update P3=Return Enter=Add P4=Activate P5=Inactivate P12=Entry P. *HTTP security by rule: Internal network, working hours* :: DETAIL of RULE from RULE SET: S-SMTP ------------- Applid: VIRTEL 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=IGNORE 1=IS 2=IS NOT 3=STARTS WITH 4=DOES NOT 5=ENDS WITH 6=DOES NOT 0 IP Subnet ===> 000.000.000.000 Mask ===> 000.000.000.000 0 Host ===> 0 eMail ===> 0 Calling DTE ===> Calling DTE address 0 Called ===> Called DTE address 0 CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) 0 User Data ===> 0 Days ===> M: T: W: T: F: S: S: 0 Start time ===> H: M: S: End time ===> H: M: S: P1=Update P3=Return Enter=Add P4=Activate P5=Inactivate P12=Entry P. *HTTP security by rule: Other users* .. raw:: latex \newpage .. index:: single: HOWTOs ****** HOWTOs ****** .. index:: pair: HOWTOs; Virtel pair: Use different screen size; HOWTOs 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 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 H4W commands ? ===> 0=no 1=yes 2=if2VIRTEL 4=auto Logon message ===> TIOA at logon ===> TIOA at logoff ===> Initial Scenario ===> Final Scenario ===> Input Scenario ===> Output Scenario ===> P1=Update P3=Return P12=Server *Example of TSO transaction TSO specifying logmode SNX32705* The URL to access this transaction could be of the format: :: http://10.20.170.71:41001/w2h/WEB2AJAX.htm+Tso5 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://10.20.170.71:41001/w2h/WEB2AJAX.htm+Tso+model5 This form of a VIRTEL URL is described in the section :ref:`“Dynamic URL with user data” <#_V462UG_dynamic_URL>`. 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: VIRTEL 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 0 IP Subnet ===> Mask ===> 0 Host ===> 0 eMail ===> 0 Calling DTE ===> Calling DTE address 0 Called ===> Called DTE address 0 CUD0 (Hex) ===> First 4 bytes of CUD (X25 protocol) 0 User Data ===> model5 0 Days ===> M: T: W: T: F: S: S: 0 Start time ===> H: M: S: End time ===> H: M: S: P1=Update P3=Return Enter=Add P4=Activate P5=Inactivate 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 ===> Enforced Entry Point 2nd relay ===> RHTIM500 Possible 2nd relay (Printer) Terminal type ===> 3 1=LU1 2=3270 3=FC P=Printer S=Scs Compression ===> 2 0, 1, 2 or 3 : compression type Possible Calls ===> 3 0=None 1=Inbound 2=Outbound 3=Both Write Stats to ===> 12 1,4=VIRSTAT 2=VIRLOG Repeat ===> 0020 Number of generated terminals P1=Update P3=Return Enter=Add P12=Server *Definition of model 5 terminals in the W2HPOOL pool* 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://10.20.170.71:41001/w2h/WEB2AJAX.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 of the ENTRY POINT (not the transaction definition). Also, the transaction definition must not have a LOGMODE= value. 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://10.20.170.71:41001/w2h/WEB2AJAX.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. .. index:: pair: Support multile Code Pages; HOWTOs 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. 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://10.20.170.71: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 - 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. 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. .. index:: pair: Session Termination; HOWTOs 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. 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 :ref:`“Virtel URL formats” <#_V462UG_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. 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 the definition of the entry point associated with the HTTP line or the entry point selected by the rules of the line. The “Last page” field indicates the name of the page to be displayed following disconnection from the host application. The indicated file must be uploaded to the same directory as specified in the URL for the host application (for example W2H-DIR if the URL specifies /w2h/WEB2AJAX.htm). 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.) 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: VIRTEL 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 P3=Return P4=Transactions Enter=Add *Example of entry point with last page* .. index:: pair: Access Host Application Directly; HOWTOs 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 :ref:`“Virtel URL formats” <#_V462UG_url_formats>` of this manual, and “Connection/Disconnection Scripts” in the VIRTEL Connectivity Reference manual. 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://10.20.170.71: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. 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://10.20.170.71: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 :ref:`“Virtel URL formats” <#_V462UG_url_formats>`. .. index:: pair: Change Font; HOWTOs How To Change The Font For Web Access ===================================== The :ref:`“Web Access settings menu” <#_V462UG_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. .. index:: pair: Change Display Style; HOWTOs How To Change The 3270 Display Style ==================================== The :ref:`“Web Access settings menu” <#_V462UG_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. .. index:: pair: Change Key Settings; HOWTOs 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 :ref:`“Web Access settings menu” <#_V462UG_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. 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; .. _#_V462UG_customize_display: .. index:: pair: Customize Display Styles; HOWTOs 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. Add or remove a display style ----------------------------- To add a new display style, you must : - Create a CSS file with a “.css” extension name, - 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. Ensure that the string “/w2h/custom-css” doesn’t end with slash /. - Create (or modify) a customized javascript 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. Ensure that the string “/w2h/custom-js” doesn’t end with a slash /. :: /*===================================================================== * * 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* .. _#_V462UG_customize_print: 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 * *====================================================================*/ /* * 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* 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 } } 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. .. index:: pair: Change default settings; HOWTOs How To Change The Default User Settings ======================================= The site default settings for Web Access are stored in the file w2hparm.js (see :ref:`“Global modification of Web Access settings” <#_V462UG_global_modifications>`) .. index:: pair: Support a reverse proxy; HOWTOs 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). .. index:: pair: Support Virtual Hosting; HOWTOs 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. .. index:: pair: Control APPLIST behaviour; HOWTOs 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. .. 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 :ref:`"Virtel Customization Modes"<#_V462UG_customizing_with_option>` on how to set up customising with the options mode. .. index:: pair: Left align text; HOWTOs Left align text =============== To display languages which require left alignment, such as a character set where no monospace font is available, Thailand for example, set the W2HPARM option "leftalignpage" to true. By default, W2H displays centres each line when the font is not exactly monospace. Aligning left may give a better display. .. index:: pair: Special UNICODE character support; HOWTOs Special UNICODE character support ================================= Some UNICODE characters have no EBCDIC equivalent and are translated to an equivalent value. Curly quotes are an example. These are translated to striaght quotes. To disable this translation set the W2HPARM option "unicodereplactiv" to false. .. index:: pair: Square bracket support; HOWTOs Square Bracket Support ====================== Characters [ and ] may be incorrectly displayed on the MVS console. The character set used natively by the MVS console is CP1047. For this reason, VIRTEL uses this codepage to write its messages to the console. To be able to view [] from VWA, the codepage IBM1047 must be used. If this is not the default Virtel codepage (as specified in the TCT), it can be forced directly in the calling URL: :: http://10.20.170.71:41001/w2h/WEB2AJAX.htm+Tso?codepage=IBM1047 The entry point must refer to a scenario allowing to process the contents of the URL variable CODEPAGE. By default the SCENLOGM scenario can be used.If another identification scenario is implemented, it must contain the following lines: :: COPY$ INPUT-TO-VARIABLE,FIELD='CODEPAGE', * VAR='CODEPAGE' IF$ NOT-FOUND,THEN=NOCODEPG SET$ ENCODING,UTF-8,'*CODEPAGE' ******** Appendix ******** Appendix A ========== .. _#_V462UG_w2hparm_defaults: Default values for W2H parameters --------------------------------- +-----------------+-----------------------+---------------------------------------------------+ | Keyword | Caption | Possible values | +=================+=======================+===================================================+ |"fontsize" | Font size | "window", "screen", "8", "10", "12", "14", "16" | +-----------------+-----------------------+---------------------------------------------------+ |"font" | Font family | "font name" | +-----------------+-----------------------+---------------------------------------------------+ |"autocapture" | Auto-capture | true, false | +-----------------+-----------------------+---------------------------------------------------+ |"autoprint" | Auto-print | true, false | +-----------------+-----------------------+---------------------------------------------------+ |"cursor" | Cursor "Bar", | "Blink", "Block", "Smart" | +-----------------+-----------------------+---------------------------------------------------+ |"vline" | Vertical line | true, false | +-----------------+-----------------------+---------------------------------------------------+ |"hline" | Horiz line | true, false | +-----------------+-----------------------+---------------------------------------------------+ |"esc" | Esc key | "no", "ATTN", "CLEAR", "Reset" | +-----------------+-----------------------+---------------------------------------------------+ |"ctrl" | Ctrl key | "no", "ENTER", "Newline" | +-----------------+-----------------------+---------------------------------------------------+ |"cmdleft" | Left Cmd key | "no", "Reset" | +-----------------+-----------------------+---------------------------------------------------+ |"cmdright" | Right Cmd key | "no", “ENTER" | +-----------------+-----------------------+---------------------------------------------------+ |"enter" | Enter key | "ENTER", "Newline" | +-----------------+-----------------------+---------------------------------------------------+ | "home" | Home key | "no", "Home" | +-----------------+-----------------------+---------------------------------------------------+ | "end" | End key | "no", "ErEof", "End" | +-----------------+-----------------------+---------------------------------------------------+ | "pgup" | PageUp key | "PF7", "PF19", "PA1", "no" | +-----------------+-----------------------+---------------------------------------------------+ | "pgdn" | PageDown key | "PF8", "PF20", "PA2", "no" | +-----------------+-----------------------+---------------------------------------------------+ | "pause" | Pause key | "CLEAR", "ATTN", "PA3", "no" | +-----------------+-----------------------+---------------------------------------------------+ | "kpenter" | Keypad Enter | "ENTER", "Newline" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftenter" | Shift+Enter | "no","ENTER", "Newline" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftesc" | Shift+Esc | "no", "ATTN", "CLEAR", "Reset" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftins" | Shift+Insert | "no", "Dup" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftdel" | Shift+Delete | "no", "ErEof" | +-----------------+-----------------------+---------------------------------------------------+ | "shifthome" | Shift+Home | "no", "FieldMark", "Home" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftend" | Shift+End | "no", "ErEof", "End" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftpgdn" | Shift+PageDown | "no", "PA3" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftjoker" | Shift+Joker | "no", "Reset", "ATTN", "CLEAR", "Ins" | +-----------------+-----------------------+---------------------------------------------------+ | "ctrlenter" | Ctrl+Enter | "no","ENTER", "Newline" | +-----------------+-----------------------+---------------------------------------------------+ | "ctrlins" | Ctrl+Insert | "no", "PA1" | +-----------------+-----------------------+---------------------------------------------------+ | "ctrldel" | Ctrl+Delete | "no", "PA2", "ErEof" | +-----------------+-----------------------+---------------------------------------------------+ | "ctrlhome" | Ctrl+Home | "no", "PA3", "Home", "ChgCur" | +-----------------+-----------------------+---------------------------------------------------+ | "ctrlend" | Ctrl+End | "no", "ErEof", "End" | +-----------------+-----------------------+---------------------------------------------------+ | "ctrlr" | Ctrl+Right | "no", "Refresh" | +-----------------+-----------------------+---------------------------------------------------+ | "altenter" | Alt+Enter | "no", "MirrorToggle" | +-----------------+-----------------------+---------------------------------------------------+ | "altshift" | Alt+Shift | "RTLinput", "no" | +-----------------+-----------------------+---------------------------------------------------+ | "altins" | Alt+Ins | "no", "PA1" | +-----------------+-----------------------+---------------------------------------------------+ | "althome" | Alt+Home | "no", "PA2" | +-----------------+-----------------------+---------------------------------------------------+ | "altjoker" | Alternate Joker | "no", ""no", "ATTN", "CLEAR", "PA3" | +-----------------+-----------------------+---------------------------------------------------+ | "altpgup" | Alt+PageUp | "no", "PA1" | +-----------------+-----------------------+---------------------------------------------------+ | "altpgdn" | Alt+PageDown | "no", "PA2" + +-----------------+-----------------------+---------------------------------------------------+ | "altpause" | Alt+Pause | "no", "ATTN", "CLEAR", "PA3" | +-----------------+-----------------------+---------------------------------------------------+ | "altf1" | Alt+F1 | "no", "PA1", "ENTER" | +-----------------+-----------------------+---------------------------------------------------+ | "altf2" | Alt+F2 | "no", "PA2" | +-----------------+-----------------------+---------------------------------------------------+ | "altf3" | Alt+F3 | "no", "PA3", "ChgCur" | +-----------------+-----------------------+---------------------------------------------------+ | "kpslash" | Keypad / | "/", "PA1" | +-----------------+-----------------------+---------------------------------------------------+ | "kpaster" | Keypad * | "*", "PA2" | +-----------------+-----------------------+---------------------------------------------------+ | "kpminus" | Keypad - | "-", "Backtab" | +-----------------+-----------------------+---------------------------------------------------+ | "kpplus" | Keypad + | "+", "Tab", "Newline" | +-----------------+-----------------------+---------------------------------------------------+ | "kpdot" | Keypad . | ".", "," | +-----------------+-----------------------+---------------------------------------------------+ | "dblclick" | Double Click | "Word", "ENTER", "no" | +-----------------+-----------------------+---------------------------------------------------+ | "urlhotspot" | URL hotspots | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "pfkhotspot" | PF key hotspots | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "inputhotspot" | Input field hotspots | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "pasteereof" | Paste erase EOF | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "pastetyping" | Map Ctrl+V to Paste | true, false | | | by Typing | | +-----------------+-----------------------+---------------------------------------------------+ | "movecursor" | Move cursor on activat| true, false | +-----------------+-----------------------+---------------------------------------------------+ | "style" | Style | "3270", "gray", "white", "3270classic" | +-----------------+-----------------------+---------------------------------------------------+ | "printstyle” | Print style | "3270", "color", "white" | +-----------------+-----------------------+---------------------------------------------------+ | "rtm" | Response time monitor | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "omitnulls" | Omit nulls from input | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "keepmacpad" | Keep macro pad open | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "keepkeypad" | Keep keypad open | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "hiliteinput" | Highlight input fields| true, false | +-----------------+-----------------------+---------------------------------------------------+ | "caretnot" | Remap ^ to logical not| true, false | +-----------------+-----------------------+---------------------------------------------------+ | "adaptfontratio"| Adapt font size ratio | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "charspace" | Character spacing | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "linespace" | Line spacing | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "settingsGUI" | Uuser interface type | v2 | +-----------------+-----------------------+---------------------------------------------------+ | "preservein" | Preserve insert mode | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "nolongpoll" | AsynchSupport | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "MirrorMode" | BiDirectional mode | false, true | +-----------------+-----------------------+---------------------------------------------------+ | "NOstretch" | Font Size Stretch | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "joker" | Jokey Key | "no", "Reset", "ATTN", "CLEAR" | +-----------------+-----------------------+---------------------------------------------------+ | "jokerkey" | Jokey Key Value | 222,value | +-----------------+-----------------------+---------------------------------------------------+ | "unicodereplactiv" | Convert UNICODE | true, false | +-----------------+-----------------------+---------------------------------------------------+ | "leftalignpage" | Align text to left | false, true | +-----------------+-----------------------+---------------------------------------------------+ | "mousewheeldn" | Allocate mouse wheel | "PFn", "no" | | | down. Default=PF8 | | +-----------------+-----------------------+---------------------------------------------------+ | "mousewheelup" | Allocate mouse wheel | "PFn", "no" | | | up. Default=PF7 | | +-----------------+-----------------------+---------------------------------------------------+ | "inhibAppendCopyPasteMode" | Force copy/paste in replace mode | false, true | | | and hide toolbar butttons | | +-----------------+-----------------------+---------------------------------------------------+ | "backspace" | Backspace | "no", "Backtab", "Newline", "Ins" | +-----------------+-----------------------+---------------------------------------------------+ | "shiftbackspace | SHIFT+Backspace | "no", "Backtab", "CLEAR", "Ins" | +-----------------+-----------------------+---------------------------------------------------+ | "escapeGraphicChars" | Escape Graphics | false, true | +-----------------+-----------------------+---------------------------------------------------+ | "hideinfo" | Hide Server info. | false, true | +-----------------+-----------------------+---------------------------------------------------+ | "macroPad" | Macros in Window | false, true | +-----------------+-----------------------+---------------------------------------------------+ | "pasteCursor" | Move cusor when paste.| false, true | +-----------------+-----------------------+---------------------------------------------------+ | "preserveinsmode" | Keep INS mode | false, true | +-----------------+-----------------------+---------------------------------------------------+ | "show3278T" | 3278T ICON in toolbar | false, true | +-----------------+-----------------------+---------------------------------------------------+ | "showFTP" | FTP ICON in toolbar | false, true | +-----------------+-----------------------+---------------------------------------------------+ *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. 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. 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. 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 .. |image0| image:: images/media/overview.png .. |image1| image:: images/media/logo_virtel_web.png :scale: 50 % .. |image4| image:: images/media/image4.png :width: 5.13354in :height: 3.56187in .. |image5| image:: images/media/image5.png .. |image6| image:: images/media/image6.png .. |image7| image:: images/media/image7.png .. |image8| image:: images/media/image8.png .. |image9| image:: images/media/image9.png .. |image10| image:: images/media/image10.png .. |image11| image:: images/media/image11.png .. |image12| image:: images/media/image12.png .. |image13| image:: images/media/image13.png .. |image14| image:: images/media/image14.png .. |image15| image:: images/media/image15.png .. |image16| image:: images/media/image16.png :width: 0.22500in :height: 0.22500in .. |image17| image:: images/media/image17.png :width: 0.22500in :height: 0.22500in .. |image18| image:: images/media/image18.jpeg :width: 0.22500in :height: 0.22500in .. |image19| image:: images/media/image19.png :width: 4.0in :height: 5.5in .. |image20| image:: images/media/image20.png :width: 4.0in :height: 5.5in .. |image21| image:: images/media/image21.png :width: 4.0in :height: 5.5in .. |image22| image:: images/media/image22.png :width: 4.0in :height: 5.5in .. |image27| image:: images/media/image27.png .. |image28| image:: images/media/image28.png .. |image30| image:: images/media/image30.jpeg .. |image31| image:: images/media/image31.jpeg .. |image32| image:: images/media/image32.jpeg .. |image33| image:: images/media/image33.jpeg .. |image34| image:: images/media/image34.jpeg .. |image35| image:: images/media/image35.jpeg .. |image36| image:: images/media/image36.jpeg .. |image37| image:: images/media/image37.jpeg .. |image38| image:: images/media/image38.png .. |image39| image:: images/media/image39.png .. |image40| image:: images/media/image40.png .. |image41| image:: images/media/image41.png .. |image42| image:: images/media/image42.jpeg .. |image43| image:: images/media/image43.jpeg .. |image44| image:: images/media/image44.jpeg .. |image45| image:: images/media/image45.jpeg .. |image46| image:: images/media/image46.png .. |image47| image:: images/media/image47.png .. |image48| image:: images/media/image48.jpeg .. |image49| image:: images/media/image49.jpeg .. |image50| image:: images/media/image50.jpeg .. |image51| image:: images/media/image51.jpeg .. |image52| image:: images/media/image52.png .. |image53| image:: images/media/image53.jpeg .. |image54| image:: images/media/image54.jpeg .. |image55| image:: images/media/image55.png .. |image56| image:: images/media/image56.png .. |image57| image:: images/media/image57.png .. |image58| image:: images/media/image58.png .. |image59| image:: images/media/image59.png :width: 1.95686in :height: 1.92531in .. |image59a| image:: images/media/image59a.png :width: 1.95686in :height: 1.92531in .. |image60| image:: images/media/image60.png :width: 1.95686in :height: 1.93583in .. |image61| image:: images/media/image61.png :width: 1.96740in :height: 1.94635in .. |image62| image:: images/media/image62.jpeg :width: 0.34375in :height: 0.40625in .. |image63| image:: images/media/image63.png :width: 0.34375in :height: 0.33333in .. |image63a| image:: images/media/image63a.png :scale: 70 .. |image63b| image:: images/media/image63b.png :scale: 50 .. |image64| image:: images/media/image64.png :scale: 70 .. |image65| image:: images/media/image65.png .. |image66| image:: images/media/image66.png .. |image67| image:: images/media/image67.png .. |image68| image:: images/media/image68.png .. |image69| image:: images/media/image69.png .. |image70| image:: images/media/image70.png .. |image71| image:: images/media/image71.png .. |image72| image:: images/media/image72.png .. |image73| image:: images/media/image73.png .. |image74| image:: images/media/image74.png .. |image75| image:: images/media/image75.png .. |image76| image:: images/media/image76.png .. |image77| image:: images/media/image77.png .. |image78| image:: images/media/image78.png .. |image79| image:: images/media/image79.png .. |image80| image:: images/media/image80.png .. |image81| image:: images/media/image81.png .. |image82| image:: images/media/image82.png .. |image83| image:: images/media/image83.png :width: 15.0cm :height: 9.0cm .. |image84| image:: images/media/image84.png :width: 15.0cm :height: 9.0cm .. |image85| image:: images/media/image85.png :width: 15.0cm :height: 9.0cm .. |image86| image:: images/media/image86.png .. |image87| image:: images/media/image87.png .. |image88| image:: images/media/image88.png .. |image89| image:: images/media/image89.png .. |image90| image:: images/media/image90.png .. |image91| image:: images/media/image91.png .. |image92| image:: images/media/image92.png .. |image93| image:: images/media/image93.png .. |image94| image:: images/media/image94.png .. |image95| image:: images/media/image95.png .. |image96| image:: images/media/image96.png .. |image97| image:: images/media/image97.png .. |image98| image:: images/media/image98.png .. |image105| image:: images/media/image105.png .. |image106| image:: images/media/image106.png .. |image107| image:: images/media/image107.png .. |image108| image:: images/media/image108.png .. |image109| image:: images/media/image109.png .. |image110| image:: images/media/image110.png .. |image111| image:: images/media/image111.png .. |image112| image:: images/media/image112.png .. |image113| image:: images/media/image113.png .. |image114| image:: images/media/image114.png .. |image115| image:: images/media/image115.png .. |image116| image:: images/media/image116.png .. |image117| image:: images/media/image117.png .. |image118| image:: images/media/image118.png .. |image119| image:: images/media/image119.png .. |image120| image:: images/media/image120.png .. |vwa_overview| image:: images/media/vwa_overview.png .. |vwm_overview| image:: images/media/vwm_overview.png .. |vwi_overview| image:: images/media/vwi_overview.png .. |static_pages| image:: images/media/static_pages.png .. |vwa_example| image:: images/media/vwa_example.png