Tag Archives for " #JSON "

RPG Example reading JSON using JSON_TABLE from IFS

Decode JSON webservice reply data (already stored in IFS) using JSON_TABLE This reads the JSON from the IFS – decodes it using JSON_TABLE and reports on time taken to perform decode. In this case the JSON data is a simple layout that looks like this: {“users”:[{“userID”:”@123″,”firstName”:”Billy”,”lastName”:”Bob”,”initials”:”123″,”company”:110,”division”:30,”department”:325,”secProfile”:””},{“userID”:”AAATEMP”,”firstName”:”Albert”,”lastName”:”Smith”,”initials”:”AAA”,”company”:110,”division”:1,”department”:1,”secProfile”:””},{“userID”:”AAATEST”,”firstName”:”Andy”,”lastName”:”Tester”,”initials”:”AAA”,”company”:110,”division”:1,”department”:530,”secProfile”:”AAT”},{“userID”:”AAA3″,”firstName”:”Fred”,”lastName”:”Blogs”,”initials”:”AA3″,”company”:110,”division”:1,”department”:1,”secProfile”:”AAA”},{“userID”:”AATEST”,”firstName”:”AA”,”lastName”:”TEST”,”initials”:”AAT”,”company”:110,”division”:1,”department”:1,”secProfile”:””},{“userID”:”ABB”,”firstName”:”Abba”,”lastName”:”Dancing Queen”,”initials”:””,”company”:110,”division”:1,”department”:1,”secProfile”:””},{“userID”:”BINGBONG”,”firstName”:”Bing”,”lastName”:”Bong”,”initials”:”BB”,”company”:110,”division”:2,”department”:2,”secProfile”:””},{“userID”:”LITTENN”,”firstName”:”Nick”,”lastName”:”Litten”,”initials”:”NJL”,”company”:001,”division”:1,”department”:123,”secProfile”:”Secret Squirrel”}]} This JSON example contains the values: USERID […]

 
Continue reading

RPG Example reading JSON using YAJL from IFS

Decode JSON webservice reply data (already stored in IFS) using YAJL This reads the JSON from the IFS – decodes it using Y.A.J.L and reports on time taken to perform decode. Writing an RPG program to read JSON using YAJL is actually pretty straightforward — I hope this code example helps! In this case the […]

 
Continue reading

RPG example: store webservice reply XML or JSON in IFS

As an RPG Programmer you are probably writing a ton of code to talk to remote webservices out there in internet land. If you are just leaning webservice programming – here is a simple RPG CODE EXAMPLE which talks to a remote webservice (using the open source HTTP API) and stores the reply from the webserice […]

 
Continue reading

IBM i Webservices Primer – SOAP or REST?

AS400 or iSeries webservices – Primer If you are reading this it’s probably because you are researching webservices, perhaps looking for an IBM i Webservices Primer and googled something like “what is the difference between SOAP and REST on IBM i webservices – please help me I am going insane“? http://bfy.tw/9ON0 Dont worry – help is […]

 
Continue reading

Web Services for Dummies

What are webservices? Broadly speaking “Web Services” are programs that let one computer system talk to another computer system over the internet. For example, you might want to enter customer details into a office computer system and have those customer details be checked on an online ‘address checking’ website or something similar. Today, Web Services […]

 
Continue reading

An introduction to iSeries webservices

Web Services With Cobol Or RPG on IBM ISeries – Restful Php Web Services 1. Introduction Web Services and SOAP (or REST) are rapidly becoming state-of-art architectural approaches to allow the access of multiplatform and multilanguage systems, Many companies have legacy applications which represent a high investment and Web Services promise to allow their access […]

 
Continue reading

What is a webservice and how does it work on an AS400, iSeries or IBM i Server?

A Web Service is a program that talks to *something* on the WEB. You might be asking yourself “What is a webservice?” or “What is an AS400 webservice?”. First of all, I am not going to rant about how its not an AS400 webservice, nor is it an iSeries webservice — it’s an IBM i […]

 
Continue reading