An H spec keyword that you might be missing
CCSID(*CHAR : *JOBRUN) Do you have this keyword in your H spec copy file that gets copied into all your source? Or if you don't use a copy file, do you have this option in all your source? You should almost certainly have this keyword. It was introduced officially in V5R3, and through PTFs in V5R1 and V5R2. Why do you need this keyword? RPG has a very strange default way of dealing with the CCSID of alphanumeric data. It should be assuming that... [Continue Reading]
Tags:  rpgcafe rpg |
PTFs to make it easier to use data structures for subfile I/O
During testing for Open Access, we were reminded of how awkward it is to use a data structure for I/O to subfiles. Subfiles always use the WRITE operation and at least one of either the CHAIN or READC operations, and possibly the UPDATE operation. This requires a *INPUT data structure and a *OUTPUT data structure. This isn't unique to subfiles; it's a problem for any record that is used for both input and output. But it's always a problem for... [Continue Reading]
Tags:  subfile rpgcafe |
Is debug active? Here's a procedure that tells you
Do you ever want some code to run only when the debugger is active? Here's a procedure you can call to find out: Test program /copy indebug
/free
if inDebug();
dsply ('The debugger is active');
else;
dsply ('The debugger is not active');
endif;
return;
Member INDEBUG_PR containing the prototype /if not defined INDEBUG_INCLUDED
D inDebug pr n extproc('inDebug')
/define... [Continue Reading]
Tags:  rpgcafe debug |