DO NOT use this tag for Role Playing Games!! RPG (Report Program Generator) is a high-level programming language (HLL) for business applications. IBM is the creator and primary vendor of RPG, but the language is available from other mainframe and microcomputer manufacturers, including Unisys. Use this tag for older non-ILE versions of RPG from IBM and for non-IBM variants of the language.
Questions tagged [rpg]
280 questions
2
votes
3 answers
Why does unused file fields are having blank value?
I have a table named
EQRECORDS
as below-
A R REQ …

Vikash Shukla
- 55
- 1
- 2
- 12
2
votes
1 answer
Now to structure return parameter to accept boolean values with XMLService?
I am trying to call an RPGLE service program from PHP using the PHP Toolkit. The procedure returns a data structure that includes an element of type N (indicator) and returns either *off or *on.
I am trying to figure out how to structure my return…

Sarah Kemp
- 2,670
- 3
- 21
- 29
2
votes
1 answer
DB2 AS400 & RPG please explain relationship
DB2 AS400 & RPG
Please explain relationship in simple way since I'm quite confuse after doing some research
So far I understand DB2 is a kind of database for AS400 System written in RPG programming Language.
Is this correct?

eathapeking
- 329
- 2
- 6
- 17
2
votes
1 answer
Setting %nullind rpg using one line
Is there a way in RPG to assign a boolean value in one line without a if statement?
for example in C# you can do:
bool x = (some condition = true);
is there a way to do something like this in rpg:
%nullind(FIELD) = (FIELD=="");
Is this the right…

Arcadian
- 4,312
- 12
- 64
- 107
2
votes
2 answers
Call RPG function from Java
I want to find away to call a RPG Function from Java. I must be able to pass in parameters and to return result sets, and output parameters.
I was able to find this but it is using a stored procedure. Not the way I want to go.
I also found this…

ZioN
- 550
- 2
- 11
- 35
2
votes
1 answer
*INLR and while(true) in RPG
I'm looking at some legacy programs, where code like the following is found:
C/free
Dow 1=1;
SubRoutine();
EndDo;
*INLR = *On;
/end-free
The program in question is a server-like program, where the sub routine handles incoming…

Eyvind
- 5,221
- 5
- 40
- 59
2
votes
2 answers
can only read one value
I write a program to read the physical file:
0002.00 A REF(USRMF)
0002.01 A R TSREC …

user1516536
- 23
- 2
- 5
2
votes
3 answers
How to set compiler options for activation groups in RPG or CL programs?
Is there any way to specify for a program source, what options for the activation group should be used during compilation?
In most of our programs on the as/400 we need to change the handling of the activation group (since the default behaviour is…

kratenko
- 7,354
- 4
- 36
- 61
1
vote
3 answers
Aldon and CVTRPGSRC from RPGIII to RPGIV
I have a program that I want to convert from RPGIII to RPGIV. I cannot figure out how to get ALDON to do it. I am on release 7.5E on the iSeries (green screen).
I have converted the source outside of ALDON and within ALDON I have changed the…

Michael
- 152
- 2
- 13
1
vote
3 answers
How to define the calling program when using Iseries ODBC?
Is there a way to define the calling 'program name' when using the Iseries ODBC driver? When I run a command against our AS400 using the Iseries Access ODBC driver, the calling program in the call stack of the as400 shows the program name as blank.…

Bill Martin
- 4,825
- 9
- 52
- 86
1
vote
1 answer
Prototype not used in called RPGLE program , but the program still works
I have a program SS150R where the PI is declared as
Dcl-pi SS150R;
pCompcd Char(4);
ptrncd Packed(3:0);
pErrMsg Char(30) options(*nopass);
pSuccess Char(1) options(*nopass);
End-pi; …

Kunal Roy
- 729
- 3
- 11
1
vote
0 answers
Does a PHP SOAP web service consumsed by RPG need a WSDL?
I have a very basic, beginners PHP web service:
…

Adam
- 187
- 1
- 2
- 14
1
vote
1 answer
Problem with a fixed column RPGLE program
I'm having trouble with program maintenance on an older program that I don't fully understand. The program in question is building a file with a generated name to send to a remote FTP server. The problem is that the remote FTP server doesn't get the…

jaspoe30
- 53
- 3
1
vote
2 answers
RPGLE code to RPG - Count number of Digits
I am having an issue with coding this, I need some similar code with this but written in RPG to count the digits in a number.
NumField (15, 0) packed decimal
EVAL numDig = %len(%trim(%char(NumField)))

zen
- 11
- 2
1
vote
1 answer
Merge and split tiff images using RPG programming language
Has anyone ever split or merged tiff image files using the “RPG” programming language ? I know it can be done using Java and libTiff but I need RPG to do it as this is a pure RPG shop. I would appreciate any code showing this implementation.

Jim Barnes
- 11
- 2