Wednesday, December 31, 2014

Display release of IBM i

display ibm i release

One of the first things I do when I first signon to an IBM i is to check what release of operating system it is running. Armed with that information I then know what version programming tools and language features I will need to use.

Fortunately there is a quick way and a not so quick way, that takes just a few more key strokes.

Monday, December 29, 2014

Operating systems release history

Server name Operating
system
Release Available
date
End of
Support date
AS400
(Application System/400,
1988-2000)
OS400
(1988-2006)
Rel 1 August 26, 1988 ?
R01M00 ? ?
R01M01 ? ?
R01M02 November 25, 1988 ?
R01M03 ? ?
V2R1 May 24, 1991 June 30, 1994

Tuesday, December 23, 2014

Getting field definitions using SYSCOLUMNS

Use SYSCOLUMNS to get list of fields in file

In several previous posts where I have used the DSPFFD command, see here and here, or the QUSLFLD API, see here, to retrieve the Column Heading of fields in a file someone has commented that I should retrieve the column headings using the SYSCOLUMNS file. In the scenarios described in those post using SYSCOLUMNS would not have worked as it only contains data for files not in QTEMP.

SYSCOLUMNS resides in the library QSYS2, and is a SQL view built over the physical file QABDIFLD. It contains the field/column information for all the files and tables in every library on your IBM i, except those in QTEMP. I am not going to list all the columns in SYSCOLUMNS as the IBM documentation does a good job doing it here.

I am going to show two scenarios how I could use SYSCOLUMNS:

  1. List all of the fields in a file.
  2. List all the occurrences of a field name in all the files in a library.

Wednesday, December 17, 2014

Using aliases can be simple

using alias in rpg

The discussion of whether to use the alias names for files’ fields has become a lengthy here amongst the programming staff. The major argument against has been that there does not appear to be an easy way to perform input or output to record formats in display and printer files. I needed to find a simpler way to define the alias and its uses.

Fortunately IBM came to my aid with PTFs to make the using of alias simple in IBM i 7.1 and 7.2. In my opinion this is the way alias handling should have been from the start.

Tuesday, December 16, 2014

Node.js now available

node.js released for ibm i

Node.js was promised as part of Technical Refresh 9 for IBM i 7.1 and TR1 for 7.2. It was released yesterday, December 15 2014, as a new License Program Option.

Node.js is an open source runtime environment for server side and network applications. Its applications are written in JavaScript using Google's V8 JavaScript engine to execute code. Its runtime can execute on OS X, Microsoft, Free BSD, Linux (which can be hosted on a PowerSystems server along with IBM i) and now IBM i.

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.