Wednesday, April 29, 2015

Coping with data decimal error when read file

data decimal error pssr fixnbr and monitor group

I am sure we have experienced running a program when it errors with "Decimal-data error occurred", RNQ0907. After analyzing the program I would find that the error is caused by bad data in a field in the input file. Yes, I will correct the bad data, but I might want to have the program continue using a default value and create a dump that can be used for analysis later. Examples of creating dumps can be found in the post: Producing a dump from programs.

How can I flag the record as having an error, give the numeric field a default value, and continue processing?

Tuesday, April 28, 2015

More on IBM i 7.2 TR2 and 7.1 TR10

More information for the new Technology Refreshes, IBM i 7.2 TR2 and 7.1 TR10, is slowly coming out.

The release date for these is May 29 2015 with the following PTF numbers:

  • IBM i 7.1
    • SI55340 TGTRLS(*CURRENT)
  • IBM i 7.2
    • SI55442 TGTRLS(*CURRENT)
    • SI55531 TGTRLS(V7R1M0)

IBM's announcement letter can be found here.

The enhancements RPG can be found in the "Whats new since 7.2", mixed with the 7.2 TR1 enhancements, here.

And the MC Press has an article about the DB2 for i (SQL) changes here.

Once I can get access to a server with one of these Technology Refreshes I will start writing about them here.

Monday, April 27, 2015

IBM i 7.2 TR2 and 7.1 TR10 DB2 for i enhancements

The details for what is included in IBM i 7.2 Technology Refresh 2, TR2, and IBM i 7.1 TR10 is now out!

IBM has a page for the DB2 for i (SQL) enhancements in these Technology Refreshes: here.

It would appear that as both the Technology Refreshes contain the same the details are given on the TR2 page.

Things that caught my eye are:

  • CREATE OR REPLACE TABLE
  • JSON DB2 store
  • RUNSQL control of output listing (which was later removed from the page)

Now I need to find what enhancements, if any, have been made to RPG and CL.

Sunday, April 26, 2015

IBM i 7.1 TR10 and 7.2 TR2 announced at Common

Today at the Common User group meeting at Disneyland new Technology Refreshes were announced:

  • IBM i 7.1 TR10
  • IBM i 7.2 TR2

No details yet, but there are pages on IBM's website for both Refreshes:

As soon as I learn more about these I will publish it here on this blog.




Update - Monday April 27 6:30 AM

Steve Will's, IBM i Chief Architect, presentation on what is in IBM i 7.2 TR2 is ongoing at the Common meeting. He has given us a taste of what is to come in a blog post here.

Wednesday, April 22, 2015

Producing a dump from programs

dump programs dump dmpclpgm ovrprtf

There are times when an error is encountered in a program, particularly one that is running in batch, which I do not want to "error out" with a message. I want to cope with the error within the program, flag that there was an error so that I can resolve the issue later, and continue processing. If I can generate a program dump when the error occurs I have all the information I need to be able to fix it. CL's DMPCLPGM command and RPG's DUMP operation code do that without the need to break for an error message, producing the same output as if I had answered an error message with an option "D".

I am surprised at the number of IBM i developers who are unaware that it is possible to produce a dump without an error message. I would prefer to cope with errors and produce a dump within a program rather than receiving a 2 AM phone call from the night operator telling me that there is an error that is holding everything else up, and what am I going to do about it?

Tuesday, April 21, 2015

Video: Why Modernization on IBM i matters

This is a video of the presentation Tim Rowe, Business Architect for application development on IBM i, made to Common Europe:

Monday, April 20, 2015

IBM offers extended support for IBM 6.1 and 6.1.1

Previously IBM had announced that support for the IBM i 6.1 and 6.1.1 versions of their operating system would end on September 30, 2015. On April 14 they announced a "service extension for IBM I V6R1":

IBM Software Support Services - service extension for IBM i V6R1 provides support for usage questions, problem determination assistance, and support for new fixes. With this service, IBM product specialists can help you simplify management of your IBM i 6.1 operating system as well as resolve issues more quickly and efficiently when they do happen, thereby minimizing risk of business disruption.

Wednesday, April 15, 2015

Getting the number of rows affected by SQL statement

get number of rows from SQL insert, fetch, delete, and update

In a comment submitted to last week's post, blocking fetches to get more than one row at a time, Karl Hanson informed me of a way to retrieve how many rows were fetched by the "Fetch number of rows" statement. This way can also be used to retrieve how many rows/records were inserted, fetched, updated, and deleted.

Tuesday, April 14, 2015

Video: IBM i a system designed for business

Stories from IBM i customers explaining how they are delivering high quality services faster and for less money.

Wednesday, April 8, 2015

SQL blocking fetches, getting more than one row at a time

fetch for rows sql

In an earlier post I described how to perform "record level access" using SQL, i.e. getting data from a table or file one row or record at a time, much like reading a file using RPG. But you can do more with SQL by using blocking fetches, getting a number of rows/records at once. As database I/O is a relative slow process, by using block fetching decreases the number of I/Os needed and this can make your programs faster.

The difference between using the FETCH NEXT for one row/record at a time versus the blocking fetch is adding the FOR x ROWS to the fetch statement:

Wednesday, April 1, 2015

SQL within Qshell

qshell db2 sql

Qshell is a command interface for the IBM i's POSIX environment. I have found it most useful for its ease of use when using the IFS, Integrate File System, and interfacing data between the traditional IBM i environment and the IFS.

The Qshell command I use the most is db2, I have Paul Wren to thank for introducing me to it. The db2 Qshell command uses the SQL CLI, Call Level Interface, and allows me to run SQL commands on files in the IBM i and IFS environments. I am not suggesting that this will replace the STRSQL, RUNSQL, and RUNSQLSMT commands, Query Management queries (*QMQRY), and SQL embedded in RPG. Think of learning how to use db2 in Qshell as another asset to add to your IBM i knowledge and skill set.