Wednesday, October 28, 2015

Using SQL to get information about Job Scheduled entries


Am I the only one who has found it difficult to get information about what is in an IBM i's Job Scheduler?

I can use the Work Job Schedule Entries command, WRKJOBSCDE, to create a print out of the details. But I just want a quick and simple way to quickly and easily find what I want.

Someone at IBM must have been listening as the View SCHEDULED_JOB_INFO was added in IBM i 7.2. I can now easily get to, pick and choose the information I want using a SQL SELECT statement. I will give some examples of what I find helpful, and show you what you can do using this View.

Monday, October 26, 2015

IBM i and Open Source presentation

This is a presentation of a Webex made by IBM's Tim Rowe to the COMMON User Group last Monday, October 19 2015, about Open Source on the IBM i.

Wednesday, October 21, 2015

Everything you wanted to know about dates but never dared to ask, part 2

Date built in functions, BIF, %DAYS %MONTHS %YEARS %DIFF and %SUBDT

In part 1 of this series I covered what I consider to be the basics:

  • Date formats
  • Defining dates
  • Moving values in and out of dates

In this part I am going to be covering the RPG built in functions for Date data types I use.

Tuesday, October 20, 2015

Everything you wanted to know about dates but never dared to ask, part 1

date data type in rpg

The Date data type was introduced in V2R3, but it was not until the introduction of RPGLE in V3R1 could we finally make use of it. Over those years I have used the Date data type extensively in my RPG programs and DDS files. I am surprised to still find developers who will not use them, or find others who do not fully understand the functionality of this data type.

Rather than address each item I have found I thought it would be better to write about the Date data type and how I can use them in my RPG code. This will be spread out over several posts, as to cover all I want to do is too much for just one. Let’s start today with what I consider the basics.

Wednesday, October 14, 2015

A better way of sending break messages

qezsndmg api better than sndbrkmsg and sndmsg

I have never liked the Send Break Message command, SNDBRKMSG, as it is not possible to send the message to a user without knowing which work station they are at. There is an alternative: the Send Message API, QEZSNDMG. This API allows me to send a message to directly to the user, without caring where they are. It is the only API I can think of that has an user interface that can be used interactively, and the same API can be used in a program to run without the user interface.

Below I am going to describe how this can be used with the user interface, and then how to call the API in a program.

Wednesday, October 7, 2015

Determining the last Friday/first Monday in the month

sql dayofweek last_day function

Sometimes a coincidence happens where two people ask for similar things that make me think that their question could become the subject for a post on this blog. Someone, via the internet, asked me if it was possible in RPG to write a program that would calculate the last Friday for every month. The following week I received a request, at my work, to run a report on the first Monday of every month. When two things like this come together it is a good subject to discuss.

Over the years I have found many ways to determine the day of the week. I have used CEE APIs (CEEDAYS and CEEDYWK), calculations of varying complexity (especially in RPGIII), and one software package (I will not name) had a file that had a record for every date from 1900 to 2100 with fields containing various date formats, week numbers, and the day name. For this scenario I wanted something simple, you know KISS (Keep It Simple Simon).

Tuesday, October 6, 2015

IBM i 7.2 TR3 / 7.1 TR11 announcement video

This is Tim Rowe’s, Business Architect for Application Development for IBM i, 7.2 TR3/7.1 TR 11 announcement webcast to COMMON Europe on Monday.

Monday, October 5, 2015

IBM i 7.2 TR3 and 7.1 TR11 is announced

The waiting is over we now know what is in latest Technology Refreshes for IBM i 7.2 and 7.1. 7.2's TR3 and 7.1's TR11 appear to contain the same enhancements to the development environment. I am not going to list them all here, just the ones that captured my eye.

For RPG-ers the biggest change is finally releasing RPG from the last constraint of the fixed format. Prior to TR3/TR11 I could only code between the 8th and 80th columns. Now my RPG code can start in the first position and finish at the end of the line. The only prerequisite is that **FREE is entered starting in the first column before my RPG code can start in the first position.

Sunday, October 4, 2015

IBM i 7.2 TR3 and 7.1 TR11 being announced tomorrow?

V7R2 TR3 and V7R1 TR11

From what I can tell the announcement of the latest Technology Refreshes, TR11 for IBM i 7.1 and TR3 for 7.2, will be made tomorrow, Monday October 5, 2015.

Having found the developerWorks pages for these Technology Refreshes last month, I noticed today that they have been updated with the enhancements for DB2 for i (SQL). Even as I am typing this post I see updates being made to these pages.