RPG ILE Questions


Retrieving Subfile Size in RPGLE
Hi Is there any way for us to retrieve subfile size in RPGLE code instead of hard coding it by seeing from the display file. -Vivek

Answer Question   |  June 14, 2012  4:08 PM
RPG ILE, Subfile Size
asked by:
120 pts.

Can not able to declare character field with the length of 6000 in SQLRPGLE program.
Hi, I am declaring a stand alone character field with the length of 6000 in my SQLRPGLE program, but when i debug the program to see the the values in this character field i could find only 1024 length is allocated for this field. Could anyone please help me urgently to declare a character field [...]

Answer Question   |  March 26, 2012  9:30 PM
AS/400, RPG ILE, SQLRPGLE
asked by:
695 pts.

Using RPGLE Fixed Format keywords in Free Format
Hi, How can we use the various keywords in rpgle free format such as sub file next change, key list, etc. It would be more appreciable if some link for reference document is given. Thanks, Vivek Sharma

Answer Question   |  March 17, 2012  3:36 PM
Free Format, RPG ILE
asked by:
120 pts.

snddst- in RPG
i am trying to use the SNDDST command in an RPGLE program. It works to one email (*PRI), i want to do a (*BCC) to another user but i get an errro. anyone have any code sample to do this operation? thanks

Answer Question   |  March 17, 2012  9:15 PM
AS/400 email, RPG ILE, RPGLE, SNDDST
asked by:
rmb
115 pts.

Commitment Control Problem
I have an existing ILE program which now requires a BNDDIR. This program is called from a CL which sets STRCMTCTL LCKLVL(*CHG). I have added the following ‘h’ spec to the program: bnddir(‘ICEUTILITY’) actgrp(*caller) dftactgrp(*no). But when the program is called it fails with ‘Error message CPF4326 appeared during OPEN for file’. I cannot resolve [...]

Answer Question   |  March 17, 2012  10:17 AM
RPG ILE
asked by:
20 pts.

AS400 – RPGLE, convert character to numeric.
Hi all…!         Here i give you the code. DNum_tmp           c              ’18745678′ I declared Num_tmp like this and i did some operations then i got  Res_tmp = ’18745678′ . Now the question is i want to convert this char value to decimal that is addtionable. is this clear ? boz i need to add [...]

Answer Question   |  March 6, 2012  12:35 PM
AS400 RPGLE, RPG ILE, RPGLE
asked by:
1,485 pts.

Passing parameters RPG-CL-RPG
I am trying to modify an intermediate CLLE program to submit itself to batch. The calling program (ILE RPG) passes a parameter as a character field with a number in it. The CL program receives it as a numeric field and then calls another RPG program and passes that parameter. The final RPG program receives [...]

Answer Question   |  March 19, 2012  7:47 PM
CLLE, Parameters, RPG ILE
asked by:
1,410 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.

How to read from a subfile and copy the data into a PF
I have a subfile which is load-all.I have a function key (eg: F6).On pressing F6,i want data from subfile to be written into a PF.How to do this in RPGLE.Please give me a pseudocode if possible or steps.

Answer Question   |  October 28, 2011  1:29 PM
RPG ILE, Subfile
asked by:
130 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.

What could be the reson for OVRDBF and OPEN on file is not working in RPGLE program.
Hi All, Can anyone please help me with below issue. The is a program abend in our production system in RPGLE program and with in that following operations happening, but i found errors while running program as below. following are the breif Sequence of operations written in RPGLE: 1. File(FMABCF)is declared as USROPN in F [...]

Answer Question   |  March 31, 2012  6:00 AM
OVRDBF, RPG ILE, RPGLE
asked by:
695 pts.

SQL REPLACE with pointer
I need to manipulate xml-files larger than char-field max-length allowed with RPG.   [strong]Background info:[/strong] My current solution uses a char-field… My app stores XML-files in CLOB-fields. I copy the xml-file from CLOB-field to a char-field: I then use %scan to find relative position of the string to be replaced, which is done using the [...]

Answer Question   |  March 31, 2012  11:32 AM
AS/400 SQL, RPG ILE, SQL, SQL Server, XML File Creation
asked by:
2,540 pts.

RPG ILE Scan csv file
I am scanning a comma delimited file for elements to populate a db2 file. However, it is not picking up the last segment because there is no ending comma. How can you recognize the end of a row?

Answer Question   |  March 31, 2012  1:20 PM
CSV file format, iSeries, RPG ILE, RPG scan csv
asked by:
45 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.

List jobs in a job queue
Is there an API that will return a list of jobs in a job queue?  I am particularly interested in a job queue that should have two scheduled jobs in it but might not.

Answer Question   |  March 17, 2011  8:11 PM
API, AS/400, AS/400 Job Queue, RPG ILE, V5R4
asked by:
1,410 pts.

SQLRPGLE Error in UPDATE Query
Hello, I have a SQL Statement in SQLRPGLE which Updates a 3 fiels in a file with 30 fields. SQL Statement is as below. UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ‘ ‘ WHERE ID = :W_ID This works fine on one iSeries server and throws following error on [...]

Answer Question   |  March 14, 2011  9:25 PM
AS/400, iSeries, RPG ILE, SQL, SQL statement, SQLRPGLE
asked by:
290 pts.

Using CLOSE & OPEN commands IN RPG ILE program
What is the best technique of using CLOSE & OPEN commands for USROPN DB files, if I need use CLOSE more then one time in program?

Answer Question   |  February 17, 2011  12:25 AM
RPG ILE, RPG Program, USROPN, USROPN files
asked by:
25 pts.

Help with AS/400 array
hi evryone, i’m a beginner with Java and i try this: try{ AS400Array txtarr =new AS400Array(AS400PackedDecimal(55,0),100); parmList[0] = new ProgramParameter(txtarr.toBytes(new BigDecimal(0)),55); ProgramCall pgm = new ProgramCall(sistem,”/qsys.lib/xxx.lib/….pgm”,parmList); in my RPG program i have this: D numcli       s          55 0  dim(100) C           parm       numclie   i need get this array from rpg, how can i make this happening, i [...]

Answer Question   |  April 8, 2011  9:02 PM
AS/400, iSeries RPG programming, Java, Java classes, RPG ILE, RPG IV, V5R4
asked by:
225 pts.

Reorganizing AS/400 Files While Active
I work for a company which is a 24/7 company. I cannot get them tp give up the system for any length of time. As a result, any type of maintenance is almost impossible. My biggest problem is reorganizing our files. I have heard that you can do a reorg while active but you must [...]

Answer Question   |  February 10, 2011  2:36 PM
AS/400, AS/400 Record Reorganization, RPG, RPG ILE, RPG IV, RPGILE, RPGLE, V5R4
asked by:
165 pts.