Monday, December 15, 2014

User Group: COMMON Luxembourg

common luxembourg user group

I have added a link to COMMON Luxembourg’s website to this site's IBM i user groups page.

Their site is at www.common.lu (you do need the www)

If you know of a user group that is not listed on the user groups page please use the Contact form, on right, to send me its details.

Thursday, December 11, 2014

IBM i 7.2 Redbook is out

ibm i 7.2 redbook

After being teased last week with a video of Steve Will, Chief Architect for the IBM i, talking about IBM i 7.2 and TR1 the first Redbook for 7.2 was been released yesterday afternoon.

It can be download from IBM's Redbook website here (17.3 MB).

It has chapters covering the following subjects:

  1. Introduction to IBM i 7.2
  2. Systems management
  3. Cloud and virtualization
  4. Security
  5. Networking
  6. High availability
  7. Backup and recovery
  8. IBM DB2 for i
  9. Application development
  10. IBM i server functionality

At 416 pages it is going to take a lot of bedtime reading to get through it.

Wednesday, December 10, 2014

Quick way to find if PTF present and applied

look up ptf using ptf_info rather than dspptf

I often need to find out if a particular PTF has been applied to the IBM i I work upon. Most of the time I can use the DSPPTF command to display the PTFs, but there is one instance of IBM i I am not authorized to that command. I think the head IBM i operator is tired of receiving emails from me asking him to check if a certain PTF has been loaded and applied. I needed to find another way I could display a PTF and whether it had been applied on my own.

Fortunately there is a SQL view I can search for this information. According to the IBM documentation this view has been available since IBM i 6.1. The only servers I have access to are running 7.1 and 7.2, so I cannot vouch for whether this will work in 6.1.

Wednesday, December 3, 2014

Replacing text in a string

%scanrpl sql replace

I received a request from the engineers: One solvent they use has been place on the "restricted list" by the state and could no longer be used. Could I create a program to replace the solvent's code in their files with the replacement solvent's code?

It gave me a reason to use the %SCANRPL, 'Scan and replace character', built in function that was introduced in IBM i 7.1, and made me think how this could be accomplished with earlier releases too.

Wednesday, November 26, 2014

Using Alias for longer field names

 

The original contents of this page have become obsolete, go to this page for up-to-date information.

 

Wednesday, November 19, 2014

Data Areas in the all free RPG

rpg all free data areas and lda

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:

  1. Receive data from a data area into a data structure
  2. Update the data area with data from a data structure
  3. Equivalent of UDS

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.

Wednesday, November 12, 2014

Getting a list of files in IFS directory

 

The original contents of this page have become obsolete, go to this page for up-to-date information.

 

Wednesday, November 5, 2014

More about subprocedures

subprocedures in modules

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.

Monday, November 3, 2014

Two user groups from France

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.

Wednesday, October 29, 2014

Subroutines versus Subprocedures

The differences and advantages of using subprocedures rather than subroutines in your RPG code

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?

Wednesday, October 22, 2014

Three CRTDUPOBJ myths busted

3 examples of how ti use CRTDUPOBJ command

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:

  1. You have to give the from library name.
  2. If there is a trigger on the from file when it is duplicated the trigger is on the new file too.
  3. If you duplicate a physical file to another library and then duplicate a logical file that is built over the original physical the new logical still dependent upon the original physical file.

Monday, October 20, 2014

IBM i VUG in hiatus, not dead

ibm i virtual user group not dead

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.