|
I don't have experience with YAJL - I see that Scott Klement has a port of it on his site -
http://www.scottklement.com/yajl/ HTH Vern On 5/13/2015 11:25 AM, Kelly Cookson wrote:
Thanks, Jon. This gives me some direction for learning. I'll begin exploring these three options in the order of YAJL, CGICBLDEV2 templating, and rolling our own solution. Thanks, Kelly -----Original Message----- From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris Sent: Wednesday, May 13, 2015 11:15 AM To: Web400@Midrange. Web400 Subject: Re: [WEB400] Does the eRPG SDK template system support JSON? Either: 1) Use the templating built into CGICBLDEV2 to generate the JSON strings or 2) Use YAJL to generate and parse the JSON or 3) Build you own routines. Personally I'd use #2Jon Pariswww.partner400.com www.SystemiDeveloper.com On May 13, 2015, at 8:06 AM, Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote:I don't pretend to understand everything being said, but what I'm hearing is that JSON may be the biggest obstacle to overcome in using COBOL to develop CGI web services. It's important to our shop that we be able to maintain a uniform interface (AJAX HTTP requests, JSON responses) for our web services. What do folks recommend for working with JSON using COBOL on the IBM i? I know there are several JSON tools that have been written with RPG, but the comments on this thread lead me to think we may have difficulty using these RPG tools with COBOL. Are some of these tools more COBOL-friendly than others? Are there any good JSON tools out there written in COBOL? Should we hire a consultant to help us develop an interface between COBOL and the RPG-based tools? Should we hire a consultant to help us develop a JSON tool written in COBOL specifically for our shop? Thanks, Kelly -----Original Message----- From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Kevin Turner Sent: Wednesday, May 13, 2015 2:11 AM To: Web Enabling the IBM i (AS/400 and iSeries) Subject: Re: [WEB400] Does the eRPG SDK template system support JSON? Yes, apart from the fact that cgicbldev2 has no built in JSON support as such - you would have to roll your own. Building JSON strings for output is not difficult - it is parsing inbound JSON strings that is tricky. Sent from my iPadOn 13 May 2015, at 06:28, Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote: The comments in this thread lead me to think that CGICBLDEV2 would better help us leverage our existing COBOL skills because CGICBLDEV2 is written in COBOL, eliminating some of the problems of trying to use CGI packages written in RPG. Am I mistaken in this view? Thanks, Kelly -----Original Message----- From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris Sent: Tuesday, May 12, 2015 3:14 PM To: Web400@Midrange. Web400 Subject: Re: [WEB400] Does the eRPG SDK template system support JSON? For the most part Brad COBOL can do anything that RPG can - but it is more work. Imagine RPG in the "bad old days" without Protos and the CONST keyword. In RPG by using that one facility I can define a field as 60 long and pass a literal, a 20 char field, a varying field, a function, etc. etc. In COBOL I would have to determine that I did indexed need an X(60) - set up a temporary one, and then move the value I wanted into it before passing the parm. Similarly COBOL has no Options(*String) so any C-type function that requires passing a pointer to a null terminated string is a pain in the . And on and on. When I first had to go back and do this stuff "by hand" it may me appreciate just how much work the RPG compiler was doing for me. The COBOL syntax is also rather verbose since without the protos you need to specify the way in which the parm is passed on each call for each parm. Jon Paris www.partner400.com www.SystemiDeveloper.comOn May 11, 2015, at 8:58 PM, Bradley Stone <bvstone@xxxxxxxxx> wrote: I wondered the same thing, Henrick. I haven't done COBOL since the 90s but a search shows this answer from Bruce Vinning: http://itknowledgeexchange.techtarget.com/itanswers/calling-rpg-proc - f rom-cobol-ile/ I guess I just assumed that with ILE things worked as ILE... If CONST ruins that relationship maybe it should be more "publicized". :) I plan too look further into this issue that's for sure as it's the first I've heard of it. Brad www.bvstools.comOn Mon, May 11, 2015 at 2:03 AM, Henrik Rützou <hr@xxxxxxxxxxxx> wrote: I know nothing about COBOL interface to RPG service programs, what is the difference (besides the /copybook) ? On Mon, May 11, 2015 at 5:04 AM, Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote:Thanks Jon. There are a number of tools for mobile development on the IBM i. However, our shop has decided to develop mobile client interfaces using responsive web sites and hybrid apps (Cordorva/PhoneGap). This is because all of our current mobile developers are coming from a background of Microsoft .NET web development. Our shop has spent years developing websites that connect to the IBM i using web services written in .NET and using the .NET Data Provider. For our IBM i COBOL developers (including myself) to become web andmobiledevelopers, we will have to use HTML5, CSS3, JavaScript, AJAX, JSON and Cordova/PhoneGap to develop client interfaces. I was hoping to useNode.JSon the IBM i to give our COBOL developers a path to web services without having to learn .NET. Node.JS isn't going to work for us at this time.Butwe can: (a) use our shop's standard technologies to develop web andmobileclient interfaces, and (b) hook up the client interfaces to web services developed with COBOL CGI programs. This gets our IBM i COBOL developers into web and mobile development without having to learn .NET, and it leverages our existing expertise in COBOL. I have designed an architecture for CGI programming on the IBM i that conforms to REST architectural constraints as described in Fielding's dissertation. I am now gathering information on tools available to helpuswith the COBOL CGI programming. Next step, proof of concepts... Thanks, Kelly -----Original Message----- From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris Sent: Sunday, May 10, 2015 9:36 PM To: Web400@Midrange. Web400 Subject: Re: [WEB400] Does the eRPG SDK template system support JSON? For Mobile development with COBOL you should really take a look atLansa'sLongRange http://www.longrangemobile.com I know that works pretty well with COBOL because I helped translate a few of the RPG examples into COBOL. Jon Paris www.partner400.com www.SystemiDeveloper.comOn May 10, 2015, at 8:00 PM, Kelly Cookson <KCookson@xxxxxxxxxxxx>wrote:I will look for the template system in CGICBLDEV2 when I get itinstalled and start playing around with it.I literally just started looking at CGI tools. I recently learned that our shop will not be adopting Node.JS on the IBM i at any time in the foreseeable future. Kind of a bummer. But the same reasons for not adopting Node.JS make CGI using COBOL programs an attractive alternative. (Every shop is different, and I'm sure Node.JS will work wonderfully for a lot of shops. It's just not a good fit for us at this time.) I'm still committed to helping our IBM i COBOL developers become web and mobile developers as well. ;-) Thanks, Kelly -----Original Message----- From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris Sent: Sunday, May 10, 2015 7:30 PM To: Web400@Midrange. Web400 Subject: Re: [WEB400] Does the eRPG SDK template system support JSON? CGICBLDEV2 uses a template system too Kelly. Jon Paris www.partner400.com www.SystemiDeveloper.comOn May 10, 2015, at 12:55 PM, Kelly Cookson <KCookson@xxxxxxxxxxxx>wrote:Thanks Jon. I am looking at CGICBLDEV2 as well. And I'm looking atother solutions such as the CGI interface to XMLSERVICE and iWebSrv.The thing I like about eRPG SDK is the use of a template system toformat data for return to the client. This seems to me a potentially intuitive way for developers who only do COBOL and DDS to deal with returning JSON data. Still, I am also looking at other options for JSON with COBOL (YAJL, PowerEXT, Redvers COBOL JSPN Interface).The client interfaces we develop will using jQuery AJAX to make GETandPOST requests, and they will be expecting data formatted in JSON as the response. By keep the contract between the client and the web service uniform (AJAX GET and POST requests, JSON responses) we can developclientinterfaces that can easily switch between IBM i back ends and Windowsbackends. We just need to point the client to a new URL to switch back ends. This is one of the benefits of the uniform interface constraint ofRESTfularchitecture.Thanks, Kelly -----Original Message----- From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris Sent: Sunday, May 10, 2015 10:23 AM To: Web400@Midrange. Web400 Subject: Re: [WEB400] Does the eRPG SDK template system support JSON? Kelly, You might want to also look at the COBOL interfaces for CGIDEV2 (http://www.easy400.net/cgicbldev2p/start.pgm).No disrespect to Brad's eRPG but some RPG-oriented interfaces can bevery difficult to use in COBOL. Reason, in part, is that such routinestendto take advantage of the facilities offered by prototypes - for examplethekeyword CONST allows you to specify a literal instead of a variable.COBOLhas no such option and therefore the fields usually need to be passed exactly as specified in the called routine. That usually requires quite a bit more work and makes the examples hard to follow.Giovanni has already done the grunt work and provided documentednativeCOBOL interfaces to CGIDEV2 routines that make it much easier.Just a thought. Unless Brad has added a lot of new stuff to eRPG thatI am unaware of, I think that the capabilities of CGIDEV2 are a closematch.Jon Paris www.partner400.com www.SystemiDeveloper.com On May 10, 2015, at 10:46 AM, Kelly Cookson <KCookson@xxxxxxxxxxxx>wrote:Thanks Brad. I assume I wouldn't have any problems implementing this in ILE COBOL.I've seen several tutorial examples of creating JSON in RPG, which ismadeeasier by built-in functions (like trim) and by the new += assignment operator. Unfortunately, RPG is not a standard language in our shop. SoI'dneed to use eRPG SDK in ILE COBOL.Thanks, Kelly -----Original Message----- From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Bradley Stone Sent: Sunday, May 10, 2015 8:10 AM To: Web Enabling the IBM i (AS/400 and iSeries) Subject: Re: [WEB400] Does the eRPG SDK template system support JSON? Hi, Kelly. The eRPG SDK is a template designed system, so if you create JSONtemplates the eRPG SDK would work the same as if it was using XML, HTML,orpretty much anything else.It doesn't know what type of data you're creating using the templates and replacement variables. :) Brad www.bvstools.com On Sun, May 10, 2015 at 2:15 AM, Kelly Cookson <KCookson@xxxxxxxxxxxx> wrote:Suppose I want to develop a CGI program in ILE COBOL using eRPG SDK. Can the ILE COBOL program read a DB2 table and use the eRPG SDK template system to return a JSON string? Thanks, Kelly Cookson IT Project Leader Dot Foods, Inc. 1.217.773.4486 ext. 12676 kcookson@xxxxxxxxxxxx<mailto:kcookson@xxxxxxxxxxxx> -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- Regards, Henrik Rützou http://powerEXT.com <http://powerext.com/> -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. ___________________________________________ This email has been scanned by iomartcloud. http://www.iomartcloud.com/________________________________ NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected. ---------------------------------------------------------------------- ---------- CoralTree Systems Limited Company Registration Number 5021022. Registered Office: 12-14 Carlton Place Southampton Hampshire SO15 2EA VAT Registration Number 834 1020 74. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400. -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.-- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/web400 or email: WEB400-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.