Janus Web Legacy XML Support

From m204wiki
Revision as of 23:55, 10 November 2012 by Alex (talk | contribs)
Jump to navigation Jump to search

Janus Web Legacy XML Support is a variant of Janus Web Legacy Support that is intended to facilitate programmatic access to legacy Model 204 3270 applications. This is accomplished by converting 3270 screens into XML that contains the names and values of the screen fields, and accepting updates to these screens as XML that contains the names and updated values of the screen fields. Because screen field names are used for screen retrieval and update, programs that access 3270 screens via Janus Web Legacy XML Support are not vulnerable to cosmetic changes to pages and so are much more robust (and easier to develop) than traditional screen scraping and web scraping applications. And, delivery of 3270 screens over an HTTP connections means that they can be access via any of a large number of HTTP APIs available in most modern programming environments.

Getting Started

Janus Web Legacy XML Support is part of Janus Web Legacy Support and so much of what is required to configure one is required for the other. As such, it's probably worth looking at getting started with Janus Web Legacy support. Conceptually, Janus Web Legacy Support is quite simple — when a 3270 Read Screen is issued on a Janus Web thread, that screen is automatically converted to XHTML.

To have the screen be converted instead to more program-friendly XML, the XMLSCREEN setting must be enabled on the thread on which the 3270 Read Screen was issued. This can be done a number of ways:

  • On the JANUS DEFINE command for a port.
  • In a JANUS WEB SCREEN rule for a port/URL combination.
  • Via the $Web_Screen function.
    • When XMLSCREEN processing is set, a 3270 screen read is converted into non-HTML XML that contains the names and values of all named fields on the 3270 screen. For example, the first page of the SUBSYSMGMT subsystem might be sent as:

      <screenOutput sequence="1" cursorField="OPTION"> <field name="TITLE" value="SUBSYSMGMT Subsystem Management Facility VER 3 REL 2.0I "/> <field name="OPTION" value="_"/> <field name="ADMIN" value="10. ADMIN"/> <field name="NAME" value=""/> <field name="SFROM" value=""/> <field name="CNAME" value=""/> <field name="CFROM" value=""/> <field name="USERS" value="N"/> <field name="CMD" value=""/> <field name="MSG" value=""/> <field name="SCLASS" value="6=SYSclass"/> </screenOutput>