RPGLE Program Questions


Problems using SQL CONNECT to a remote server within an RPGLE program
Let me apologize in advance if I fumble with the terminology and don’t explain myself as clearly as everyone is probably accustomed to. The specific situation I’m dealing with involves the need to have an RPGLE program on the iSeries connect to a data base that resides on a remote server. My boss has set [...]

Answer Question   |  April 11, 2013  5:15 PM
RPGLE Program, SQL Connect, SQL statements
asked by:
75 pts.

Write PF using RPGLE
HI … I tried to add a rec in my PF (sample1).. but my PGM run successfully .. but the rec haven’t added in my PF …. I shared my PGM here sample1 uf a e k disk usropn open sample1 eval empname=’Sathis’ eval empno=13 eval addr=’ramnad’ write rec close sample1 eval *inlr=*on Please help [...]

Answer Question   |  March 8, 2013  6:48 AM
RPGLE, RPGLE Program
asked by:
25 pts.

Search in qualified data strucuture
Hi, I used qualified data structure in RPGLE program. How to search in this data structure. My Coding: D Address DS D dvadd 20 D dvphn 20 D dvcity 20 D dvctry 20 D InvoiceInfo DS QUALIFIED DdvType1 1 2 DdvType2 3 4 D MailAddr LikeDS(Address) D ShipAddr LikeDS(Address) ———————————————– if i want to search [...]

Answer Question   |  December 11, 2012  5:32 AM
RPGLE, RPGLE Program
asked by:
270 pts.

RPGLE day, month and year calculation
I want to fixed the day by hardcode, retrieve the year from system and want the month 6 month before. can anyone help me…

Answer Question   |  October 18, 2012  7:16 AM
RPGLE code, RPGLE Program
asked by:
10 pts.

LIKEDS with DIM() in RPGLE
Hi Gurus, I need some help. I have the following code and it can not be compiled. It says: *RNF7030 30        596700  The name or indicator ADDRESS is not defined. Here is my code: D sndemail        pr                  Extpgm('SNDEMAIL') D  subject                      80A   const D  htmlmsg                    5000a   const D  toaddrs                            likeds(emailaddrs) dim(20) D  fromaddr                    100a   const D  [...]

Answer Question   |  May 10, 2012  11:07 AM
as400 v5r3, RPGLE Program
asked by:
1,285 pts.

Scan a string
Hi, I am using scan function in rpgle for scan string my problem is that when i scan a string with one space like ‘Invalid Customer’ then my program not given positive result or no result

Answer Question   |  May 11, 2012  11:38 AM
AS400 RPGLE, RPGLE Program
asked by:
1,240 pts.

Parameter value in uppercase
Hi i have a problem in entry program ,when i get parameter value its convert to upercase Ex.  i have enter Inv after go to program it become INV

Answer Question   |  April 26, 2012  11:03 AM
RPGLE, RPGLE Program
asked by:
1,240 pts.

RPGLE program described files
  Why is this so diffcult to space so it is readable? FILE01 has some records that need to be copied to FILE02 and deleted from FILE01. This is my error: *RNF7260 30 3 The Factor 2 operand is not valid for the specified operation.  What do I need to fix? FFILE01    UF   F 2300        [...]

Answer Question   |  April 10, 2012  4:50 PM
iSeries RPGLE, RPGLE Program
asked by:
140 pts.

How to Retrieve Message File
Hi, i am posting new question for how to retrive message files when i given specific *lib or *all 

Answer Question   |  April 10, 2012  6:24 AM
RPGLE Program
asked by:
1,240 pts.

increament values
hi, I have a pf with three records (1,2,3) now i want to update with 1 increment every values Current values are 1,2,3 after update 2,3,4

Answer Question   |  March 17, 2012  6:42 AM
as400 pf file, RPGLE Program
asked by:
1,240 pts.

error occurred while update my PF using rpgle program
i got one error, while update my PF using rpgle program….. i have done all file operation in one single program. all operation working fine. but update operation didn’t working, i got below error.. “subsystem Update or delete in file EMPLOYEE without prior input operation (C G D F).” please give a suggestion for my proble… [...]

Answer Question   |  March 17, 2012  12:34 PM
as400 pf file, as400 v5r3, RPGLE Program
asked by:
3,740 pts.

Data Structure Arrays
I have a “page at a time” subfile and in order to store multiple pages of options I have created arrays to store the options and the PF record RRN and Key Fields. This process Stores and reloads the options seamlessly. It all works beautifully except that the options are executed in the order they [...]

Answer Question   |  March 19, 2012  9:36 AM
RPGLE Program
asked by:
380 pts.

Auto Refresh page with server time counting in RPGLE program
I successfully completed auto refresh page with server time counting in RPGLE program. While run my program, some times i got the below error… I/O error CPF4737 was detected in file AUTODSP (C G D F). i share my display coding and rpgle coding below Display file coding..  A             [...]

Answer Question   |  March 17, 2012  7:01 AM
RPGLE Program
asked by:
3,740 pts.

write physical file member using RPGLE program
How to write record in Physical file member using RPG program… i want insert record in pf member file..

Answer Question   |  February 28, 2012  11:10 AM
RPGLE Program
asked by:
3,740 pts.

how to convert variable attribute in RPGLE
How to convert fixed binary variable(B) value and signed integer variable(I) value to packed decimal (P) field..

Answer Question   |  March 19, 2012  12:18 PM
RPGLE Program
asked by:
3,740 pts.

how to add value within variable in RPGLE
how to add the variable value which is already in one variable…. for example — one variable VAR1 has 56789… i want to add 5+6+7+8+9… is it possible….

Answer Question   |  March 19, 2012  10:21 AM
RPGLE Program
asked by:
3,740 pts.

rpgle in as400
how to end the program without using seton lr and return opcode..

Answer Question   |  November 23, 2011  10:21 AM
RPGLE Program
asked by:
1,350 pts.

Reversing a String in RPG
Hello Sir, I am new in as400 programming area, In an interview I was asked How to reverse a String in rpg. I wrote the fixed lenght string program but don’t know how to write it for Variable length string. I an declaring an array in RPG as:  DStringR          s   [...]

Answer Question   |  March 17, 2012  6:39 PM
AS400 Data Definitions, RPG string operations, RPGLE Program, String manipulation
asked by:
5 pts.

SETLL and READ
Hi, I have the following problem: I need to make SETLL and READE for several LF based on 1 PF by selection. Is it any smart way to do it without to duplicate the READE and %eof() for each LF? Thank you.

Answer Question   |  May 20, 2011  11:49 AM
AS/400 command functions, AS/400 commands, RPGLE Program, SETLL
asked by:
1,285 pts.

Single commitment control in RPGLE program
I have a rpgle program that uses 3-4 sql statements to update and insert data in 3-4 tables . Now what i want is that when program runs successfully then only these changes in tables should reflect else roll back . So for this is there any way to provide a single commitment control for [...]

Answer Question   |  May 17, 2011  4:18 PM
RPGLE Program, SQL statements, SQLRPGLE, V6R1
asked by:
420 pts.