Programming


Practical SQL: DB2 at Home, Part 5, Building Tables with XML PDF Print E-mail
Programming - SQL
Written by Joe Pluta   
Wednesday, 06 May 2015 00:00

XML is great for hierarchical data, but sometimes you still need a plain old table, and this article will show you how to build one.

joe plutaWritten by Joe Pluta

Last time, we took a little segue into creating XML from relational data. Now it's time to return to the other direction, making relational tables from XML data. XML can easily support a complex nested relationship of data with both optional and repeating elements, but that doesn't always translate very well to the relational world in which the data is presented as nice tables of rows and columns. In this article, I'll introduce you to the techniques you can use to turn hierarchies into grids.

Add a comment
Last Updated on Wednesday, 06 May 2015 00:00
Read more...
 
RPG Academy: BIF Up Your Code! Part 5, Easily Find and Replace Text in Strings with BIFs PDF Print E-mail
Programming - RPG
Written by Rafael Victoria-Pereira   
Wednesday, 06 May 2015 00:00

These BIFs help you find and replace text in strings in an easy and, most importantly, readable and maintainable manner. Say goodbye to complex and undecipherable code ridden with MOVELs and CATs op codes.

rafael victoria preiraWritten by Rafael Victória-Pereira

The previous TechTip showed an example of how to insert a piece of text in the middle of an existing string, using both old, traditional and new, BIF-esque approaches. However, it relied on the fact that the program "knew" beforehand where it needed to insert the text, which denotes a certain lack of flexibility. Another problem was the complexity of the code, albeit it was much simpler than the traditional approach, which requires splitting and stitching operations to insert text in the middle of the string.

Add a comment
Last Updated on Wednesday, 06 May 2015 00:00
Read more...
 
User Rating: / 1
PoorBest 
ILE Is for CL Too PDF Print E-mail
Programming - CL
Written by David Shirey   
Wednesday, 15 April 2015 00:00

Over the past 20 years, ILE for RPG has gone from being something new and startling to being almost legacy. Lots of us are now using RPG ILE concepts on a regular basis. But what about CL? Can it be ILE too?

david shireyWritten by David Shirey  

Everyone knows about ILE for RPG.

 

Or at least everyone knows how to spell it, and a lot of people have adopted ILE practices as part of their regular routine. But I don't think the same can be said for CL. While most of us are now doing our programs in QRPGLESRC versus QRPGSRC, how many of those same people are still using QCLSRC for their Command Language source? My guess is quite a few.

Add a comment
Last Updated on Wednesday, 15 April 2015 00:00
Read more...
 
User Rating: / 1
PoorBest 
The API Corner: What Was the Change in This Record? PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 15 April 2015 00:00

Let's discuss some things you should know about flexibly tracking field values.

bruce viningWritten by Bruce Vining

Last month, in So Just What Changed in This Record?, we saw how a program could identify by name each field that was changed by an update operation on a record. We accomplished this using the database trigger support of the IBM i along with the List Record Formats (QUSLRCD) and List Fields (QUSLFLD) APIs. This month, we'll extend that program to display not only the names of the fields changed, but also the original and new values of the field.

Add a comment
Last Updated on Wednesday, 15 April 2015 00:00
Read more...
 
The CL Corner: More on View Flexibility PDF Print E-mail
Programming - CL
Written by Bruce Vining   
Friday, 10 April 2015 00:00

Let's review of some of the SQL functions available.

bruce viningWritten by Bruce Vining

In the February 2015 CL Corner, A More Flexible Interface to the RUNSQL CL Command, we saw how to create a command of our own, CRTSQLVIEW, to create views by utilizing some of the built-in functions provided by the SQL language. The CRTSQLVIEW command removed the need for us to write a custom program per view (which was covered in the January 2015 article Enhancing WRKQRY Reports the Easy Way. These previous articles used the SQL built-in functions of VarChar and DayName to return the mixed-case name of the day for a date field. This month, using CRTSQLVIEW, we'll be looking at additional built-ins that are available to you.

Add a comment

Last Updated on Thursday, 09 April 2015 16:14
Read more...
 
Practical SQL: DB2 at Home, Part 4, Making XML Data PDF Print E-mail
Programming - SQL
Written by Joe Pluta   
Wednesday, 01 April 2015 00:00

We've been using XML data in our relational world; now let's turn the tables.

joe plutaWritten by Joe Pluta

The previous "Practical SQL"articles have followed a theme of accessing your XML data in a relational way. Every article led us a little further down that path, and future articles will continue to do so. I've got a way, for example, to easily create a relational table from an XML document with a single line statement that you'll really love. But for now, I'd like to take a little detour and show the other side of the world: creating XML data from your relational files.

Add a comment
Last Updated on Wednesday, 01 April 2015 00:00
Read more...
 
User Rating: / 1
PoorBest 
RPG Academy: BIF Up Your Code! Part 4, Simplifying String Operations with BIFs PDF Print E-mail
Programming - RPG
Written by Rafael Victoria-Pereira   
Wednesday, 01 April 2015 00:00

You can simplify your code with the set of string-related BIFs presented in this TechTip. Master them and you'll be the one pulling the strings of your code and not the other way around.

rafael victoria preiraWritten by Rafael Victória-Pereira

Working with strings in RPG can be a real pain: all of those MOVE and CAT op codes and work variables with different lengths just to "stitch" the appropriate string together!

Add a comment

Last Updated on Saturday, 04 April 2015 08:07
Read more...
 
User Rating: / 3
PoorBest 
The API Corner: So Just What Changed in This Record? PDF Print E-mail
Programming - APIs
Written by Bruce Vining   
Wednesday, 18 March 2015 00:00

Learn about flexibly tracking field changes.

bruce viningWritten by Bruce Vining

On the IT Knowledge Exchange, Luissimon recently posted, "I need to get which field changed in a file, instead of writing multiple (IF this field changed THEN DO…) for each field in each file. I was wondering if I could use some tool in RPG for doing that?" While I can't say that I'm familiar with an RPG built-in to accomplish this, I can see how using a few system APIs within an RPG application program can meet this need.

Add a comment
Last Updated on Tuesday, 17 March 2015 16:08
Read more...
 
User Rating: / 2
PoorBest 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 1 of 216

WEBCAST

MC Webcast CenterFEATURED WEBCAST

See What i Can Do With Modern RPG Development

Your applications deserve more than just a new look! Change the perception of the IBM i as “old” with modern development tips from IBM and Profound Logic Software.
Watch as Barbara Morris, Brian May and Alex Roytman dive beneath the GUI surface to show the benefits of:

 

  • Working with free-format RPG in IBM i TR7
  • Breaking free from “The Cycle” of traditional RPG development
  • Going beyond the 10 character limit in display and database files
  • And more!

You'll also see a live demonstration of these techniques as the presenters create a modern web application before your eyes! 

 

Watch the Webinar Now!

 

TRIAL SOFTWARE

MS Office Connector for Query/400

NGS' Qport Office enables Windows users to run IBM Query/400 queries to: 

 - Create and update Excel spreadsheets and Access databases

 - Create Word documents

 - Send to Windows screen and PC printers

No query conversion is required. Works with i5/OS V5R1 & above. Installs in minutes!

If you don’t have a budget to replace IBM Query/400, but want your users to have one click enhanced output of their queries.… Request the online license agreement and product download instructions today!

Offer good through December 31, 2013.

   MC-STORE.COM