RPGLE Questions


How can we write an AS/400 subfile program without using any indicators?
How can we write a subfile program without using any indicators(Even no indicators for SFLDSP, SFLDSPCTL)?

Answer Question   |  August 25, 2011  10:06 AM
AS/400 Subfiles, RPG indicators, RPGLE
asked by:
Vgf
5 pts.

How to find number of bytes read/written in RPGLE?
Dear AS/400 Lovers! In a program, I need to find the number of bytes read from a file(FILE1) & written to another file(FILE2) in RPGLE. I need to maintain this in an Audit-file for Audit purposes. Has anybody done this earlier? any help would be of great value. Thanks in Advance, Svanky

Answer Question   |  November 10, 2010  11:55 AM
AS/400, AS400 RPGLE, DB2/400, RPG/400, RPGLE
asked by:
320 pts.

How to sort Alternate Array?
Arr1       s        10 A Dim(4)   Perrcd(2)  Fromfile(abc) Arr2       s         2  0  Dim(4) Alt(arr1) Now , I have load records From file to that array then i want to show these record in reverse Order How i can do this?

Answer Question   |  October 23, 2010  9:55 AM
Array, AS/400 Load Testing, Load testing, RPGLE
asked by:
185 pts.

OPNQRYF and iSeries V6R1 issue
I had responded on a previous issue and it is suggested I create a new one for mine. Doing that and I am adding some of the info below my question.  I hope this is not too confusing.  I apologize in advance if so.  I starting having an issue with a RPGLE program after it [...]

Answer Question   |  October 6, 2010  1:41 PM
iSeries, OPNQRYF, RPGLE
asked by:
VGP
300 pts.

Command to track how many spool files users have
I have certain users who never clean out their spool files. Is there any command I can run which will tell me how many spool files a user has out there? I am currently on version V5R4 of the operating system

Answer Question   |  September 29, 2010  3:20 PM
AS/400 Spool Files, CLLE, iSeries Commands, RPG, RPG ILE, RPG IV, RPGLE, Spool files, V5R4
asked by:
165 pts.

Embedded SQL in RPGLE
I am trying to get some counts and totals from one file and put them in another. My SQL statement works fine with STRSQL, not in the RPGLE. Do I have to declare/set a cursor, exec sql and close the cursor just to put the total in another file? C/EXEC SQL C+ INSERT INTO outputfile [...]

Answer Question   |  September 29, 2010  2:02 PM
Embedded SQL, MySQL, RPGLE, SQL, SQL statements
asked by:
165 pts.

