Tag Archives for " #code "

Jul 12

Dirty RPG programmers need to write Clean RPG Code

This morning I was revisiting a program that I wrote last year and looking at my code thinking “Why the hell did I write it like that? #Ugly”. RPG code evolves and lots of code evolution starts in one direction and then branches off, drunkenly in another direction. This means that code can evolve to […]

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 01

RPG example: store webservice reply XML or JSON in IFS

As an RPG Programmer you are probably writing a ton of code to talk to remote webservices out there in internet land. If you are just learning webservice programming, it can seem like a daunting exercise. So, to help you with your first steps on the journey, here is a simple RPG CODE EXAMPLE which […]

More Waffle
Oct 28

Write to joblog messages from RPGLE – easy code example

RPG CODE EXAMPLE – “Write to joblog” Write to joblog lets us send messages from inside a running RPG program. It’s simple using one of IBM’s API’s – Qp0zLprintf I’ve used this little technique for ever. Simple define a procedure calling the API (in this example I call it “writejoblog”) and then in your mainline code […]

More Waffle
Feb 25

How to add the Turnover V100 Perspective to WDSC7

OK. So we already agree that using WDSC for IBM i software editing, for free, is pretty cool. But, adding Turnover V100 to it, so you can do everything from one place is even cooler. Once we have added the Turnover perspective to our existing WDSC7 setup then we can flick between perspectives to edit/compile […]

More Waffle
Jan 20

Example RPGLE web service program [SOAP]

debugging rpg webservices header

Here is a quick little example RPGLE web service – it’s written in RPG, the SQLRPGLE flavor and simply reads a file (the System/21 Stockroom master file — INP20) and returns a multi-occurrence data structure (array) of the stockrooms that the user is authorized to use. #hopeithelpssomebody WEBGETSTR – get all stockrooms for a company […]

More Waffle
Jul 06

DSPF Function Keys and the Hex AID Byte from the INFDS

THE AID BYTE IS A SINGLE CHARACTER FIELD THAT CONTAINS A HEX CODE THAT WILL TELL YOU EXACTLY WHAT THE USER PRESSED ON THE SCREEN – IE: ENTER OR PF3 OR PF12 OR ‘WHATEVER’ The File Information Data Structure is has all kinds of very cool information stored in it. It makes any programmers life […]

More Waffle
Jul 09

How to speed up IBM WDSC or RDi for faster RPG editing

WDSC7 is the coolest (free) editor for RPG/CL programmers on the IBM i operating system. We know that right? But it’s still annoyingly clunky to use at times, Unless you free it up to use some more memory and let it run free… like a gazelle… even if its a little bit of a parky […]

More Waffle