Good day all,
Im not sure as to which forum this belongs. But we have a scenario where we want to extract data from XML file into and adabas file.
I would appreciate help on this issue.
Good day all,
The Natural XML Toolkit can generate a parser (if you can supply a schema for the XML-file)
Then you will have the data in a format that can easily be moved to the Adabas view.
There are multiple ways of skinning this particular cat, from Natural use the
REQUEST DOCUMENT statement if this XML is hosted on a server, or
READ WORK if it really is in a physical file, the XML Toolkit can be used to parse the XML.
An alternative would be to use the Adabas SOA Gateway (which speaks XML “natively”) to get your XML data into Adabas.
Thank you for the reply Finn.
But now here we have Natural 4.27 riding on ADABAS 8.1.
Is the Natural XML toolkit a seperate plug-in that I have to get from Software AG. I am not familiar with it, I would appreciate if you can direct me to some documentation i can use to understand how it works.
No, the XML toolkit is automatically installed with Natural.
The 4.2 documentation is not online anymore, but here you’ll find the 8.2 version which will guide you just as fine.
…to supplement Wolfgang:
It is far more easy to use the XML toolkit from SPOD or even better from NaturalOne if you have these products in the landscape !
Thank you so much for the information. Just to put you on the picture on what I want to achieve.
We have an Oracle database that generates the XML file with personal details of some clients. Now the Oracle system generates the XML file and puts it in a mapped folder which we need to access and extract the data from the
XML file and update our ADABAS database.
Can this be achieved with the RequestDocument or Parse statement/ If not what would be the route to take.
We also have EntireX EXX7.2.2.
There are as Wolfgang mentions several ways to skin this cat
The Request document can make a http-request.
So either expose the Oracle extract (PL/SQL-“something”?) or some mechanism for accessing the XML-files through a webserver. But this would also require a little scripting/programming in order to make the files available only once and deleting them after processing.
Make a batchjob that check every n-minute for files with a specific filemask.
start a natural program to process this
In both cases the PARSE statement can be used to come from XML to Natural variables.
But as I mentioned you will need a schema (XSD), which I am almost sure the Oracle people can provide you with.
Using the Toolkit you can generate a subprogram for parsing the XML that takes a “(A) Dynamic” as input and gives you back a parsed natural record that you can use for moving data into the Adabas view.
Now I do get the picture of what I need to do. When I write a small code with the Request Document and Parse statement I get the following error:
“NAT8319 Natural statements REQUEST DOCUMENT and PARSE disabled”
I have checked in SYSSEC on the library im using and there are no statement restrictions. Where can I enable the statements?
This is controlled via the XML=(…) NATPARM or dynamic parameter.
Beware this may require additional stuff linked to your Natural nucleus, but NAT will tell you
when you start a session with XML=(ON, RDOC=ON,PARSE=ON)
We are trying to implement support for the XML REQUEST DOCUMENT and PARSE facility. This is on a Mainframe running z/VSE operating system.
We use COMPLETE and have made the following changes to our Natural front end nucleus :
On the NFMPRM macro we have added:
On the NTPRM macro we have added :
We have added the following two macros :
In the assembly of the above nucleus we have added :
On the shared nucleus we have added :
When we log on to NATURAL we get a NAT3410: No Natural ICU handler available.
And the natural crashes. The library containing the NATICU module is available at assembly and run time.
Not sure what we are missing.
Did you also follow these steps ?
Having succeded in having natural statement READ DOCUMENT AND PARSE working in our environment, I want to be sure of the concept in reading xml files sitting in a local server and extracting the necessary elements to update our ADABAS files.
So in such cases do we need to setup an HTTP server as we are working with internal data?
I would appreciate a small example of accessing the local server to especially to point my READ DOCUMENT statement and grab the xml file to parse it and update my ADABAS file.