RPG Questions


Are there any Synon experts out there? (20 plus years)
Experienced, 20 years plus, synon developers have probably forgotten more about synon than the new generation (yes there are young people learning synon) will ever know.   Does any of those experts remember the phantom + sign on subfile displays when there were no more records to display?  If so, what is the solution to [...]

Answer Question   |  March 17, 2012  7:46 PM
RPG, RPG ILE, RPG IV, RPG Language Support, RPG/400, RPGILE, RPGLE, Synon, Synon 2E, Synon/2E, Synon/Cool 2E
asked by:
140 pts.

OPNQRY File
OPNQRYF Query Hi, I am having difficulty in figuring out the syntax for using the special keyword %values with the variables in the OPNQRYF command. Below is the &QRYSLT I used.  CHGVAR VAR(&QRYSLT) VALUE(‘(DQB8ST *EQ “A” *AND + DQJRCE *EQ %VALUES( ‘ *TCAT &MARKET + *CAT ‘ )) *OR (DQB8ST = “D” *AND DQZRCD = [...]

Answer Question   |  March 17, 2012  12:33 PM
AS/400, CLP, OPNQRYF, RPG, value
asked by:
125 pts.

RPG FREE Reference Book
Currently, I am using RPG IV. However, I need to learn how to code in RPG Free. Can anyone tell me the names of some good books and/or tutorials which would help with this?

Answer Question   |  October 14, 2011  5:59 PM
RPG, RPG ILE, RPG IV, RPG Language Support, RPG/400, RPGLE
asked by:
165 pts.

Reading only the active records in a flat file
I have a physical flat file which has thousands of deleted records. (I can’t get exclusive use of the system to do a reorg) I am doing a sequential read of the file because the file only has a few active records. However, it is taking the program awhile to finish and I’m guessing it is [...]

Answer Question   |  March 31, 2012  7:05 PM
AS/400 flat file, RPG, RPG ILE, RPG IV, RPG/400, RPGILE, RPGLE
asked by:
165 pts.

RPG internally described output (printer) file to DDS
How do i convert an old RPG internally described output (printer) file to an externally described DDS printer file?

Answer Question   |  March 31, 2012  4:20 PM
DDS, iSeries printing, RPG, V5R4
asked by:
140 pts.

SQL to query a file
I want to use SQL to query a file and summurize data, using multiple scalars( min, max, sum) and display the results on a workstation screen.  Can i use one select statement in RPG iseries or should I create a stored procedure?   Any code samples,etc would be greatly appreciated.  

Answer Question   |  March 31, 2012  4:31 PM
Open Query File, RPG, SQL, SQL Query
asked by:
rmb
115 pts.

dspfile in rpg
can we do debugging a dsp file in rpg? if its so how is possible? plz give me the steps?

Answer Question   |  March 31, 2012  11:57 AM
Debugging, DSPF, RPG
asked by:
1,350 pts.

Filed in D specs is not getting initialized on the 2nd call to program.
My RPG programs fields in the D specs that are set to initialize Example(D Fld1    S      1A     INZ(‘Y’) will work the first time the program is called but not on the second call of the same program.

Answer Question   |  March 31, 2012  4:48 PM
AS/400, AS/400 administration, RPG, RPG Date Formatting
asked by:
25 pts.

RPG date retrieval
how to retrive the next 7th date of current month using rpg? EX: today’s date is 06/09/2011 i want to get the date 13/09/2011, how it’s possible?

Answer Question   |  March 31, 2012  10:59 AM
Retrieve Data Area, RPG, RPG Data Fields
asked by:
1,350 pts.

subfile processing – Incorrect record number in subfile SFLRCDNBR or SFLSIZ field.
I am getting the above error – this the dds specs  A A R SUBDTB SFL  A SUBPART 35A B 6 18   A R SUBCTLB SFLCTL(SUBDTB)   A*%%TS SD 20031114 134548 KAUSC REL-V5R2M0 5722-WDS   A SFLSIZ(0020)   A SFLPAG(0010)   A ROLLUP   A ROLLDOWN   A 60 SFLDSPCTL   A N61 OVERLAY [...]

Answer Question   |  March 31, 2012  6:09 PM
AS/400 errors, AS/400 Subfiles, RPG, RPG Error Messages, Subfile Control Record
asked by:
65 pts.

Creating two receivers
i need to crt more than a 2 rcvr for a user to monitor his different jobs, like CL,RPG,SQL.but there is no option to crt more than two? why itis so?whats the truth behind it?

Answer Question   |  March 31, 2012  10:07 AM
AS/400 administration, CL programs, Journal Receivers, RPG
asked by:
1,350 pts.

Can I write a program in CL to update a record on a database file
Hi, I am not familiar with RPG . Is it possible to write a program in CL to update records in a database file. I have thought about SQL , however I do not have any SQL frontend installed on the AS/400

Answer Question   |  March 31, 2012  12:04 PM
AS/400 SQL, CL programming, CL programs, RPG
asked by:
15 pts.

DBF in AS/400 – last record written
Hi , There is  file which has 6 fields and the first four as its key. Is there any way to figure out which is the last record written into it.   Thanks

Answer Question   |  June 22, 2011  3:58 PM
AS/400, AS/400 Database File, Database Files, RPG, RPGLE
asked by:
130 pts.

Algorithm for parsing a RTF file ? anyone? ?
I need to extract the user entered text from RTF files held within the IFS. Microsoft have a quaint ‘specification’ which incorporates several ‘standards’ for the syntax of control words. Does anyone have any RTF reading code that will run on an IBM i? – doesn’t need to produce a print, or do anything but [...]

Answer Question   |  June 20, 2011  3:04 PM
IBM i, IFS, RPG, RPGLEPGM, RTF, V5R4
asked by:
5,505 pts.

AS/400 (Retail) Banking application
Hi, I’m looking for some details and materials on any AS/400 retail banking application. Information in design level.. You may ask what exact requirement is but as of now I need a model which uses technology RPG, CL, SQL, menu screens, display files etc pls.. Thanks

Answer Question   |  June 20, 2011  8:48 AM
AS/400, AS/400 SQL, CL Program, RPG
asked by:
125 pts.

CPF5032 member already locked to this job
I have a program written in RPGLE which calls numerous other programs. These programs all share similar files. In my main program, when trying to read a particular file, I get error CPF5032 even though I unlock the file right before I do the setll reade. As a result, I figured the lock must be [...]

Answer Question   |  February 21, 2012  6:39 PM
*INLR, CPF5032, RPG, RPG ILE, RPG IV, RPG Programs, RPGILE, RPGLE, V5R4
asked by:
165 pts.

RTVSRC: Finding the RPG38 source
I know this is very old question but I can not find tool on internet. I have one rpg38 program compiled on V1R7. The program compiled form QRPGSRC/LIBTEST but looks like LIBTEST was deleted. Now how can I find the this RPG38 source. Thanks, Ali

Answer Question   |  May 4, 2011  2:44 PM
AS/400, AS/400 programming, QRPGSRC, RPG, RPG Program
asked by:
370 pts.

Subfile code for AS/400
In Subfile, OPT   ShipQuantity   QuantityToShip   Item#   CustomerOrder#        ___     ____________   100                  ABC1     CO100010                 ___     ____________   10                    WQE1    CO100010               This is my SFL Records, Here 2 items,same CustOrder, Qty to ship is 100 & 10,So user can give SHIPQTY <=100 for item(ABC1) and second item wqe1 as SHIPQTY <=10 Selling Price is 100… I have entered 5 for [...]

Answer Question   |  June 10, 2011  11:36 AM
AS/400, AS/400 Subfiles, RPG, Subfile
asked by:
510 pts.

Free format subdur minutes from a time
I am trying to search for the correct syntax for subtracting a minute from a time. I have a 6 numeric time field in HHMMSS format.  I am trying to use free format to subtract a minute.  Having trouble. Using: @atime=%dec((%time(@atime:*hms)- 1 *min) :6:0)                                    Getting compile error saying “The name or indicator minis not defined”  tried [...]

Answer Question   |  May 4, 2011  6:39 PM
Free form syntax, RPG, RPG Code, SUBDUR
asked by:
15 pts.

Embedded SQL in rpg for subfile build SQLCOD
My fetch next in sql is getting sqlcod = -000000181 and sqlstt = ’22007′.  I looked this up.  It says invalid date or time. Pointing to date data types in the file I am trying to read. The records contain two date fields and two time fields. How can I get around this?   Thanks [...]

Answer Question   |  May 10, 2011  6:07 PM
RPG, SQL, SQLCOD, SQLRPGLE
asked by:
1,380 pts.