RPG Questions


How to create a Data Area with RPG for storing variables
How to create a data area using an RPG.I need to create a data area and store some values in it.The value to be stored are also retrieved from the same RPG.(that is from screen variables)

Answer Question   |  December 19, 2008  9:29 AM
Data Area, RPG, RPG variables
asked by:
0 pts.

Decimal data error
For testing an RPG program, I changed the CL program which submits the RPG program to a “call”. The change was to include a new parameter (numeric) to the RPG program. After testing, the Call was changed back to SBMJOB, but when tested again, the RPG program bombed with ‘decimal data error’. What could the [...]

Answer Question   |  December 15, 2008  6:35 PM
CL, CL programs, RPG, RPG Programs, SBMJOB
asked by:
20 pts.

Suggesions for programming task in RPG
Hi I have a task to perform Create a screen with a date and year field,the value given in this field will be mapped to a database file and a set of records will be retrieved from this file with the screen values as select conditions.This has to be further written to a new file. [...]

Answer Question   |  December 15, 2008  11:52 AM
RPG, RPG Subroutine, RPG/400
asked by:
0 pts.

How to manage allocated register problems in RPG?
Hello. I’m having troubles with many allocated registers for update, when 2 users try to modify the same data. How is the correct way to prevent this situation in ILERPG ? Thanks!

Answer Question   |  December 12, 2008  2:56 AM
Concurrency, ILE RPG, Mutex, Mutual exclusion, RPG, RPG ILE, RPGILE
asked by:
2,790 pts.

How to access all records in RPGILE
hi all, suppose i have a report with input criteria ‘machine code’ and requirement it that if i input a perticular ‘machine code’ then it should COME only that , otherwise all records of all ‘machine codes’ should come , in clp i use %WLDCRD for that. but i need to do it in rpgile [...]

Answer Question   |  December 10, 2008  5:21 AM
AS/400 development, LOVAL SETLL, READE, RPG, RPG ILE, SETLL
asked by:
310 pts.

How to get the row count of a PF with RPG ILE?
Hello, I’m looking for an example of how to get a row count of a PF from a ILE rpg program. Thanks everybody.

Answer Question   |  December 10, 2008  2:10 AM
AS/400 database, AS/400 development, PF/LF, Physical File, RPG, RPG ILE, RPGILE
asked by:
2,790 pts.

Clearing a PF record on AS/400
I’m chaining a field to a unique keyed PF. I’m getting a not found indicator so I’m trying to write the record but I receive a duplicate key error. How this can be I do not understand. A colleague suggested that a field (or fields) within the record might be a key of other LF’s [...]

Answer Question   |  December 10, 2008  10:41 PM
CHAIN, Duplicate Key Error, PF, Physical File, RPG
asked by:
320 pts.

rpg
I have created a subroutine to update a display file. key CHAINfile 90 *IN90 IFEQ *OFF MOVELfieldvalue screenvalue EXFMTscreen MOVELscreenvalue filevalue UPDATrecfmt of file END ENDSR Is this logic right? 1.the value in the file is not getting displayed when screen is invoked 2.the field appears blank when updated the file doesnt get updated.

Answer Question   |  December 10, 2008  4:00 PM
RPG, RPG Display File, RPG Subroutine
asked by:
0 pts.

AS400 read of PC files
On the AS400/ISeries/SystemI, I would like to read PC file data from a PC Server into my RPG program. What is the best way to accomplish this task? Right now, it would be for READ ONLY.

Answer Question   |  December 1, 2008  6:28 PM
AS/400, RPG, RPG ILE, RPG import, RPG/400
asked by:
10 pts.

%ERROR function in RPG
How to use % error built in function in rpgle program any code example please?

Answer Question   |  December 10, 2008  4:53 PM
%ERROR function, CHAIN(E), RPG, RPG error handling
asked by:
6r
940 pts.

Sorting data in RPGLE
How to sort data in rpgle program countrywise in program coding only?

Answer Question   |  December 2, 2008  4:46 PM
RPG, RPG arrays, RPGLE, RPGLE Program
asked by:
6r
940 pts.

Data QUEUE – Remote location ….. for program device DDMDEVICE was not found
When trying to use a remote DATA QUEUE the send and receive data queue commands failed giving : Service with protocol tcp not found. Cannot establish DDM connection with remote system. Operation on DDM data queue DTAQFIFO in TESTLIB failed. Remote location MYAS400 for program device DDMDEVICE was not found. I tested the data queue [...]

Answer Question   |  December 6, 2008  9:33 PM
CRTDTAQ, Data Queue, DDM, DDMDEVICE, iSeries RPG programming, RPG
asked by:
15 pts.

RPG COMPLIATION ERROR QCLRTVJA
Hi I am finding error while compliing RPG/400 program error is as follows Message . . . . : Total parameters passed does not match number required. Program QRGRT attempted to call program QCLRTVJA with 47 parameters. Program QCLRTVJA expects a minimum of 48 and a maxmum of 50 can any body tell me which [...]

Answer Question   |  December 1, 2008  6:44 AM
QCLRTVJA, RPG, RPG Error Messages, RPG/400
asked by:
Bu
60 pts.

RPG query
Hi Martin, thanks for the previous query. Now i want to read the data of a DB file and display the data via display file. I have written following code for this: FPFRPG1 IF E K DISK FDSP1 CF E WORKSTN C READ REC C DOW *IN03=*OFF C EXFMT DSP C IF *IN01=*ON C ENDIF [...]

Answer Question   |  November 26, 2008  10:47 AM
RPG, RPG/400
asked by:
20 pts.

FTP with RPG
I have a file which should be ftped to another server.I have the ftp script.Can you suggest 1.code to automatically ftp the file to another server 2.also to send email alerts using snddst if ftp fails.

Answer Question   |  November 26, 2008  9:46 AM
AS/400 FTP, RPG, RPG/400, Send Distribution, SNDDST
asked by:
0 pts.

Dynamic screen designing in RPG
is it possible to design rpg screen at run time. I mean designing and using screen through rpg code.

Answer Question   |  April 3, 2009  7:40 AM
Dynamic screen designing in RPG, RPG, RunTime
asked by:
15 pts.

RPG/Asset
Can a rpg program in asset be converted to rpg400 or ile?If so how

Answer Question   |  November 26, 2008  6:27 AM
RPG, RPG ILE, RPG/400, RPG/Asset
asked by:
0 pts.

DSPF prog
Thanks for ur response.I have a small clarification.If all fields on the screen is from 1 file chain and then exfmt will work.What if the screen has fields form more than 1 file.

Answer Question   |  November 25, 2008  12:51 PM
AS/400 Display File, Display File, DSPF, RPG, RPG/400
asked by:
0 pts.

RPG procedure
Hello Martin, Below is the codeline which i used for reading a DB file via RPG: FMYFILE IF E K DISK C READ PFRPG1 C DOW NOT%EOF C NAME DSPLY C ID DSPLY C ADDRESS DSPLY C ENDDO C SETON LR could you verify the code b’coz i am not getting the output.

Answer Question   |  November 25, 2008  5:32 AM
Database programming, fMyFile, RPG, RPG/400
asked by:
20 pts.

Tools for example unit test source RPG
I need tool for test code. any proposals ???

Answer Question   |  December 3, 2008  7:59 PM
RPG, RPG IV, RPG Testing, RPG Testing Tools
asked by:
5 pts.