> Did you mean REXX the "lame" horse? :) Only joking! I was reading 
> about the new "z/OS client web enablement toolkit" which comes with a 
> REXX API for HTTP requests and a JSON
 > serializer/parser 
 > https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ieac100/ieac1-cwe-json.htm.
> It's great that IBM are writing APIs like this to enable languages 
> with limited capabilities to do modern stuff, but I couldn't help thinking 
> that's a lot of faffing around calling multiple services just to yank some 
> data from from a JSON string.  It's interesting to compare that approach to 
> other scripting languages that run just fine on z/OS 
> http://groovy-lang.org/json.html.

We tried using these new APIs. According to the documentation...

...The HTTP/HTTPS protocol enabler portion of the z/OS client web enablement 
toolkit allows z/OS applications running in traditional environments to more 
easily participate as a web services client application...""

 And

"... Programs running as a batch job, as a started procedure, or running in 
almost any address space on a z/OS system can use the toolkit APIs in a similar 
manner to any standard z/OS APIs provided by the operating system..."

But what the documentation forgot to mention is that "almost any address space" 
does not include CICS. The toolkit cannot be used in a CICS environment. Which 
one could argue is one of the most important traditional environments on the 
mainframe.

We also stumbled upon a serious flaw in the JSON parser: you cannot parse any 
JSON that may contain attributes that can occur on different levels under the 
same object: for example:

{"a":1,"A":{"a":2,"b":3}}

If you try to look up the value for "a" in the main object the parser will 
return either 1 (for the attribute a in the root object) or if the root does 
not contain attribute a value 2 (for the attribute in object A). Without any 
indication which attribute was found. There is now way to indicate that you 
want to look for an attribute directly under an object. We reported this to 
IBM. They acknowledged that it is not possible to correctly parse these JSON 
streams but that the parser was "working as designed" and that we should 
register an RFE. We did that a few months ago but have not heard any on that.

Needless to say that we are not very impressed with these new features.

Fred!


-----------------------------------------------------------------
ATTENTION:
The information in this e-mail is confidential and only meant for the intended 
recipient. If you are not the intended recipient, don't use or disclose it in 
any way. Please let the sender know and delete the message immediately.
-----------------------------------------------------------------

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to