Programming


SQL 101: String-Related Functions, Part 2 - Changing Case of a String Without %XLATE and More PDF Print E-mail
Programming - SQL
Written by Rafael Victoria-Pereira   
Friday, 05 February 2016 00:00

RPG provides a few ways to replace characters in a string, such as the %XLATE BIF. SQL also has interestingand, more importantly, easy to usefunctions to transform strings, changing the case of its characters or replacing them altogether.

rafael victoria preiraWritten by Rafael Victória-Pereira

The previous article in this series discussed a set of scalar functions you can use to convert data to its representation in string format. Once this data is in string format, you can use it with text information from your files in order to create descriptions or other texts, which you can use in reports. However, these texts might require a different type of conversion; their case might not be the most adequate, or you might want to replace a character somewhere in the middle of the string. I could argue that his is also a conversion, albeit a different one.

Add a comment
Last Updated on Friday, 05 February 2016 16:54
Read more...
 
User Rating: / 1
PoorBest 
Practical RPG: Work Files and EXTFILE PDF Print E-mail
Programming - RPG
Written by Joe Pluta   
Wednesday, 03 February 2016 00:00

Sometimes the only answer to a problem is a work file, and ILE RPG makes it really easy to use one.

joe plutaWritten by Joe Pluta

Work files aren't exactly sexy. With it being so easy to embed SQL into RPG, work files seem absolutely passé. Even back in the olden days, the joy of OPNQRYF allowed us to avoid the need for work files. (If you find yourself suddenly twitching and muttering to yourself, take a breath; this article is not about OPNQRYF!) Today we revisit the concept of work files and see where they still makes sense and just how easily they fit into the new world of ILE.

Add a comment
Last Updated on Tuesday, 02 February 2016 10:31
Read more...
 
RPG Academy: /FREE Your Code – What the Most-Used Operation Codes Look Like in Free-Format PDF Print E-mail
Programming - RPG
Written by Rafael Victoria-Pereira   
Wednesday, 03 February 2016 00:00

It's time for a few more examples of free-format code, which help you memorize the coding rules and will speed up your transition to this new coding style.

rafael victoria preiraWritten by Rafael Victória-Pereira

The previous TechTip introduced the rules you need to abide by to write code in free-format and provided a simple example. This time around, I'll provide additional examples and discuss a few important things you'll need to keep in mind while coding in this new way.

Add a comment
Last Updated on Monday, 01 February 2016 15:36
Read more...
 
How Much Do You Really Know About Modern RPG Programming? PDF Print E-mail
Programming - RPG
Written by Rafael Victoria-Pereira   
Wednesday, 20 January 2016 00:00

ILE RPG and free-format have been around for years. However, not everyone is taking advantage of these and other features of modern RPG. Take the quiz below and find out how much you really know about modern RPG programming.

rafael victoria preiraWritten by Rafael Victória-Pereira

Modern RPG implies modular and structured programming techniques: using modules and service programs, procedures, functions, and so on. However, using procedures and functions generally requires passing parameters between them. That's where things can start to get a bit complicated. Unexpected errors start occurring after a function call, and after hours of fruitless investigation, you finally realize that the function call changed a value it shouldn't have. There are two keywords, VALUE and CONST, to prevent that from happening. That brings us to the first question of this quiz:

Add a comment
Last Updated on Wednesday, 20 January 2016 00:00
Read more...
 
User Rating: / 2
PoorBest 
New Year's Resolutions for RPG Programmers PDF Print E-mail
Programming - RPG
Written by David Shirey   
Wednesday, 20 January 2016 00:00

It's that time of the year again for us to resolve how this year will be different from last. So what should be at the top of the list for the modern IBM i professional?

david shireyWritten by Dave Shirey

OK, I know that traditionally we make our New Year's resolutions at the end of December so that we can jump right on them in the new year, so these are a bit belated. But that's OK because by now you've abandoned your resolutions to lose weight, get in shape, stop chewing smokeless tobacco, and a dozen other things that you pledged to three weeks ago.

Add a comment
Last Updated on Wednesday, 20 January 2016 00:00
Read more...
 
Book Review: Evolve Your RPG Coding: Move from OPM to ILE ... and Beyond PDF Print E-mail
Programming - RPG
Written by Joe Pluta   
Friday, 08 January 2016 00:00

This book provides an amazingly comprehensive introduction to the concepts while at the same time delivering enough technical detail to make you productive very quickly.

joe plutaWritten by Joe Pluta

If you've read anything written by Rafael Victória-Pereira, you know that no matter the subject, his writing has two fundamental attributes: it's informative and insightful. His new book, Evolve Your RPG Coding: Move from OPM to ILE ... and Beyond, delivers on both those levels, providing a wide array of concrete information while at the same time guiding you to an intuitive understanding of how to use all this new knowledge in your day-to-day programming efforts. This unique combination makes the book a must-have for anyone beginning the journey to ILE programming.

Add a comment
Last Updated on Friday, 08 January 2016 00:00
Read more...
 
User Rating: / 1
PoorBest 
Practical SQL: VALUES and DB2 Services PDF Print E-mail
Programming - SQL
Written by Joe Pluta   
Wednesday, 06 January 2016 00:00

Using a combination of SQL and new services, DB2 continues to be an RPG programmer’s best friend.

joe plutaWritten by Joe Pluta

In a previous article, I introduced you to a powerful SQL statement, VALUES. This statement allows you to write a single line of code in an SQLRPGLE program to execute an SQL statement or function and return the result to your program.

 

VALUES is a very powerful technique that allows you to take advantage of all of the standard SQL functions such as MIN/MAX, UCASE/LCASE, mathematical functions and so onthings that in RPG require either more work or access to the C libraries. VALUES can also quickly execute an aggregate statement to get, for example, a count or the greatest value in a set. These features are all very useful and can be used in any SQL environment; one of the great features of SQL is that what you learn anywhere tends help you everywhere.

Add a comment
Last Updated on Wednesday, 06 January 2016 15:25
Read more...
 
RPG Academy: /FREE Your Code - It's /FREE, But It Has Rules PDF Print E-mail
Programming - RPG
Written by Rafael Victoria-Pereira   
Wednesday, 06 January 2016 00:00

If you read the previous article of this series and concluded that the pros outweigh the cons, it's now time to learn the rules of coding in free-format. Don't worry, they're few, and most are common sense!

rafael victoria preiraWritten by Rafael Victória-Pereira

For the compiler to correctly validate and compile your code, there are a few rules that you have to follow, just like the fixed positions that you already know. These rules will become so natural over time that you won't even think about them. Let's review the rules one by one, and then look at a simple code sample:

Add a comment
Last Updated on Wednesday, 06 January 2016 08:59
Read more...
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Page 1 of 222

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