SQLRPGLE Prepare
When using the prepare statement I’m creating a string that contains my select statement… I want to compare a numeric field within my string. For example I have batch# which is numeric, how can I say where batch# = 21
Answer Question
| April 5, 2010 7:11 PM
SQLRPGLE
When using the prepare statement I’m creating a string that contains my select statement… I want to compare a numeric field within my string. For example I have batch# which is numeric, how can I say where batch# = 21
SQLRPGLE – Result Set
I have an SQLRPGLE program [PGMA] containing the following: D ResultSet DS D Qualified D Occurs( 9999 ) D AAuUserId 10 D AAuValFr 10 C/EXEC SQL C+ CALL XXDLIB/PGMB (:##BegNo, :##EndNo, :##UserID) C/END-EXEC PGMB has the same DS structure defined as in PGMA and successfully populates the DS ResultSet in PGMB How do I get SQLRPGLE [...]
Answer Question
| February 26, 2010 2:37 PM
AS400 Data Definitions, Data structures, Programming, RPGLE, SQLRPG, SQLRPGLE
I have an SQLRPGLE program [PGMA] containing the following: D ResultSet DS D Qualified D Occurs( 9999 ) D AAuUserId 10 D AAuValFr 10 C/EXEC SQL C+ CALL XXDLIB/PGMB (:##BegNo, :##EndNo, :##UserID) C/END-EXEC PGMB has the same DS structure defined as in PGMA and successfully populates the DS ResultSet in PGMB How do I get SQLRPGLE [...]
Compiling Eval-Corr in SQLRPGLE
I’m attempting to use Eval-Corr for the first time. But, when I compile a Srcmbr as a SQLRPGLE type, I get compile error: “RNF5014 30 Operation code is not valid; specification is ignored.”, but when I change the srcmbr to RPGLE, no compile errors occur. Any idea why and how I can get the SQLRPGLE [...]
Answer Question
| January 12, 2010 4:46 PM
EVAL function, SQLRPGLE
I’m attempting to use Eval-Corr for the first time. But, when I compile a Srcmbr as a SQLRPGLE type, I get compile error: “RNF5014 30 Operation code is not valid; specification is ignored.”, but when I change the srcmbr to RPGLE, no compile errors occur. Any idea why and how I can get the SQLRPGLE [...]
Problem Running SQLRPGLE program with one parameter in Batch: Works Fine Interactively
Hi, i have problems with calling an SQLRPGLE program with only one parameter. an alphanumeric field length 40. the SQLRPGLE is running fine interactively but in batch mode, the parameter is right filled with packed caracters and it causes problems in my procedure. i’ve verified calling program, called program, the length is the same. i’ve [...]
Answer Question
| November 29, 2009 7:59 AM
SQLRPGLE
Hi, i have problems with calling an SQLRPGLE program with only one parameter. an alphanumeric field length 40. the SQLRPGLE is running fine interactively but in batch mode, the parameter is right filled with packed caracters and it causes problems in my procedure. i’ve verified calling program, called program, the length is the same. i’ve [...]
SQLRPGLE Cursors and Recursion
I’m trying to recursively call a PI in my SQLRPGLE program. Problem is, I get an SQLCODE error of -519 and I’m sure it has to do with cursors and the prepare statement in my PI. Here’s the code: pprintPrograms b dprintPrograms PI d program 10a value d spacer 10a value [...]
Answer Question
| April 12, 2012 11:09 PM
iSeries, Recursion, SQL Cursors, SQLRPGLE
I’m trying to recursively call a PI in my SQLRPGLE program. Problem is, I get an SQLCODE error of -519 and I’m sure it has to do with cursors and the prepare statement in my PI. Here’s the code: pprintPrograms b dprintPrograms PI d program 10a value d spacer 10a value [...]
Convert RPGLE to SQLRPGLE
How do I convert RPGLE program to SQLRPGLE?
Answer Question
| July 1, 2011 9:31 PM
RPGLE, RPGLE Program, SQLRPGLE
How do I convert RPGLE program to SQLRPGLE?
SQLRPGLE
I need to retrieve the RRN and use it within my RPGLE program. I have the Select RRN(file) statement, but I get a Character in Cast argument not valid when executing. Any suggestions?
Answer Question
| October 26, 2009 9:09 PM
iSeries SQL, SQLRPGLE
I need to retrieve the RRN and use it within my RPGLE program. I have the Select RRN(file) statement, but I get a Character in Cast argument not valid when executing. Any suggestions?
SQLRPGLE
I’ve Report to print using SQLRPGLE The Report criteria screen has around 15-20 select conditions…based on the conditions entered by the user, I build a query of type Select * from emp1 where val1 = ? and val2 =? and val3 = ? and……….. This is the first time I’m dealing with so many select [...]
Answer Question
| October 21, 2009 10:05 PM
RPGLE, SQL, SQLRPGLE
I’ve Report to print using SQLRPGLE The Report criteria screen has around 15-20 select conditions…based on the conditions entered by the user, I build a query of type Select * from emp1 where val1 = ? and val2 =? and val3 = ? and……….. This is the first time I’m dealing with so many select [...]
Synon – Compilation
Hello Everybody, I would like to know whether it is possible to use “SQLRPGLE“ source types in Synon, I am currently using Synon “8.1SP1” version. Can anyone explain the procedure to compile “SQLRPGLE” source type in Synon? Thanks & Regards Bibin George
Answer Question
| October 14, 2009 4:37 PM
SQLRPGLE, Synon, Synon 2E, Synon/2E
Hello Everybody, I would like to know whether it is possible to use “SQLRPGLE“ source types in Synon, I am currently using Synon “8.1SP1” version. Can anyone explain the procedure to compile “SQLRPGLE” source type in Synon? Thanks & Regards Bibin George
Problem Running SQLRPGLE program in Batch: Works Fine Interactively
Hello all, We currently have a program that runs in batch. Last night, we had the following error occur: RNQ0103: The target for a numeric operation is too small to hold the result. The program works perfectly when run interactively. When the program was originially written, I compensated for the fact that it may be [...]
Answer Question
| January 7, 2011 6:27 PM
Batch job, Error Messages, iSeries RPG programming, SQLRPGLE, V5R4
Hello all, We currently have a program that runs in batch. Last night, we had the following error occur: RNQ0103: The target for a numeric operation is too small to hold the result. The program works perfectly when run interactively. When the program was originially written, I compensated for the fact that it may be [...]
progam change date updated for SQLRPGLE program
Can anyone tell me where I can fird the reason that the ‘program last change date’ is updated in an SQLRPGLE program when it is run? It showed up on an audit and the auditors say it is unacceptable. I am looking for proof that this the way it is from some kind of official [...]
Answer Question
| October 7, 2009 7:21 PM
AS/400, iSeries, Last modified, SQLRPGLE
Can anyone tell me where I can fird the reason that the ‘program last change date’ is updated in an SQLRPGLE program when it is run? It showed up on an audit and the auditors say it is unacceptable. I am looking for proof that this the way it is from some kind of official [...]
Embedded SQL
In SQL RPGLE program, I declare a cursor using a view.. The view has name Emp_Pat_Dept_Data(EMPdata) the empdata is the AS400 name. In my cursor def which name I should use. Also for the fields referenced do I need to use the renamed field names in the view definition or I can use the field [...]
Answer Question
| September 29, 2009 9:29 PM
Embedded SQL, SQLRPGLE
In SQL RPGLE program, I declare a cursor using a view.. The view has name Emp_Pat_Dept_Data(EMPdata) the empdata is the AS400 name. In my cursor def which name I should use. Also for the fields referenced do I need to use the renamed field names in the view definition or I can use the field [...]
SQL error
I’ve a cursor to fetch date from DB2/400…When date is stored as 0001-01-01, I get error – Year portion of the Date not in correct range. This is the default date my update program stores when user doesnt enter anything for date field. How can I bypass this error while fetching SQL cursor in my [...]
Answer Question
| September 28, 2009 4:57 PM
DB2, DB2/400, SQL error messages, SQLRPGLE
I’ve a cursor to fetch date from DB2/400…When date is stored as 0001-01-01, I get error – Year portion of the Date not in correct range. This is the default date my update program stores when user doesnt enter anything for date field. How can I bypass this error while fetching SQL cursor in my [...]
Page at a time subfile
I want to code loading a single page subfile in SQLRPGLE. How do I handle the page up and page down key, posotion to in that program? thanks, NG
Answer Question
| October 21, 2009 2:24 AM
AS/400 Subfiles, RPGLE, SQL, SQLRPGLE
I want to code loading a single page subfile in SQLRPGLE. How do I handle the page up and page down key, posotion to in that program? thanks, NG
SQLRPGLE – Prepare – Declare Cursor
I’m using Prepare, Declare SQL cursor in my SQLRPGLE program After Declare statement I receive SQL -312 – Which indicates to me that the SQL statement is not declared correctly. Is it something wrong with my query. I ran this query in SQL editor and went fine. I dun understand why not in the program. Given [...]
Answer Question
| August 26, 2009 1:49 AM
SQL Cursors, SQLRPGLE
I’m using Prepare, Declare SQL cursor in my SQLRPGLE program After Declare statement I receive SQL -312 – Which indicates to me that the SQL statement is not declared correctly. Is it something wrong with my query. I ran this query in SQL editor and went fine. I dun understand why not in the program. Given [...]
file user open exceptions for printer file
i’m opening a program defined printer file in SQLRPGLE.. i get error file is already open…. if that is the case, then i’m trying to write in that file but now this gives me exception that attempting to write in closed file… Please help
Answer Question
| October 11, 2009 8:12 PM
SQL error messages, SQL Printing, SQLRPGLE
i’m opening a program defined printer file in SQLRPGLE.. i get error file is already open…. if that is the case, then i’m trying to write in that file but now this gives me exception that attempting to write in closed file… Please help
Using SRCDBG with an SQLRPGLE module
I’m trying to debug a RPGLE module created with CRTSQLRPGI. The STRDBG program returns an error message stating the program “cannot be accessed”. There is no DBGVIEW option on the CRTSQLRPGI command, so even if I get the debug to work. will I see any source data? Thanks.
Answer Question
| October 11, 2009 6:32 PM
RPGLE, SQL, SQLRPGLE
I’m trying to debug a RPGLE module created with CRTSQLRPGI. The STRDBG program returns an error message stating the program “cannot be accessed”. There is no DBGVIEW option on the CRTSQLRPGI command, so even if I get the debug to work. will I see any source data? Thanks.
Fetching one cousor within DO loop of another cursor
Is the below scenerio possible, if yes then how? CREATE C1 CURSOR OPEN CURSOR C1 FETCH C1 CURSOR DOW SQLCOD = 0 (For Cursor C1) CREATE C2 CURSOR OPEN CURSOR C2 FETCH C2 CURSOR DOW SQLCOD = 0 (For Cursor C2) CLOSE CURSOR C2 FETCH CURSOR C2 ENDDO FETCH CURSOR C1 ENDDO CLOSE CURSOR C1
Answer Question
| August 6, 2009 4:44 AM
SQLRPGLE
Is the below scenerio possible, if yes then how? CREATE C1 CURSOR OPEN CURSOR C1 FETCH C1 CURSOR DOW SQLCOD = 0 (For Cursor C1) CREATE C2 CURSOR OPEN CURSOR C2 FETCH C2 CURSOR DOW SQLCOD = 0 (For Cursor C2) CLOSE CURSOR C2 FETCH CURSOR C2 ENDDO FETCH CURSOR C1 ENDDO CLOSE CURSOR C1
Is SQL Commitment level extended to non SQL programs called
I have an SQLRPGLE program that calls an RPG program. I know that the SQLRPGLE program has an internal commitment control engine activated, but will it extend onto the RPG program I call from here?
Answer Question
| July 8, 2009 10:16 AM
RPG, SQL commitment control level, SQLRPGLE
I have an SQLRPGLE program that calls an RPG program. I know that the SQLRPGLE program has an internal commitment control engine activated, but will it extend onto the RPG program I call from here?
SQL in an SQLRPGLE program
I want to use embedded SQL in an SQLRPGLE program to search a file for a field entered in a screen to select data using the LIKE operand. This is my code C/EXEC SQL C+ DECLARE C1 CURSOR FOR SELECT * FROM F0101JN WHERE ALADDZ = :SZIP C+ AND ABALPH LIKE :SINNME ORDER BY ABAN8 [...]
Answer Question
| April 20, 2009 7:35 AM
C+, Embedded SQL, LIKE statement, SQL, SQL/400, SQLRPGLE
I want to use embedded SQL in an SQLRPGLE program to search a file for a field entered in a screen to select data using the LIKE operand. This is my code C/EXEC SQL C+ DECLARE C1 CURSOR FOR SELECT * FROM F0101JN WHERE ALADDZ = :SZIP C+ AND ABALPH LIKE :SINNME ORDER BY ABAN8 [...]





