Tuesday, April 29, 2014

POWER8 and IBM i technology

This video is a brief introduction to the new POWER8 servers running IBM i. The presentation is given by IBM i Business Architect Nancy Uthke-Schmucki.

Monday, April 28, 2014

IBM i 7.2 announcement

release 7.2 v7r2m0

Today IBM has announced the new release for IBM i 7.2. In his blog post announcing the new release Steve Will, Chief Architect for IBM i, briefly described the themes of new release as:

[w]e have a list of themes that related to delivering a great platform for today’s solutions. Mobile devices, cloud delivery models, advanced middleware – IBM i 7.2 delivers function that enables all of these. And, in conjunction with the rest of Power Systems, we announce support for the first POWER8-based systems. You’ll be able to find a lot of information about new Power Systems, and we will have more information about how IBM i takes advantage of the new architecture in the future, but that’s not the focus of our IBM i bloggers today.

Wednesday, April 23, 2014

Getting data from the BRMS log

brms backup log sql create table

BRMS (Backup, Recovery and Media Services) is used by many IBM i customers to manage the way they save data. Control Groups are created to group libraries, folders and files together. When a BRMS save is initiated it is for the Control Group, rather than the individual libraries, folders, etc.

I was recently tasked to create a daily report, that would be emailed to all IT managers, on the status of the previous night's backups. After a quick search through the BRMS menus I found the Display Log for BRM, DSPLOGBRM, command. I was disappointed to find that it will only output to display or printer. Which meant it was not suitable for my needs. I needed a file to extract the information I needed to generate the report.

Friday, April 18, 2014

User Group: GSLMUG becomes UIIPA

utah ibm i professionals association

The Greater Salt Lake Midrange User Group has changed their name and have launched a new website.

The Salt Lake City, Utah, based group have changed their name to the Utah IBM i Professionals Association and created a new web site at uiipa.org.

I have changed the name and the link on 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.

If you know of a user group, no matter where it is in the world, which is not on the user groups page use the Contact form to send me its details.

Wednesday, April 16, 2014

Add 1 to A to get B, your code

Last week I discussed how I had created a program to maximize the number of values I could have in a 3 character field. I did this using the values 000 – ZZZ. As we all know it is not possible in RPG to just to add 1 to A to get B. I gave the program of how I did it here, and I asked if anyone had another way to do it so send it me.

Several people did, and I am grateful to them for their submissions. If you would like to send one please sent it via the Contact form as the formatting in the comments section will do strange things to it.

Wednesday, April 9, 2014

Add 1 to A to get B

rpg xlate increment alphanumeric

My colleagues and I came up with an interesting problem earlier: I have a 3 long field and I want to increment the value in it. We need to have the maximum possible number of values in the field before it returns to the initial value.

If I use numbers I have 1,000 values, 0 – 999.

If I used alphanumeric values for a range of 000 – ZZZ I would have 46,656 values. But how can I add 1 to the letter A?

Tuesday, April 8, 2014

Technical Refresh 8 announced

technical refresh 8, tr8

IBM announced today their latest Technical Refresh for IBM i, Technical Refresh 8 or TR8. Unlike previous technical refreshes it would appear that this release will only be for version 7.1.

While their does not appear to be any enhancements to RPG or CL, there are enhancements to DB2 for i (aka SQL).

The planned availability date is June 6, 2014.

You can learn more about TR8 from the links below.

Wednesday, April 2, 2014

Initializing variables with special values

rpg inz field variable

While skimming the updated RPG manual I found something that I had not seen before, I can initialize variables with special values. What do I mean by special values? Basically system type values that start with an asterisk. When I went back and looked at older documentation I found that this has been available since IBM i 6.1.

I no longer have to go to the Program Status Data Structure, PSDS, to get the user id of the person running the program, or to initialize a date field with the system date.

In this post I am going to give examples of how to use this in both fixed and all free format RPGLE.

Wednesday, March 26, 2014

Creating PDF files from spool files

ovrprtf cpysplf pdf transform services

I have times when a user will request that a report be emailed to them, rather than printed and sent to them via the inter company mail. The easiest way would be to create a PDF file from the spool file and then email it to the requestor.

There are many third party tools that allow you to be able to convert a spool file to PDF, but how can I do it just using native IBM i features?

The method I am going to describe can only be used IBM i servers with either version 6.1 or 7.1 installed.

Wednesday, March 19, 2014

Run SQL statements in your CL

cl clp sql runsql clle

IBM i 7.1 brought us the RUNSQL command. This allows me to run SQL statements within the CL.

Prior to IBM i 7.1 I would have to use the RUNSQLSTM command. To use this command I need to have the SQL statement in a source member. The way I knew to run build a SQL statement in CL program was to write it to a source member that could then be used by the RUNSQLSTM command. I always considered it too much work and either used a SQLRPGLE, RPGLE with embedded SQL, or a QMQRY, Query Management Query.

While I do not see the RUNSQL command replacing my use of SQLRPGLE, I do see it eliminating most of my use of QMQRYs.

Monday, March 17, 2014

New RedPaper: Reorganize Physical File Member

rgzpfm reorganize phtsical file member

I have Ralf Petter to thank for bringing to my attention a RedPaper, published this month, describing the changes to the RGZPFM, Reorganize Physical File Member, command.

It includes the changes made to the command with the release of TR7 (Technical Release 7), including the new From Record parameter, and how you can determine the status of the file's reorganization.

You can download/view the RedPaper, in PDF format, here.

Wednesday, March 12, 2014

Mixing it up with RPG all free

ctl-opt dcl-f dcl-s dcl-ds

With the new RPG all free we have been liberated from using the fixed format specifications. With the new definition operations we can intermingle “specifications”, within reason. I decided to see what I could do with a simple program that has one input file and a display file, which contains a subfile. In this post I will explain what I have found, some of it may be obvious to some but not to others.

Before our liberation specifications have had to be entered in a specific order. For example in RPGLE:

  • Control/Header (H)
  • File (F)
  • Definition (D)
  • Input (I), if needed
  • Calculation (C)
  • Output (O), if needed
  • Procedure (P)