When will AS/400 record lock?
Hi Guru’s , I am new to RPG . I would like to know when record will be locked ? Example-1 : PGMA, using a PF1(Physical file) in input mode , PGMB using a logical file based on PF1, in input mode. In this case record will be locked or not (using read or chain [...]

Answer Question   |  September 28, 2010  8:58 AM
AS/400 Records, Record lock, RPG Record Locks, RPGLE
asked by:
30 pts.

Communicate with a RS232 device in my RPG program
I need to retrieve the weight from a scale hooked to my PC with via RS232. I need to send the device a character(P) and which will trigger the scale to send back the weight. Thanks.

Answer Question   |  September 24, 2010  2:17 PM
AS/400, Electronic Data Interchange, RPG Program, RPGLE, V5R4
asked by:
5 pts.

SQL RPGLE – How to override data set data structure at run time
I currently have an SQL RPGLE routine that receives a SELECT statement as a parameter and then fetches the data set into a data structure based on the file. This only works over a single file as the datastructure is created at compile time and has to be based on filea. I would like to [...]

Answer Question   |  September 23, 2010  1:43 PM
iSeries, RPGLE, SELECT statement, SQL, SQL Select statement problem, SQLRPGLE
asked by:
20 pts.

Can a Display File be used in an RPGLE program running in batch?
I would like to convert an interactive RPGLE program to run in batch mode and would like to keep from replacing the display file in the batch version. Like the interactive version, the batch version would have to write/update and read each of the 3 subfiles in the display file, but would use no WRITE’s [...]

Answer Question   |  September 2, 2010  9:01 PM
Display File, iSeries, RPGLE, V5R4
asked by:
TJA
10 pts.

How to write flat file data into pf?
Hi,,  M25 is one of my flat file which is 34 char length. I want to write data from flat file to normal pf. Pf contains 3 char field which is equally devide. Now generaly to read file we have to requre key field but flat file doesn’t have any key field then how i [...]

Answer Question   |  August 30, 2010  4:12 AM
AS400 physical file, Flat files, Physical File, RPGLE
asked by:
185 pts.

What is the best way for me to handle clearing work files?
Program in RPGLE. I have 2 work files in my program. They hold possible matching data for a name, birth, etc. I have rules where I search the file and determine how many parameters match. I have to delete records if I don’t have a minimum of fields matching.  I make several runs through the [...]

Answer Question   |  September 1, 2010  7:51 PM
AS/400, RPGLE, Work Files
asked by:
140 pts.

MQ depth through CLLE Or RPGLE programs
am trying to search is there a way to know the MQ depth in RPGLE or CLLE programs using some set of MQ API’s or MQ command.

Answer Question   |  August 24, 2010  10:08 AM
AS/400, CLLE, MQ, MQ depth, RPGLE
asked by:
5 pts.

Handle Position to With Load All Subfile?
How to handle position to with load all subfiel? (I know this concept  with single pg subfile)

Answer Question   |  August 20, 2010  6:52 AM
RPG/400, RPG/400 Subfile, RPGLE
asked by:
185 pts.

How to identify the AS/400 program names which is using the Specific module?
How to identify the program names which is using the Specific module? Module1 is used in Pgm1, Pgm2, and Pgm3.. How to identify program names which is related to module1?

Answer Question   |  August 16, 2010  4:10 AM
AS/400, AS400 RPGLE, RPGLE
asked by:
1,025 pts.

Expanding subfile in OS/400
HI, I am doing a small program on expanding subfile(page forward). ITs working fine till display. BUt if I press the page down till the last page its fine,after that too (last page is shown) if i press pagedown the last record is getting added again and again and so the subfile size is getting [...]

Answer Question   |  August 16, 2010  8:12 AM
iSeries, OS/400, RPGLE, V5R4
asked by:
1,150 pts.

AS400 call from dot net component
I have dot net system which calls RPGLE program interactively. the AS400 program processes stuff perfectly when called from AS400. however when called from dot net following happenes- 1. dot net componet doesn’t return any error. end code is – 0. it runs successfully. – this means there is no wrong library issue, authority issue. 2. at [...]

Answer Question   |  October 27, 2010  10:40 AM
.NET, AS/400, RPGLE
asked by:
70 pts.

Loading multiple subfields in RPGLE
hello sir, Actually i know the procedure how to load subfile  i have done this. But I want to load two subfile at a time in single screen , Just tell me the procedure which functionality i have to add in this problem ,,, Suppose I have two display record format then right now what [...]

Answer Question   |  August 7, 2010  11:11 AM
RPGLE
asked by:
185 pts.

Subtracting Date/Time AS400 V5R4
I am familiar with the subdur command. I have used it to get the # of days between 2 dates and the number of minutes between 2 times. How do I get the difference in minutes when the times fall on separate days. I guess I need to know how to calculate the interval between [...]

Answer Question   |  September 8, 2010  12:37 PM
RPG, RPG Date Formatting, RPGLE, V5R4
asked by:
165 pts.

Copy Books IN RPGLE
How the Source statements of COPY book can be viewed while Debugging a source.

Answer Question   |  July 30, 2010  4:27 AM
AS/400, AS/400 debugging, Copybook, RPGLE
asked by:
140 pts.