Hello dear community,
I'm currently having trouble with an insert. I can't get an insert. In the debug I saw that the SQLCOD was set to -7008 (object-name NOT VALID FOR
OPERATION (reason code)). I've attached an image. Can someone tell me what I'm doing wrong? I create the file in QTEMP...
Announcement
Collapse
No announcement yet.
Search Result
Collapse
29 results in 0.0048 seconds.
Keywords
Members
Tags
-
Problems with an INSERT with embedded SQL
-
Work with Compile Commands - Multiple Commands
Hello all,
I am trying to compile my .SQLRPGLE program from the i Project section in RDI. The only issue I am running into is that I need to add my library before it compiles otherwise it fails to compile because my library list is not in the default library list.
The default...
-
Problem with interactive program and debbug
Hello,
I have an interactive program that is not working properly.
In my program, I fill in a temporary file (via SQL) and then I process the file.
Here is the SQL :
EXEC SQL insert into wfictmp1
(wservic, wimmeub, wnumcop, wdattrt)
select servic, immeub,...
-
Need some feedback on using a Service Program
I found a service program which will wrap text for output and call it LINEWRAP. There is a Module and Service program in my library list. I also followed the instructions to create an SQL procedure. The program works fine with Interactive SQL. However, when try to code it in my SQLRPGLE program,...
-
Executing QCMDEXC within RPGLE
I'm trying to issue a command using QCMDEXC within an RPGLE program. The command will send an status email.
CLUNODE = NODES
The failed message is CPD0047 List or expression not valid for parameter SUBJECT. I am guessing it does not like the extra single quote in the Subject...
-
Using order by with embedded SQL RPGLE.
I am trying to populate a subfile with data read from a master file in a particular order. The user can switch order by pressing the appropriate Function Key. The problem is the data populates the subfile based on the first statement processed all the time. I have cleared the array before launching...
-
Why REGEXP_COUNT returns a wrong value?
Hello all,
I'm puzzled why REGEXP_COUNT returns weird results, for example take this query:
PHP Code:select regexp_count('1','[A-Z]')
from SYSIBM.SYSDUMMY1
Regular expression [A-Z] means it accepts a letter from A to Z. But 1 is no letter, and the result of...
-
QZDASOINIT Stored Procedure Running Slow
Hello,
I have a weird behaviour on a stored procedure running in QUSRWRK subsystem.
When I run the above stored procedure from ACS(Run SQL Script) it takes 21 minutes to execute.
[ 31/12/2020, 18:49:16 ] Run Selected...
CALL spgetQtyOnHand ('020', '2020-01-01' , '2020-12-31'...
-
jason.aleski started a topic Prepared SQL for Single Row into Data Structure; without cursor. Possible?in RPG/RPGLEPrepared SQL for Single Row into Data Structure; without cursor. Possible?
I am attempting to use a prepared statement to fetch information (a single row) about a location; based on a given ID. The location ID is either passed via parameter, or directly entered and read from the display/user interface.
I have tried stepping through the RDi debugger. I see the...
-
Need to put the same query as DB2 in SQLRPGLE
All,
I am having one DB2 query
SELECT year(current date)*10000 +
month(current date)*100 +
day(current date-1 days),count(*) FROM mstfile.
Above query gives me the result as 20200108 ,100 as output...
-
Implementing Rest service with Json String and Scott's yajl library
Hi,
I am developing a program using Scott's yajl libraries to process the Json String into DB2 table. I have two questions,
1. More generic, we are using V 7.2 - Is it ideal to use yajl libraries or we need to consider using DATA-INTO and Json tables for efficiency. Json...
-
DataStructure SORT on two different fields.....
So I have a Data structure array. I can sort on one field using the SORTA command with %subarr. Can I add another field WITHOUT combining the two fields together in a one field sort? To basically sorting on two fields or three etc..... Again without combining into one field. If I can in SQL do you...
-
SQL 305 error with coalesce in RPGLE
I have what I thought was a simple statement (below)
H ALWNULL(*INPUTONLY)
select rhwhs,rhvnno,rhbol,rhcanm,rhrcdt,rhsnno,vennam,
cast (coalesce(apevthh,0) as numeric(2,0)) as apevthh,
cast (coalesce(apevtmm,0) as numeric(2,0)) as apevtmm
from...
-
Base64 Encode e decode
HI all,
I was trying the systools function base64 encode and decode but I have a little problem with the decode...
here's a test case:
Code:Create Table Testbase64(Rowid Int Not Null Generated Always As Identity (Start With 1, Increment By 1, No Cache), Fieldutf8
-
Email Validation in RPG
It's not easy. A pretty thorough search of the internet turned up some code that would not compile. In theory, if it could compile, we are still looking at 200 lines of code or so to call a C++ function, with all of its header specifications, to execute a regular expression. A regular expression is...
Our Sponsors
Collapse