Janus Web Legacy XML Support: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<var class="product">Janus Web Legacy XML Support</var> is a variant of <var class="product">[[Janus Web Legacy Support]]</var> that is intended to facilitate programmatic access to legacy <var class="product">Model 204</var> 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 <var class="product">Janus Web Legacy XML Support</var> are not vulnerable to cosmetic changes to pages and so are much more robust (and easier to develop) than traditional [http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping screen scraping] and [http://en.wikipedia.org/wiki/Web_scraping 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.
<var class="product">Janus Web Legacy XML Support</var> is a variant of <var class="product">[[Janus Web Legacy Support]]</var> that is intended to facilitate programmatic access to legacy <var class="product">Model 204</var> 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 <var class="product">Janus Web Legacy XML Support</var> are not vulnerable to cosmetic changes to pages and so are much more robust (and easier to develop) than traditional [http://en.wikipedia.org/wiki/Data_scraping#Screen_scraping screen scraping] and [http://en.wikipedia.org/wiki/Web_scraping 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==
<var class="product">Janus Web Legacy XML Support</var> is part of <var class="product">[[Janus Web Legacy Support]]</var> and so much of what is required to configure one is required for the other. As such, it's probably worth looking at [[Janus Web Legacy Support#Getting_started|getting started with Janus Web Legacy support]]. Conceptually, <var class="product">Janus Web Legacy Support</var> is quite simple &mdash; 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:
<ul>
<li>On the [[JANUS DEFINE]] command for a port.</li>
<li>In a [[JANUS WEB SCREEN]] rule for a port/URL combination.</li>
<li>Via the [[$Web_Screen]] function.</li>
<ul>
When <var>XMLSCREEN</var> 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 <var>SUBSYSMGMT</var> subsystem might be sent as:
<p class="code">&lt;screenOutput sequence="1" cursorField="OPTION"&gt;
  &lt;field name="TITLE" value="SUBSYSMGMT            Subsystem Management Facility            VER 3 REL 2.0I "/&gt;
  &lt;field name="OPTION" value="_"/&gt;
  &lt;field name="ADMIN" value="10. ADMIN"/&gt;
  &lt;field name="NAME" value=""/&gt;
  &lt;field name="SFROM" value=""/&gt;
  &lt;field name="CNAME" value=""/&gt;
  &lt;field name="CFROM" value=""/&gt;
  &lt;field name="USERS" value="N"/&gt;
  &lt;field name="CMD" value=""/&gt;
  &lt;field name="MSG" value=""/&gt;
  &lt;field name="SCLASS" value="6=SYSclass"/&gt;
&lt;/screenOutput&gt;
</p>

Revision as of 23:55, 10 November 2012

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>