Tag Archives for " #RPGLE "

Aug 09

‘device file does not contain an entry for screen size’

Upgraded our IBM i systems to IBM i V7.3 yesterday and so far everything is running nicely except for this one weird little glitch: some of the existing DDS WINDOW SCREENS are bombing with CPF4169 The device file does not contain an entry for screen size when they seem to have been quietly working for years, […]

More Waffle
Jan 02

+Happy New Year 2018

+Happy New Year 2018. One of my new years resolutions was to write cleaner code, and in the spirit of out with the old and in with the new… I already use the RPG COPYRIGHT statement and the CL COPYRIGHT STATEMENT to store the copyright message and (more importantly to me) the Version or Release number […]

More Waffle
Aug 17

Scan Replace in RPGLE and SQLRPGLE

In the middle of this RPG program, I want to reformat and replace some values in a big long address field. But for the life of me… I cant remember how to use the SCANREPLACE built in function in RPG. #Dingbat /me memory circuits need a service methinks. So, like all programmers, I wonder off to […]

More Waffle
Aug 01

Use substring in RPGLE SQL Statements

So, I had to make a little change to an RPG4 program to let it respond to a new parameter being passed into it via JSON. This value had to be stored in the first character of a field in a physical file in the database. Simple Logic and we want it done quick, efficient, […]

More Waffle
Jul 26

Right Adjust Numeric into Alpha field using RPG Free

I have a NUMERIC in an RPG program that I want to move RIGHT into an Alpha field. In the old days of RPG3 I would use MOVE but in the new days of RPG4 I have a couple of more flexible solutions. So, lets say we have a numeric field containing the number 1234, […]

More Waffle
Jul 12

Write to joblog messages from RPGLE /FREE – a QMHSNDPM code example

RPG CODE EXAMPLE – “Write to joblog” in RPG4 /FREE Write to joblog lets us send messages from inside a running RPG program. It’s simple using one of IBM’s API’s – QMHSNDPM RPGLE Code Example // SNDMSGLOG1.RPGLE // Simple Program to send message to joblog using QMHSNDPM // Author: nick@nicklitten.com ctl-opt dftactgrp(*no) actgrp(‘NICKLITTEN’) option(*nodebugio:*srcstmt:*nounref) alwnull(*inputonly) […]

More Waffle
Jun 30

How to use named indicators in RPG

When is an RPG indicator more than just a number? We can use a named data structure to overlay over the top of all the indicators used in the program. Using this technique, we can define a sensible name for the each of the memory spaces associated with the indicators. For example — when the user […]

More Waffle
Jun 02

RPG Example reading JSON using YAJL from IFS

Decode JSON webservice reply data (already stored in IFS) using YAJL This reads the JSON from the IFS – decodes it using Y.A.J.L and reports on time taken to perform decode. Writing an RPG program to read JSON using YAJL is actually pretty straightforward — I hope this code example helps! In this case the […]

More Waffle
1 2 3 4