• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Change XML Elements in SQL

    February 18, 2019 Paul Tuohy

    Over the last few years, it has become more common to store XML or JSON in a column in a table. Whereas SQL provides all the necessary functions to construct/deconstruct XML or JSON from/to relational data, it does not provide an easy means to change the contents of an element. In this article, I am going to demonstrate a technique for changing the contents of an XML element using an SQL stored procedure.

    Just to provide some background, I was recently working on a project where DB2 XML Extender functionality was being replaced with the standard XML functions. The project …

    Read more
  • Scaling Up For Cyber Monday With IBM i

    November 26, 2018 Alex Woodie

    A fulfillment company that’s expected to process millions of transactions on an IBM i server today will lean heavily on a slim layer of RPG-based Web services technology to keep the commerce flowing for its large clients. But there’s nothing stopping the middleware, dubbed iWebSrv, from simplifying data integration for clients in other industries.

    Retailers work all year to ensure they’re ready for the massive surge of traffic that springs up after Thanksgiving. For bricks-and-mortar types, Black Friday is their make-or-break day, while those with an omni-channel bent have Cyber Monday prominently circled on their calendars.

    Consumers are expected to …

    Read more
  • Modernizing IBM i Apps with Microservices

    November 7, 2018 Alex Woodie

    Application modernization means different things to different people. For some, it could be turning a 5250 screen into a Web or mobile interface, or replacing database access with SQL. But for others in the IBM i community, including the vendor OpenLegacy, modernization refers to exposing existing business logic as APIs through a microservices architecture.

    Microservices refers to a software development technique whereby applications are broken down into multiple self-contained components and served via APIs in a loosely coupled but coordinated manner. The main advantage of this approach is each microservice is built independently of others, which can boost productivity and …

    Read more
  • Infor Elaborates on Coleman, IBM i Strategy

    October 10, 2018 Alex Woodie

    When Infor held its annual Inforum conference two weeks ago, the new AI bot Coleman played a big part, but nary an IBM i word was muttered publically. But that shouldn’t come as a concern to the thousands of companies that rely on the company’s IBM i software to run their businesses, Infor’s IBM i strategy Ross Freeman leader says.

    “We heard the same from Syteline customers. They didn’t hear much about Syteline,” says Freeman, who heads up IBM i strategy for the LX, XA, and System 21 ERP product lines. “We have 235 products and we’re all following the …

    Read more
  • Guru: An Introduction to Processing XML With RPG, Part 3

    September 5, 2018 Jon Paris

    Author’s Note: In part 1 and part 2 of this XML series, I introduced you to the basics of using RPG’s XML support. In this tip we begin to explore some of the challenges that you may face when processing commercial XML documents, and the support XML-INTO offers to handle them. In particular we will be reviewing how to ignore parts of the document through the use of the path= %XML option. We will also review how to handle XML documents that make use of namespaces and how to handle XML element names that include characters that are not valid …

    Read more
  • Guru: An Introduction to Processing XML With RPG, Part 2

    August 29, 2018 Jon Paris

    In the first part of this series for Guru Classic, I introduced you to the basics of using RPG’s XML-INTO op-code. In that tip I showed how the provision of a count provided by RPG in the PSDS can be used to determine how many of a repeating element were processed.

    However, as I noted at the time, this can only be used when handling a repeating outer element. But what if there is a repeating element within each of those outer elements? In this second part of the series we will be studying how to handle those situations. …

    Read more
  • Guru: A Bevy of BIFs – %Dec to the Rescue

    August 1, 2018 Susan Gantner

    Author’s Note: This tip was first published back in 2009. I’ve updated the code examples here to use free format declarations. In addition I’ve added the potential use of %ScanRpl, which didn’t exist at the original publication date.

    More and more in RPG applications these days, it seems we need to process data that comes from “the dark side.” Translation: from a non-i system. This data could be coming from a browser screen via an RPG CGI program, from a CSV (comma-separated values) flat file, from an XML or JSON document, or myriad other ways. One thing these dark sources …

    Read more
  • Guru: An Introduction to RPG’s XML-INTO, Part 1

    August 1, 2018 Jon Paris

    Author’s Note: The original version of this article was written in the V6 timeframe and included references to V5R4. References to the V5R4 limitations have been removed from this updated version. I have also updated the data definitions to take into account RPG’s ability for the direct coding of nested data structures rather than having to use LikeDS as before.

    RPG IV’s built-in XML support has been available for some time now, having been originally introduced with V5R4 back in 2006. However, it wasn’t until the advent of V6 with its removal of many of RPG’s size limits that it …

    Read more
  • Guru: RPG’s New DATA-INTO

    June 18, 2018 Jon Paris

    In this tip I’m going to give a brief introduction to the latest addition to the RPG language. The new DATA-INTO op-code. DATA-INTO is IBM’s response to the oft-asked question: “When is IBM going to introduce JSON-INTO so we can process JSON as easily as XML?”

    DATA-INTO provides this capability, but IBM has very cleverly given it functionality that goes way beyond what a simple JSON-INTO op-code could ever have done. DATA-INTO is effectively a cross between XML-INTO and Open Access. Like XML-INTO it uses the names of items and their hierarchy to unpack the document into RPG variables. Like …

    Read more
  • Guru: DB2 For i XML Composition And The IFS

    June 11, 2018 Michael Sansoterra

    Hey, Mike! Regarding Composing An XML Document From Relational Data, Part 1, I have built an XML document using DB2 and i. When I run the query, I get a worthless result set. How do I use the SQL XML functions to get a usable XML file?

    This question comes from reader RA, and he doesn’t exaggerate. The result set from his XML-based query looks like this:

    ....+....1....+....2....+....3....+....4....+
    ************Beginning of data************** 
    
    XMLDATA 
    -------- 
    #CGULIB#
    
      1 RECORD(S) SELECTED.
    
     ************End of Data********************
    

    Notice that DB2 for i does nothing to make the XML attractive to human eyes as the entire XML …

    Read more

Previous Articles Next Articles

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle