|
Programming -
RPG
|
|
Written by James Buck
|
|
Wednesday, 19 June 2013 00:00 |
|
If you use the free-format specification, good standards will result automatically.
Written by Bryan Meyers and Jim Buck
Editor's Note: This article is an excerpt from the book Programming in RPG IV, 4th Edition.
At current releases, RPG IV is primarily a free-format language, especially in the area of calculation processing. While it's not perfect, the free-format specification effectively renders the traditional fixed-format Calculation specification obsolete. IBM has introduced many new RPG IV features exclusively in free format.
|
|
Last Updated on Wednesday, 19 June 2013 00:00 |
|
Read more...
|
|
Programming -
RPG
|
|
Written by Joe Pluta
|
|
Wednesday, 05 June 2013 00:00 |
|
You want to use LOBs in your RPG program but don't know where to start; read this article to find out how!
Written by Joe Pluta
In the first article in this series, I identified situations where it is preferable to store stream data in a database rather than in the IFS. Specifically in my case, I had literally millions of stream files proliferating in the IFS and causing some real processing issues. My alternative was to store the stream files in the database. Implementing LOBs is not difficult, but it does require a number of steps, many of which may be unfamiliar to most of us.
|
|
Last Updated on Wednesday, 05 June 2013 00:00 |
|
Read more...
|
|
Programming -
RPG
|
|
Written by Junlei Li
|
|
Wednesday, 05 June 2013 00:00 |
|
Learn how to access database files via the UFCB. This practical example repairs invalid data in OPEN fields due to DBCS character truncation in a random database file.
Written by Junlei Li
Programs written in IBM i high-level languages (HLLs) such as RPG are bound to files they access statically, or in other words, at compile time. However, in VRM610, RPG was enhanced to allow passing files as parameters to RPG programs and procedures (see File Parameters). The enhancement makes accessing files from RPG more flexible, but RPG still cannot access a file as dynamically as the record I/O routines of the C library—for example, it can't open a file by name and then get the record length of the opened file, which is needed to perform further file I/O.
|
|
Last Updated on Wednesday, 05 June 2013 00:00 |
|
Read more...
|
|
Programming -
RPG
|
|
Written by Joe Pluta
|
|
Wednesday, 01 May 2013 00:00 |
|
The IFS is a great place to store stream files but it has some serious limitations. This series of articles presents an alternative.
Written by Joe Pluta
Recently, several different requirements ended up colliding in a way that led me to do a lot of research on using Large Objects (LOBs) in my RPG programs. While they require a little bit of extra up-front investment, LOBs provide a way to integrate large-scale use of stream file data into your enterprise system.
|
|
Last Updated on Wednesday, 01 May 2013 00:00 |
|
Read more...
|
|
Programming -
RPG
|
|
Written by Juan Macias
|
|
Wednesday, 17 April 2013 00:00 |
|
When a file contains variable-length fields, the data of the fixed-length fields of its deleted records can still be retrieved.
Written by Juan Macias
A known technique to retrieve the records deleted from a file consists of saving the file to a save file and extracting the records from the save file. This technique is based on the fact that, in many cases, the records of the file are stored in the save file, maintaining their format, apart from a status byte added by the system at the beginning of each record.
|
|
Last Updated on Wednesday, 17 April 2013 00:00 |
|
Read more...
|
|
Programming -
RPG
|
|
Written by Junlei Li
|
|
Wednesday, 03 April 2013 00:00 |
|
Learn how to ensure the validity of extended character string assignment via the CPYECLAP instruction.
Written by Junlei Li
IMHO, high-level languages (HLLs) in IBM i do not treat character strings containing double-byte character set (DBCS) characters seriously enough. For example, assigning a long character string containing DBCS characters to a shorter character variable using the EVAL operation code of RPG would probably truncate the DBCS data in the source string and therefore lead to an invalid result character string.
|
|
Last Updated on Monday, 01 April 2013 12:59 |
|
Read more...
|
|
Programming -
RPG
|
|
Written by Joe Pluta
|
|
Wednesday, 06 March 2013 00:00 |
|
As we move to service programs, OPM RPG programs get left out in the cold, but creative parameter use can keep them in the mix until you get a chance to convert them.
Written by Joe Pluta
Encapsulating business logic is all about parameters. In the first article in this series, I covered optional parameters. In the second article, I introduced service programs into the mix by using a service program as an adapter to an existing RPG program with a complex parameter list. Service programs are the underlying building block for most advanced architectures on the IBM i. They allow you to group together related logic and then expose it to the outside world in many ways.
|
|
Last Updated on Wednesday, 27 February 2013 15:01 |
|
Read more...
|
|
Programming -
RPG
|
|
Written by Junlei Li
|
|
Wednesday, 06 March 2013 00:00 |
|
Learn a basic authority-related technique along with a practical Print Private Authorities utility.
Written by Junlei Li
In IBM i, there are authority special values defined at the OS level, which are used by authority-related CL commands and APIs, and there are other authority special values defined at the Machine Interface (MI) level, which are used by Authorization Management MI instructions. The meanings of these two sets of authority values are almost identical; however, their representations are far different from each other.
|
|
Last Updated on Monday, 04 March 2013 12:42 |
|
Read more...
|
|
|