Archive

Archive for the ‘Blogs’ Category

RPGPGM.COM - From AS400 to IBM i › History of IBM Redbooks

March 27th, 2015 Comments off

This video from IBM explains the history of their Redbooks.

You can find the IBM i/PowerSystems specific Redbooks here.


Read the original at RPGPGM.COM - From AS400 to IBM i.

Categories: Blogs Tags:

RPGPGM.COM - From AS400 to IBM i › Getting off the RPG cycle

March 25th, 2015 Comments off
no rpg cycle with main and no main procedures

The cycle is still a part of RPG, and while you are not using it in your RPG programs it is still there lurking. I have always wished there was a way to be able to turn it off, and allow RPG to be linear. In recent releases this has started to happen.

With the file definitions in all free RPG it is not possible to code a file as primary or secondary, or to define matching records and level break indicators. But the cycle is still there. For example, the program below uses the cycle to read all the records from a file:

Read more »


Read the original at RPGPGM.COM - From AS400 to IBM i.

Categories: Blogs Tags: ,

DB2 for i › Dealing with Blank Checks in DB2

March 24th, 2015 Comments off
"I think IBM i developers believe they must help DB2..."

hmmm, unfortunately this is sad but true.

The science of database must be understood before the art of database can be practiced. This includes the relatively simple task of comparing a column's value to a literal.  How hard can it be to compare and test for blanks? You know, the spaces sitting in a empty not null character column.

Well, apparently it's more difficult on some platforms than others, and SQL coders jump through hoops and attempt back flips to "help" the database engine.

For more information and coaching on the topic, please see Kent Milligan's excellent article on the topic here.

If you want to get better at understanding the science of DB2 for i, and proficient at practicing the art of relational database with IBM i, then please reach out - we're here to help you become successful.


Read the original at DB2 for i.

Categories: Blogs Tags:

RPGPGM.COM - From AS400 to IBM i › Char built in function added to CL

March 18th, 2015 Comments off
%char in clp clle and rpg

IBM i 7.2 introduced a number of new built in functions, BIFs, to CL. One of them is %CHAR, convert to character format. When I found it my first thought was this the same as the RPG %CHAR BIF.

The syntax for the two BIFs is similar:

CL :
CHGVAR VAR(&ALPHA) VALUE(%CHAR(&NBR))
RPG :
Alpha = %char(Nbr) ;
Read more »


Read the original at RPGPGM.COM - From AS400 to IBM i.

Categories: Blogs Tags: , ,

Simply i › Been a very busy winter period.

March 16th, 2015 Comments off
Winter in Canada can be a very long affair and as we know its been a very hard and cold winter this year. This has kept us locked in the office for a lot longer allowing us to do a … Continue reading


Read the original at Simply i.

RPGPGM.COM - From AS400 to IBM i › Change date from one format to another using SQL, update

March 16th, 2015 Comments off
converting date format using sql

I mentioned in last week's post Change date from one format to another using SQL that when I converted the alphanumeric value '022195' using SQL's timestamp_format function with the format 'MMDDYY' the result was the date '02212095', which was not what I expected.

I want to thank Chris Ringer, Birgitta Hauser, and R Flagler for the solution.

Read more »


Read the original at RPGPGM.COM - From AS400 to IBM i.

Categories: Blogs Tags: ,

RPGPGM.COM - From AS400 to IBM i › Change date from one format to another using SQL

March 11th, 2015 Comments off
converting date format using sql

This post is inspired by a question I was asked by a colleague. He wanted to create a SQL statement that would convert a MDY "date", in a six alphanumeric field in a file, to a ISO "date", in a ten alphanumeric variable.

In RPG I could simply do the following:


test(de) *mdy0 InField ;
if (%error) ;
OutField = ' ' ;
else ;
OutField = %char(%date(InField:*mdy0):*iso) ;
endif ;
Read more »


Read the original at RPGPGM.COM - From AS400 to IBM i.

Categories: Blogs Tags: ,

Alan Seiden Consulting: PHP and IBM i Expertise › Vote for a Mac edition of RDi

March 8th, 2015 Comments off

Rational Developer for i (RDi), the modern editor for IBM i RPG, COBOL and other languages, runs on Windows and Linux, but not Mac.

IBM has shown some willingness to port the product to Mac. They have posted a poll to allow users to vote for this enhancement or to comment on the proposal: https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=13454

Those wishing to vote will find a “vote” link near the bottom of the poll page.


Read the original at Alan Seiden Consulting: PHP and IBM i Expertise.

RPGPGM.COM - From AS400 to IBM i › Checking for Mixed Case in SQL

March 4th, 2015 Comments off
convert to upper case using sql

Most of the files and tables I use contain data that is only in upper case. Occasionally I have to work with files that can contain data in mixed case, both upper and lower, or data from our overseas subsidiaries that can contain special characters: accents, umlauts, circumflexes, etc. This does present me with an issue when I need to search data in those files. I mainly use SQL to search and extract from files, and while I can use a LIKE in the SQL statement it does still compare like to like, where 'A' is not the same as 'a'.

The simple solution would appear to be to convert the incoming field/column into upper case when performing the comparison, but I have Theo Kouwnehoven to thank for an ever simpler and better solution.

Read more »


Read the original at RPGPGM.COM - From AS400 to IBM i.

Categories: Blogs Tags: ,

RPGPGM.COM - From AS400 to IBM i › Leap second coming at the end of June

March 2nd, 2015 Comments off
leap second adjustment june 30 2105

A Leap second is an extra second that is added to a day to keep UTC (Coordinated Universal Time) synchronized with "mean solar time". Leap seconds have been used 25 times since 1972 to stop the two drifting apart. The next Leap second will be added to June 30, 2015, and will mean that 23:59:60 UTC will be a valid time before changing to 00:00:00 UTC:

June 3023:59:59
23:59:60
July 100:00:00

How does this effect the IBM i?

Read more »


Read the original at RPGPGM.COM - From AS400 to IBM i.

Categories: Blogs Tags:
css.php