RPG Questions


RPG %SCAN Question
I am unable to get all the scanned records for a string in a file. For example, my file itemmast has 1000 records in it. When I use Query 400 and search for ‘cable’ I get 50 records with the word cable in various positions of a 30 character field. When I use the statement [...]

Answer Question   |  June 5, 2008  4:18 PM
AS/400 Query, RPG, RPG IV
asked by:
250 pts.

Printing Logos
We are eliminating some preprinted forms and creating the forms ourselves. The problem is these preprinted forms have our company logo on it. How can I add a logo to a report created on the AS400 in RPGLE?

Answer Question   |  June 4, 2008  5:09 PM
RPG, RPG III, RPG IV, RPG/400
asked by:
165 pts.

Calling an RPG from a Win/Web application
Hi, I look for a SSO solution. My customer wants to call a native RPG program (with displayfile) starting from a Graphical (Windows or browser) application without logon since the user is already signed in. All suggestions are welcome. thx Mathy

Answer Question   |  April 23, 2010  1:46 PM
AS/400, GUI, RPG, Single sign-on, SSO
asked by:
30 pts.

RPG/400 – Window Subfile
I want to display a footer on a window subfile. I have used a window subfile which displays a list of codes. And want to have a footer on this window. For this I used a simple WINDOW having the same border formats and position as that of the Window subfile – this contains just [...]

Answer Question   |  June 4, 2008  6:30 AM
RPG, RPG/400, Subfile
asked by:
75 pts.

In RPG/400 how can I tell what prgrams are in the call stack so I can avoid “called itself recursively” error?
In RPG/400 how can I tell what prgrams are in the call stack so I can avoid “called itself recursively” error? Is there an easier way than passing a parm or populating a data area, like is there a system command that could provide this information?

Answer Question   |  April 22, 2010  4:05 PM
AS/400, RPG, RPG/400
asked by:
Drm
10 pts.

CHECK & SCAN IN AS/400
What would be output of follwing calculations in rpg/400 code? XYZ SCAN ABCXYZ RESULT? XYZ CHECK ABCXYZ RESLT1? I mean to say what would be the values of result fields in above code.

Answer Question   |  June 24, 2008  7:16 AM
AS/400, RPG
asked by:
6r
940 pts.

reading values through data area except IN & RTVDTAARA ?
Is there any other way to read values through data area except Using ‘IN’Opcode in RPG and RTVDTARA command in CL? Pls. tell if it could be done in other ways in our RPG programme or in our Cl programme?

Answer Question   |  May 11, 2012  6:00 AM
CL, Retrieve Data Area, RPG, RTVDTAARA
asked by:
6r
940 pts.

updating pf using simple rpg/400 code.
How can i update a pf using simple rpg code.and please also explain with examples use of setll, chain, setgt, Readc and sflnxtchg?

Answer Question   |  June 18, 2008  4:37 AM
CHAIN, EXCPT, PF/LF, RPG, SETLL
asked by:
6r
940 pts.

RPG/400 – Subfile
How to code a ‘Position To’ functionality in a ‘Load All’ subfile? I.e Once we load all the subfile, and the element is present in the 5th page, then how to postion the display to the 5th page?

Answer Question   |  April 22, 2010  6:10 AM
RPG, Subfile
asked by:
70 pts.

RPG/400 How to Pass Hexa values
i want to pass hexadecimal values from calling progrm to called program through PARM parameters can any one suggest me how to pass including OCTADECIMAl Values

Answer Question   |  April 21, 2010  11:06 AM
AS/400, Hexadecimal values, RPG, RPG/400
asked by:
695 pts.

RPG/400 – return parameters
Since we can pass parameters to a RPG program using *ENTRY and PLIST, Is it possible for a RPG program to return back any values to the calling program? Suppose I want to have a module which checks if a year is leap or not, I am bound to have this as a Subroutine and [...]

Answer Question   |  April 21, 2010  8:07 AM
AS/400, RPG, RPG/400
asked by:
70 pts.

Reading Subfile
How we can read whole subfile (whether records are changed or not)?

Answer Question   |  April 21, 2010  6:20 AM
RPG, RPG ILE subprocedure, Subfile
asked by:
55 pts.

I Put a HEX on youuuuuuuu……
Does anyone have any suggestions as far as reference material that would help me understand EBCDIC Character sets, Hex, Binary, and how you can tie them into CL’s & RPGLE’s, and whatnot?

Answer Question   |  April 21, 2010  2:43 PM
Binary, CL, CLLE, CLP, EBCDIC, Hex, RPG, RPGLE
asked by:
685 pts.

Timestamps
I wish to: 1.) define a timestamp and initialize it to system date/time. What odes the D spec look like for this or can it not be done in the D spec? 2.)Load a data structure whihc is formatted to match timestamp defaults with data by field (CCYY MM DD…etc,). I want to then 3.) [...]

Answer Question   |  May 19, 2008  7:47 PM
D-Spec, RPG, Timestamp
asked by:
10 pts.

Line of code in a RPG400 and RPG ILE Program.
What is the size of RPG400 and RPG ILE program in the sence of Line of code? If my RPG400 program exceed the limited size then how can resolve this problem means i have to add more line of code to the program.

Answer Question   |  June 5, 2009  12:53 PM
RPG, RPG ILE, RPG/400
asked by:
55 pts.

convert alphanumeric to binary
hi, my program is receivng an “alphanumeric char 10 length ” and im using it to chain a PF, but the field from the physical file is binary 9,0, how will i able to convert an alpha10 to binary 9,0 in RPGLE?

Answer Question   |  April 21, 2010  3:40 AM
RPG, RPGLE
asked by:
5 pts.

AS400 to Windows control application
Hi there, I am automating a AS400 based process. The process gets inputs from notepad files on Windows server. After I have processed these files through my RPG, CL programs, I need to take following steps I have 14 files in a windows folder. 1. Create a new folder on windows server. 2. Move those [...]

Answer Question   |  May 13, 2008  12:57 AM
AS/400, CL, RPG, RPGLE
asked by:
70 pts.

Converting RPG3 to C
Does anyone know of a tool that converts RPG3 Source code into C or C#? We are hoping to do this with minimal re-programming.

Answer Question   |  May 27, 2008  5:33 AM
C, C#, Porting, RPG
asked by:
5 pts.

two PF have same field
there are two PF, each Pf have same named field, but the length of the field not same. how can i use the field in the program?

Answer Question   |  April 19, 2010  1:51 AM
PF/LF, RPG
asked by:
15 pts.

Length in Variable
i m working in RPLE/400 i want to know that how i define a feild but feild length should be variable

Answer Question   |  April 29, 2008  7:35 AM
RPG
asked by:
5 pts.