RPG Questions


How to copy records from physical to another physical file.
Hi, I have a question when i seen my requirement. I have two physical files and one RPG program. What I need is, I want to write RPG code for ” Copy updated records from one physical file to another physical file” . (Another physical file is for Backup Purpose. ) Regards Surya P

Answer Question   |  September 18, 2012  8:51 AM
Physical File, RPG
asked by:
300 pts.

RPG code for read a particular
I am new to AS/400 pls send me RPG code for reading particular record from a physical file.physical file contain a key field. 

Answer Question   |  August 29, 2012  4:51 AM
RPG
asked by:
220 pts.

RPG Code for reading a particular record
I have a physical file, it contains 20 records. how to read 15ht record using RPG. Pls send me the code for above scenario. 

Answer Question   |  August 28, 2012  11:02 AM
RPG
asked by:
220 pts.

Does iSeries Cache my Java Class?
I am new to Java but have many years with RPG. I created a simple Java program with return value, prototyped it in RPG, executed it and all looked good. Then I tried to expand on the logic, but only the old logic will function. It is very much like it still has an old [...]

Answer Question   |  August 16, 2012  7:04 PM
Cache, Java, RPG
asked by:
10 pts.

rpg program
suppose this is ur pf o/p= a/c no. department sallary 1 A 20 2 A 30 3 B 10 4 B 20 5 C 30 6 C 10 THEN WHAT THE CODE FOR RPG PROGRAM TO GET O/P LIKE THIS? A 50 B 30 C 40 PLEASE SUGEST ME ANSWER

Answer Question   |  August 4, 2012  1:29 PM
RPG
asked by:
75 pts.

Get list of files used in a code
Hi Is there any way we can get the list of files used in an RPG/RPGLE code. I want to check the Level Check Identifier Code used in my file (Checked using DSPFD command) with the Level Check Identifier of same file used in program. Thanks

Answer Question   |  July 16, 2012  5:05 PM
DDS, Level Check, RPG
asked by:
120 pts.

Regex ILE RPG Part 2
So after my failed attempt to get the Regex C APIs working (see earlier post), I rewrote the service program as a wrapper to facilitate the calling of java.util.regex based functionality. All code fragments below. Make a call passing some simple stuff. No luck whatsoever getting a result. Try using the same within a test [...]

Answer Question   |  July 5, 2012  3:34 PM
iSeries, Java, RPG
asked by:
465 pts.

Compiler options in RPG
What is mean by Compiler options (OPTION) in Create Bound RPG Program (CRTBNDRPG).What is the impact in RPG prrogram. Can anyone explain me with examples.?

Answer Question   |  September 28, 2012  6:51 AM
Compiler, CRTBNDRPG, RPG
asked by:
270 pts.

Array file and run time arrays
Hi all, Can anybody tell me what is array file in F-spec, and how we declare run time arrays in D-spec and how we specify array file in I-spec ? can we declare externally discribed file as array file in F-spec. Please clarify me with examples.

Answer Question   |  June 20, 2012  6:29 AM
AS/400, RPG
asked by:
5 pts.

Can I change c0001copybook in RPG?
in rpg c0001 is a standard copybook.if i want to make a new program then can i use this copybook.and for my program some modification is necessary…so can i change this copybook program

Answer Question   |  April 20, 2012  8:07 AM
AS400 - Copy Book, RPG
asked by:
10 pts.

RPG Object verification
Hi, I need to verify if a RPG object on our production AS/400 is the same as on our test box. I used to to look at object size, but it doesn’t always seem to be a consistent way to determine if two objects are the same. Any other way, to determine if two RPG [...]

Answer Question   |  March 17, 2012  9:36 AM
AS/400, iSeries RPG programming, RPG
asked by:
25 pts.

Sorting alphanumeric field with hexadecimal values
We have a task where we have to convert key numeric field (8,0) to alphanumeric field (8A) with hexadecimal values (’00000000′ – ‘FFFFFFFF’). The problem in sorting with alphanumeric is the alphabet is less than the numeric value (A-Z < 0-9). Is there a way, by LF or any AS400 utility, that can sort hexadecimal [...]

Answer Question   |  March 23, 2012  4:17 PM
AS/400, CL, RPG
asked by:
55 pts.

Compile an RPGPGLE Program???
Hi All,  I am making modifications to an RPGPGLE Program but am having trouble compiling it. It does not like the option 14 compile within the PDM and I think there is another option that can be used or command for the compile but I seem to have forgotton what that is. Anyone able to [...]

Answer Question   |  March 17, 2012  3:03 PM
Compile, PDM, RPG
asked by:
30 pts.

Want to make a utility to search string.
[h3 class="groups"> Hi,[/h3] [h3 class="groups">I want to make a utility in AS400 to search a string (Such as file name/PGM name) in my current Library and in all Source physical files if found show PGM and all related files. Like I do trough find string Command. [/h3] It would be also help ful you can [...]

Answer Question   |  March 17, 2012  3:09 PM
CL, CLLE, RPG, RPGLE
asked by:
100 pts.

External data structure retrieve field data types
In RPG I am trying to move a External DS (based on a file, filled on input) to a character string and convert all decimal (packed) values to their character representation while doing so. I need to repeat this action on multiple files so a simple or generic solution is what I’m aiming for. Since [...]

Answer Question   |  February 28, 2012  12:45 PM
AS/400, RPG
asked by:
55 pts.

Select substring from clob-field with sql
How do you copy substring from clob-field with SQL if substring from/to positions are varables? This works OK (RPG free w embedded sql): exec sql select substr(myclobfield, 25, 70)                 INTO :mystring                 FROM MYLIB/MYFILE; [/pre] Whereas this causes a compilation error: from = 25; to    = 70; exec sql select substr(myclobfield, :from, :to)                 [...]

Answer Question   |  March 31, 2012  3:03 PM
Embedded SQL, RPG, SQL, SUBSTR, Variable Length Subnet Mask
asked by:
2,540 pts.

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.