Wednesday, July 30, 2014

Easy way to convert CSV file to DDS file

csv excel cpyfromimpf cpytostmf

I am sure we have all been given a Microsoft Excel spreadsheet and told to upload the data from it into IBM i files. The first thing I do with the Excel spreadsheet is to save is as a CSV file. CSV stands for comma-separated values, the data elements, or columns, can be of varying length and are separated with a comma. It could be described as an Excel file without all the special formatting. If you have a Windows PC and you right-click on a CSV file, select "Open with", and then "Notepad" the file will look like this:

First,Second,,"4,444",5.5
First field,Second field,Third field,4.4,"5,555,555"

In conversations with other IBM i folks I am finding that the "Send file to host" function of Client Access is being shut off on their IBM is as it is rightly regarded as a security risk. What can be used as an alternative?

Thursday, July 24, 2014

IBM i strategy and roadmap

ibm i commitment road map strategy

Sometimes Googling uncovers things I missed when they were originally released. This is an example: the white paper An executive guide to IBM's strategy and roadmap for its intergraded operating environment for Powers Systems was published in May 2014. In this 16 page document IBM explains their commitment to the IBM i.

In the introduction Doug Balog, General manager IBM Power Systems, explains Big Blue's commitment:

I want to assure you that IBM is committed to the IBM i platform as a vital component of our Power Systems portfolio. IBM i is key to our broader strategy of investing in enterprise systems and storage.

Wednesday, July 23, 2014

CL program that submits itself to batch

sbmjob program that submits itself to batch

There are many times when I want/need to have an interactive program submit a job to batch, and the interactive program would be so small it seems a waste to have such a program. For example the interactive program presents the user with a confirmation screen and then submits a program to batch that does all the processing. Perhaps the solution would be to have both the interactive and batch commands in the same program and it somehow know when it is running interactively or in batch.

Fortunately the 'Retrieve Job Attributes', RTVJOBA, command allows to retrieve which environment (interactive or batch) the job is running in. Combine this with subroutines in CL, see Subroutine in CL, and I can create a program that can run different commands in both environments.

Wednesday, July 16, 2014

How to cope with missing parameters in CL

clp clle parm missing parameter

When programming in RPGLE it is possible not to pass all the parameters between programs or procedures, using *OMIT in the calling code and %PARMS in the called code. The same functionality is not available in CL.

I needed to make a modification to an existing CL program, which is called from many other programs. If it was called from one program I needed to pass a parameter to it, if it was called by the others I did not need to use the parameter as a default value is used. I needed to make this quickly, before today’s night run. It would take too long to:

Monday, July 14, 2014

User Group: Common Polska

W ramach mojego celu, aby wyświetlić wszystkie IBM i grupy użytkowników na świecie miałem przyjemność znaleźć strona Common Polska.

Ich miejsce jest common.org.pl

Dodałem link do strony IBM i user groups.

Nie ważne gdzie jesteś w świecie, sprawdź, czy jest grupa użytkowników w pobliżu. A jeśli wiesz, grupy, która nie znajduje się na liście Contact Form, na prawo, aby wysłać mi swoje dane.

Wednesday, July 9, 2014

Formatting the email body in SNDSMTPEMM

sndsmtpemm email body

In December, 2013, I wrote a post about using the SNDSMTPEMM command to send emails from the IBM i, Email IFS files. It has become the most popular post on this blog, and the one that has generated the most interest.

Two of the most commonly asked questions has been:

  1. Can I send an email with a message in the email’s body and without an attachment?
  2. Can I format the text in the email’s body so it is not just plain text?

Monday, July 7, 2014

Redbook: IBM i modernization

ibm i modernization

IBM has published a draft of a Redbook called Modernize IBM i Applications from the Database up to the User Interface and Everything in Between. It primarily focuses on modernizing the traditional "green screen" UI to web and mobile.

Modernization is a broad term when applied to applications. It is more than a single event. It is a sequence of actions. But even more, it is a process of rethinking how to approach the creation and maintenance of applications. There are tangible deliveries when it comes to modernization, the most notable being a modern user interface (UI), such as a web browser or being able to access applications from a mobile device. The UI, however, is only the beginning. There are many more aspects to modernization.

It includes chapters featuring the following programming languages:

  • RPG
  • EGL (does any one use EGL?)
  • PHP
  • Java
  • HTML, CSS, and JavaScript

You can download it, as a PDF, here.

Wednesday, July 2, 2014

Navigate your IBM i using a web browser

ibm navigator for i

I am sure most of us are familiar with the Windows based Operation Navigator tool, and have found that there are certain tasks that are either easier to perform using it or there are tasks within it that there is no "green screen" equivalent. My experience with using it on many different PCs and versions of Windows is that it is slow, a resource hog, and if I do too much with it goes into a "Not responding" status. Therefore, I was intrigued to learn that you can now have access to same navigator-like tools using a web browser.

The browser based IBM Navigator for i was introduced as part of version 6.1, and is available in 7.1 and 7.2 . I have been able to use it with the following browsers:

  • Microsoft’s Internet Explorer
  • Mozilla’s Firefox
  • Google’s Chrome
  • Apple’s Safari on Windows 7

As I do not have an Apple computer I cannot say whether you can use the Navigator on an Apple.