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
0
votes
2 answers
RPGLE Leading zeros for non empty field only
I have subfile with first record using as fields for adding new file record. It's have to look like this.
___ ___ ___
FOO 001 002
BOO 003 004
Some of the fields must be numeric with leading zeros. A the same time for the first row it have to be not…

Alexandr Koshkin
- 3
- 3
0
votes
2 answers
AS/400, iSeries, System i Objects - Number of ODT entries - what do they relate to in RPG source
In trying to find which RPG source file has been used to create an object, I'm looking to use object size, number of MI instructions and number of ODT (object definition table) entries to confirm which source file was used to create the object.…

user3880011
- 5
- 3
0
votes
1 answer
SQL access to RPG OPM database files
I have to evaluate the legacy software used by a company my employer intends to buy. The software was originally programmed in RPG II (or III?) for IBM System/38 and been continuously expanded since. It now resides on a brand new i Series server…

leisurelarry
- 353
- 2
- 12
0
votes
3 answers
How can i use Java to call an existing RPG screen program?
I have existing RPG4 programs with green screens, i would like to be able to call the rpg programs with Java and bypass the green screens.
I have done some research on this and IBM OAR (Open Access: RPG) keeps coming up. but i have not found a…

Lightning
- 85
- 1
- 6
0
votes
3 answers
Print contents of rpg file in human-readable format
Context
A friend of mine is having trouble printing source code to a human readable format.
The compiled (I assume) programs of their welding robot have the .rpg extension. They want to collect print-outs in human-readable format, possibly for…

Maarten Bamelis
- 2,243
- 19
- 32
0
votes
0 answers
php-cli on IBMi error/notice reporting
We have developed a PHP script to build PDF's and send emails which then get called from an RPG program using QP2SHELL. For our developer users the errors go to the standard PHP error log, but for our customer's users it's printing on their default…

MaKR
- 1,882
- 2
- 17
- 29
0
votes
2 answers
How to call IBM External Stored Procedure from PHP
I finally understand the differences between SQL Stored Procedure and External Stored Procedure which is based on RPG or any other AS400 objects.
Now I tried to add the call statement to execute the External Stored Procedure which has only one out…

beerneko
- 21
- 8
0
votes
2 answers
iSeries - Record lock by same job/session
I am having trouble with below scenario.
There is a record lock on a file MYFILE from Program A. Later Session gets disconnected abruptly with a record lock on MYFILE and it executes cancel handler routine. In cancel handler program routine (Program…

surisimha
- 1
- 1
0
votes
2 answers
RPG Restrict user entry of the special character '|' in any Name fields or any data entry fields
I want to restrict the user from entering the special character '|' (pipe) in any name field or data entry fields.
The check should happen from the screen itself and not through RPG/RPGLE program (as described here
How to prevent user from entering…

Saad
- 93
- 2
- 9
0
votes
2 answers
SaveObject Job Fails on RPG Program Call From Java
I am trying to call an RPG program from Java. I can get the program to run correctly using the DriverManager as follows:
Connection conn = DriverManager.getConnection("jdbc:as400://" + "sys" + "", "username", "pass");
Statement stmt =…

Chandler E.
- 113
- 1
- 11
0
votes
4 answers
View value of variables in some kind of output in IBM RPG
I am trying to learn IBM RPG and rewrite a program for my employer. I need a way to see whether my variables are getting assigned to the values i expect them too but i dont know how to output something to my screen to just display the values. Is…

user519670
- 685
- 3
- 15
- 23
0
votes
2 answers
Not locating a field for compile of RPG program
I have an rpg program that is not compiling. the strange thing: it's missing some fields as stated in the output. 7030. But I dont' see these fields in the file it is supposed to reside on. I know this because I can compile the program in Production…

Adams
- 195
- 1
- 10
0
votes
1 answer
Error while Invoking AS400 RPG From Java
With respect to my yesterday's question on invoking RPG program using Java, the below exception is through from RPG Program.
****Application error. RNX9001 unmonitored by ZM30000R at statement *N, instruction X'0000**'.**
I have used the code that…

Srinivas
- 1,383
- 5
- 20
- 28
0
votes
1 answer
Calling Java from RPG, can not find my Java Class
Trying to call a Java Method from RPG, I have been following the manuals Introduction to Java and RPG and Calling Java Methods from ILE RPG.
But when I call my RPG function that calls my java function I get the following error:
Java exception…

ZioN
- 550
- 2
- 11
- 35
0
votes
1 answer
have to delete records from production master tables
This code is a purge program. We want to purge customers who never ordered anything (in the company they keep record if someone is a 'potential' customer.)
This will run first in a test environment but eventually against production. We will keep the…

Pinchas K
- 1,541
- 3
- 13
- 19