× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I understand but what could cause it. The file has 16000+ records. The
file is reuse deleted records no. we ran a program to delete all the
records and then add them back in. We now have:

Member Size Type Date Date Time Records
Records
REL001P 2699264 10/16/06 06/21/07 16:51:00
16962 16965
Text: Customer Relationship File

Total number of members . . . . . . . . . : 1

Total number of members not available . . : 0

Total records . . . . . . . . . . . . . . : 16962

Total deleted records . . . . . . . . . . : 16965

Total of member sizes . . . . . . . . . . : 2699264

When I run the sql in the RPG program it returns 0 records and I get an
SQLSTATE of 42846 - Cast from source type to target type is not
supported.
If I run it interactively by using STRSQL it works. When I run it
interactively I notice that it show processing even the deleted ones but
it only selected the undeleted ones.

If I just do a RGZPFM on the file and call the program it works.

So I am at a loss.

Bruce "Hoss" Collins
IT Architect
AAA Cooper Transportation
(334) 836-8434

"Leadership is solving problems. The day soldiers stop bringing you
their problems is the day you have stopped leading them.
They have either lost confidence that you can help or concluded you do
not care. Either case is a failure of leadership." Colin Powell

"Just because no one complains does not mean everything is going well.
They may have just given up hope of getting it fixed."
Bruce Collins


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of rob@xxxxxxxxx
Sent: Thursday, June 21, 2007 3:00 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Embedded SQL

I don't see that happening:
CREATE TABLE QTEMP/I5RULES (MYDATA CHAR (15 ) NOT NULL WITH DEFAULT)
Table I5RULES created in QTEMP.

CHGPF FILE(I5RULES) REUSEDLT(*NO)

INSERT INTO QTEMP/I5RULES VALUES('bubba')
1 rows inserted in I5RULES in QTEMP.
INSERT INTO QTEMP/I5RULES VALUES('billy joe')
1 rows inserted in I5RULES in QTEMP.
INSERT INTO QTEMP/I5RULES VALUES('rastus')
1 rows inserted in I5RULES in QTEMP.
delete from i5rules where mydata='bubba'
1 rows deleted from I5RULES in QTEMP.
select * from i5rules fetch first row only
or
select * from i5rules fetch first 1 row only
both return 'billy joe'

Total records . . . . . . . . . . . . . . : 2
Total deleted records . . . . . . . . . . : 1

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Bruce Collins" <bruce.collins@xxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
06/21/2007 03:29 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Fax to

Subject
Embedded SQL






We are using embedded sql to retrieve records from a database file. We
are using the "fetch first 800 row only".

The file has 16957 records with 0 deleted records. When we run the
embedded sql it works great and returns the first 800 records. My
problem occurs it we have any deleted records. We had 1000 deleted
records and when we execute it no records are selected. If I do RGZPFM
to the file and run it the records are selected. Am I missing some
parameter?

Thanks


Bruce "Hoss" Collins
IT Architect
AAA Cooper Transportation
(334) 836-8434

"Leadership is solving problems. The day soldiers stop bringing you
their problems is the day you have stopped leading them.
They have either lost confidence that you can help or concluded you do
not care. Either case is a failure of leadership." Colin Powell

"Just because no one complains does not mean everything is going well.
They may have just given up hope of getting it fixed."
Bruce Collins

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.