The original contents of this page have become obsolete, go to this page for up-to-date information.
From AS/400 to IBM i, advice about programming, operations, and anything else I can think of.
The original contents of this page have become obsolete, go to this page for up-to-date information.
I have a couple of communications asking about how to "correctly" code a data structure to receive the data from and update a data area in the latest, all free, RPG. One of person even sent me their code, which I will be using for the basis for my examples.
While I am not sure if there is just one "correct" way to do this I will be giving my version of the following three scenarios:
I am not going to describe the basics of how to code Data Structures in free format in this post, as I covered this in Defining variables in RPG all free.
The original contents of this page have become obsolete, go to this page for up-to-date information.
In my earlier post Subroutines versus Subprocedures I described some of the advantages of using subprocedures rather than subroutines. In it showed how you could use, what I call "open" subprocedures. An "open" subprocedure does not have a procedure interface specifications, therefore all of the variables defined in the main line/body are available in the subprocedures, and if you change the contents of one of those variables the changed value is seen in the main line/body.
The other type of subprocedure I call "closed". The subprocedure can be passed parameters and can return a single variable, which can be data structure with multiple subfields. A "closed" subprocedure is should be placed in a separate module, therefore, they are now available for multiple program to use. As the main line/body can only change the variables they pass to the subprocedure and the subprocedure can only return one pre-defined variable there is no accidentally changing to the values of the variables.
Many people commented on that post explaining the advantages of the "closed" subprocedure. I do agree and below I will describe how I code them and their advantages, including one potential gotcha.
I was recently browsing a French IBM i website when I found links to two User Groups in France:
They share at forum at www.volubis.fr/forum/
I have added these links to this site's IBM i user groups page. You will find a link to the user groups page at the top of every page of this website.
Are there other user groups/clubs in France or anywhere else in the world? If you know of any not on the user groups page please use the Contact form to send me their details.
I was at a presentation given by Partner/400's Susan Gartner and Jon Paris where, amongst many things, they discussed replacing subroutines in your RPG code with subprocedures.
Having spent the last few weeks using subprocedures in place of subroutines in any new programs I have written, I have been won over to the subprocedure side of the argument.
Let me clarify this post is not about taking code from an existing program and placing it in an external procedure. It is about the differences I found using in-line subprocedures when compared to in-line subroutines. So what were the major differences I found?
I am writing this post in response to several comments that have been made on posts in this blog, discussions threads I have seen in Facebook, and discussions I have had with work colleagues.
The Create Duplicate Object command, CRTDUPOBJ, is used to create a duplicate any object, not just files. But in this post I am just going to cover what I call "data files", physical and logical files.
The myths I have recently encountered are:
There have been no updates to the IBM i Virtual User Group since May of this year, and I have been concern that the group had "died".
After several unsuccessful attempts to make contact with the VUG via their web page, I decided to email Steve Will, Chief Architect of the IBM i operating system, and ask him the status of the group. Below is his reply.
Simon, I got the chance to ask this question to Alison Butterill. She tells me the person who was responsible was an IBMer who is no longer with IBM. She's in the process of looking for a leader -- it could be someone outside IBM, too, since this is really intended to be a User Group.
It’s good news for all of us, and I hope the VUG will be active again soon once a new leader is found.
I received a message from KaBrito about the post Defining SQL tables using a reference file.
Question: How would you do that in some type of a Source Control Management application?
Promote the table to production and then run the Alter table command?
With the move from DDS files to SQL DDL tables this is going to become a frequent asked question.
The web page that was originally linked to no longer exists, therefore, rendering this page obsolete.
Addendum: There is a newer post that includes the new ZLIB save algorithm, you can read it here.
Something that was added to the SAVOBJ and SAVLIB commands in IBM i release 6.1 V5R4 was the ability to compress data more than before when saving to a save file. Previously the only options that were available for the Data Compression parameter was *DEV, *NO, and *YES. With 6.1 V5R4 three new compressions levels were added:
Note: These three values are not valid when saving to tape.
What is the benefit of using any of these Data Compression values?
The new Technical Updates for the latest two releases of IBM i, 7.1 and 7.2, will be available on November 11, 2014.
TR9 for 7.1 includes updates to: