isCOBOL EIS
isCOBOL EIS, Veryant’s solution to write web-enabled COBOL programs, is constantly updated to provide more comprehensive web solutions. In isCOBOL 2019R2 webClient has received many updates, the HTTPClient class can consume existing web services with attachments, and XMLStream has more powerful xml file handling.
webClient enhancements
webClient will now alert the user when an admin or a support user is viewing or recording their session. webClient’s auditing capabilities now log support activities, showing the user name that started viewing, recording, or taking control of the session.
A new option has been added to the application configuration page that allows automatic recording of sessions that are being viewed by authorized support and admin users. With this setting enabled, whenever a user starts viewing a session, it will automatically be recorded.
Session recording can be stopped and resumed multiple times within a support session, allowing finer control of what is being recorded.
HTTPClient improvements
The HTTPClient class is very useful to allow COBOL programs to interact with Web Services. It has been updated to handle Multipart responses by providing several new methods to get the list of received attachments, the list of attribute names for a specific attachment, the values for a specific attribute of a specific attachment, and the content of a specific attachment.
The new methods are shown below:
public void getResponseAttachmentIDs(destination)
public void getResponseAttachmentAttrNames(id, destination)
public void getResponseAttachmentAttr(id, attrName, destination)
public void getResponseAttachmentBody(id, destination)
XML with qualified tag names
New methods have been implemented in the XMLStream class to better handle XML files when namespaces are involved, making it easier to exchange XML files with third parties.
All the existing methods that write XML files now support an optional Boolean parameter that, when set to true, will generate qualified names in the resulting XML.
This following is the list of methods that support the additional writeQualifiedTagNames parameter:
public void write ( Xml-Destination, writeQualifiedTagNames)
public void writeToFile ( Xml-Destination, writeQualifiedTagNames)
public void writeToPrintWriter ( Xml-Destination, writeQualifiedTagNames)
public void writeToStream ( Xml-Destination, writeQualifiedTagNames)
public void writeToStringBuffer (Xml-Destination, writeQualifiedTagNames)
The sample code below shows the difference in generated XML file when using the new method with the writeQualifiedTagNames parameter.
Below is the copy file generated by running stream2wrk utility with the command:
stream2wrk xml book.xml –p book-
 
           >>SOURCE FORMAT FREE
      *> XML File: book.xml
      *>
      *> Generated by isCOBOL
       *> Stream2Wrk options: -p book-
 
       01 book-books identified by 'books' 
                     namespace 'http://somebooksite.com/book_spec'.
          03 book-book identified by 'book' 
                       namespace 'http://somebooksite.com/book_spec' 
                       occurs dynamic capacity book-book-count.
             05 book-title identified by 'title' 
                           namespace 'http://somebooksite.com/book_spec'.
                07 book-title-data pic x any length.
             05 book-author identified by 'author' 
                            namespace 'http://somebooksite.com/book_spec'.
                07 book-author-data pic x any length.
             05 book-email identified by 'email' 
                           namespace 'http://somepublishingsite.com/spec'.
                07 book-email-data pic x any length.
           >>SOURCE FORMAT PREVIOUS
When invoking the write method without specifying the writeQualifiedTagNames parameter:
obj-xml:>write("output1.xml")
or using the equivalent new method with writeQualifiedTagNames set to false:
obj-xml:>write("output3.xml", false)
The XML file created will not contain qualified tag names, as shown below.
<?xml version="1.0" encoding="UTF-8"?>
<books xmlns="http://somebooksite.com/book_spec">
   <book>
      <title>The Dream Saga</title>
      <author>Matthew Mason</author>
      <email xmlns="http://somepublishingsite.com/spec">
          author@sidharta.com.au
      </email>
   </book>
   <book>
      <title>Sherlock Holmes - I</title>
      <author>Arthur Conan Doyle</author>
      <email xmlns="http://somepublishingsite.com/spec">
                    author@GeorgeNewnes.com
                </email>
   </book>
</books>
Invoking the write method with the writeQualifiedTagNames parameter set to true:
obj-xml:>write("output2.xml", true)
will generate an XML file with qualified tag names, as shown below.
<?xml version="1.0" encoding="UTF-8"?>
<ns1:books xmlns:ns1="http://somebooksite.com/book_spec"
           xmlns:ns2="http://somepublishingsite.com/spec">
   <ns1:book>
      <ns1:title>The Dream Saga</ns1:title>
      <ns1:author>Matthew Mason</ns1:author>
      <ns2:email>author@sidharta.com.au</ns2:email>
   </ns1:book>
   <ns1:book>
      <ns1:title>Sherlock Holmes - I</ns1:title>
      <ns1:author>Arthur Conan Doyle</ns1:author>
      <ns2:email>author@GeorgeNewnes.com</ns2:email>
   </ns1:book>
</ns1:books>