Wednesday, April 27, 2016

RPG compiler directives

rpg compiler directives including copy include

Having written about the new /SET and /RESTORE compiler directives a while ago, I thought it might be a good idea to do a piece on the other compiler directives.

Compiler directives come in two types:

Monday, April 25, 2016

From IBM: Executive Guide for IBM i and PowerSystems

IBM has produced a new while paper called "An executive guide to IBM's strategy and roadmap for it integrated operating environment for Power Systems". Authored by Doug Balog, General Manager of the IBM PowerSystems division, it is, in my opinion, a must read for everyone using or planning to use a PowerSystems server with the IBM i operating system.

This white paper is designed to help IT executives understand IBM's strategy and roadmap for the IBM i operating environment.

Friday, April 22, 2016

IBM i 7.3 presentation from COMMON

On Tuesday (April 19 2016) the COMMON user group hosted a presentation given by Steve Will, chief architect of the IBM i, and COMMON board member Peter Massiello on the new release 7.3. Fortunately COMMON has uploaded it to their website, and made it available to the general public here.

The presentation is a little over an hour, and covers all of the major features in the new release. It is definitely recommended viewing for everyone who is interested in the IBM i and its future.

Wednesday, April 20, 2016

Using SQL User Defined Types

sql user defined types udt

One of the most important qualities of a well designed database is that all the like fields, e.g. invoice number, share the same characteristics. With DDS files I can do this using a reference file, which contains all the types of field I could want. In an earlier post I showed how you could create a SQL table using column definitions based upon those from another table or file, see Defining SQL tables using a reference file.

SQL offers an alternative, a way to define my own data types which can have their own unique characteristics. I can define a data type for example for Amount, Quantity, and Customer id, and then use these when creating tables, etc.

Monday, April 18, 2016

Examples of SQL joins

I found this posted in a Facebook group. It shows in a simple manner the type of SQL joins and what data they will return.

types of joins using SQL

A big Gracias goes to Juan Carlos Ugaz for allowing me to share this.

A full size version can be seen here

Friday, April 15, 2016

IBM i 7.3 out today

The new version of IBM i, 7.3, which was announced on Tuesday, is available today.

Will your company be installing the new release this weekend?

If so I would be interested to hear what you think of it. You can contact me in two ways:

  1. Use the Contact form on the right side of the page
  2. Post a comment on this post

Wednesday, April 13, 2016

Identifying damaged objects

damaged objects

Last week I received a telephone call from my manager, "Jane Smith (her name has been changed to protect the innocent) cannot signon as she is getting some kind of an error message," he explained. "Can you help her?" Jane's problem was that the job description her user profile used was damaged. I quickly copied the one from the development IBM i partition and Jane was able to signon. When I reported this to my manager he asked the obvious question: "How many other damaged objects do we have?"

That is something most of us never encounter due to the robustness of the IBM i operating system. What I needed was a process to identify any damaged objects before they are used and cause errors. The question is how can you identify a damaged object without using it?

Tuesday, April 12, 2016

IBM i 7.3 and 7.2 TR4 are announced

After months of speculation this morning the wait is finally over as IBM has announced the new release IBM i 7.3 and the technology refresh 7.2 TR4.

It has been two years since the launch of the last release, and five months since the last technology refresh for 7.2 . Alas, this is the end of the road for technology refreshes for 7.1, as there is no equivalent TR. If your business is still using 7.1 now is a good time to start pushing for an upgrade to 7.2 .

Wednesday, April 6, 2016

SQL and null

sql null

In my last post, Handling null in RPG, I gave examples of how to cope with null values in RPG. As more of us are working with SQL we are going to need to know how to cope with nulls within it too.

Before I start I need to thank Paul Tuohy as my examples of using the null byte maps are based upon a presentation he gave at the OCEAN Technical Conference, in 2015.

Let me start with the basics, below is a SQL table with five columns (fields). I could have used the GENERATE_SQL SQL procedure to create this table from the DDS file I used in my previous story, you can learn about this SQL procedure here.

Wednesday, March 30, 2016

Handling null in RPG

rpg null nullind

I am finding that I am encountering variables containing null more often as I interface data to the IBM i that originated from other software and databases. How to handle nulls is becoming one of the more popular questions I am asked.

What is null? Dictionary.com defines it as:

  1. without value, effect, consequence, or significance.
  2. being or amounting to nothing; nil; lacking; nonexistent.

Wednesday, March 23, 2016

Copying multiple spool files into one

cpysplf copy spool file

Last week I received a request from my manager to merge three reports into one so that he can read it easily on his mobile phone. It has been a long time since I last did it, and when I asked my colleagues if they knew how to do it I received a lot of blank looks.

Let me start by saying I do not want to change the report programs, the printer files they produce are the right width to display on a mobile phone. Fortunately merging spool files is very simple, I can do it all with a few CL commands.

Wednesday, March 16, 2016

New RPG compiler directives /SET and /RESTORE

I am not sure how I missed this, two new compiler directives were added to RPG in IBM i 7.2, and I presume the equivalent 7.1 TRs: /SET and its opposite /RESTORE. I would have thought /RESET would have been a better choice than /RESTORE, but I am not IBM.

/SET will temporarily change, what I can only describe as, the definition of definitions. For example, if I want part of my program to use a different CCSID than the rest. Or perhaps I have a piece of code in a "copybook" (a source file member that is only ever /COPY-ed into another) that uses a different date and time format.

What can I change using the /SET: