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
Program in CL (IBM i series) that retires library objects?
I have four libraries where each has a different selection of a set of programs. Unfortunately i cannot delete the unused programs in the library with SQL, since i need to retire them (so they don't stay on our clients servers).
Is there a way to…

TheMineral
- 63
- 7
0
votes
3 answers
Is there an numeric type in ILE RPG which will overflow without crashing my program?
I'm looking for a numeric type in ILE RPG which will "wrap round" when it overflows, in a similar way to how a C int would. Is there such a thing?

Tarquila
- 1,167
- 3
- 11
- 17
0
votes
1 answer
Calling a RPGIV function from SQL stored proc on DB2
Hi im trying to call a RPGIV function from a stored proc:
CREATE PROCEDURE "VEN60115"."TESTJCALL1"
(IN ADUI CHAR(20),
OUT PRODOPIID1 CHAR(20))
DYNAMIC RESULT SETS 1
LANGUAGE RPGLE
READS SQL DATA
EXTERNAL NAME 'VEN60115/TESTJV'
PARAMETER STYLE…

Renier
- 1,738
- 3
- 24
- 51
0
votes
2 answers
How to send double byte char to DB2 from .net provider?
I get a conversion error from the ibm iseries .net provider when calling a rpg/db2 stored procedure passing a param that contains a double byte char. The same procedure if I pass it normal text.

Arcadian
- 4,312
- 12
- 64
- 107
0
votes
2 answers
Getting a conversion error when calling a Db2 stored procedure in as400 rgp
I am getting a conversion error when calling a stored procedure in AS400/RPG/DB2 using iSeries.
The db2 param is defined as CHAR 32000 and the .net app is passing in about 20000 characters and the call throws an error.
This error seems to occur when…

Arcadian
- 4,312
- 12
- 64
- 107
0
votes
2 answers
What is the best tool for Version Control in OS 400 Environment for RPG and COBOL
What is the best tool (best feature, best price, best support) for RPG / COBOL Version Control under OS 400 development?
I heard about ARCAD and ALDON. Which one is better? Or is there another better tool?

WishKnew
- 649
- 2
- 10
- 22
0
votes
2 answers
Conditional Compilation in RPG(LE)
Can I include a section of code based on whether a variable is defined in my program, or is the preprocessor completely unable to access this information, only compilation conditions? I.e. I'm after something like:
/IF DEFINED(myVariable)
D…

nearly_lunchtime
- 12,203
- 15
- 37
- 42
0
votes
1 answer
Profiling SQL statements in an RPG ILE CGI web program
Normally for profiling SQL statements I run STRDBG, then enter in the SQL in STRSQL.
However, I have a CGI RPGLE program that does many SQL statements, most dynamic, and I would like to profile all of them to see which is slowing the program…

ScottR
- 3,080
- 3
- 32
- 35
0
votes
3 answers
Autogenerate numbers AS/400
I have a field in my display file "EMPID".
This field must be autogenerated and protected.
If i am to use data area how exactly do i include this in my rpg(not rpgle).What are the other possible ways of auto generating numbers in a rpg.Please…

techie
- 467
- 3
- 8
- 23
0
votes
3 answers
Commitment control error on iSeries procedure call
I have an intermittent problem when calling an iSeries stored procedure (consisting of various CL & RPG programs). The error is:-
Commitment definition *N not valid for open of QAOSSI12
Error occurred while opening file QAOSSI12.
As mentioned…

oidsman
- 385
- 1
- 5
- 17
0
votes
1 answer
Logical file not working for SUBFILE/SETLL?
I'm using three logical file with different Record Format
where on the first subfile I'm using LF1 and LF2
where on the first subfile I cannot use *LOVAL SETLL it will give me Run Time Error.
not sure why?
then the program will lead me to second…

user1516536
- 23
- 2
- 5
0
votes
2 answers
Displaying subfiles loaded with sorted database records
Let's say, for example, I have these tables:
USRMF(main physical file)
User ID User Name
A00001 SAMUEL
A00002 ADAM
USRTS
user id date time in time out
A000001 080812 084555 104545
A000001 080812 120800 150000
A000001 …

user1516536
- 23
- 2
- 5
0
votes
3 answers
Verify user,password and open menu of rpgs
I have a login module in my application of AS400(rpg400).Here user name and password are verified and only if password matches the user is given access to the Menu screen which further contains rpg programs to navigate to subsequent modules.
What i…

techie
- 467
- 3
- 8
- 23
0
votes
1 answer
Having different record formats vs Having separate display files
Is it better to have different display files for each category of an application being developed on AS400 or will creating different record formats (or RECORD format type for multiple files within same DSPF) be suitable.
I have 4 screens to be…

techie
- 467
- 3
- 8
- 23
0
votes
1 answer
How to define colors to be used in RPG for subfile display
How can i set color to specific records in a subfile on some condition execution?
I have a display file where the SFL and CTL have been defined.Where can i refer the indicators in the DSP file or use them in the RPG to trigger appropriate…

techie
- 467
- 3
- 8
- 23