× 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.



Hi

Try compiling it with commit(*NONE)

Martin
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Stijn Peeters
Sent: 10 March 2010 14:26
To: rpg400-l@xxxxxxxxxxxx
Subject: SQLRPGLE problem

Hello,



I am experiencing a problem when programming an SQLRPGLE program.

I have copy pasted the code from an existing working program.

Below you can see a part of the code. The problem I'm having is that my
sql doesn't find any data.

But when I execute the SQL statement itself in SQL I do find data.

What can be the problem? I hope someone is willing to help me.

This is the first SQLRPGLE I have programmed. And I just don't know
where to look for the error.

Thank you in advance.



Kind regards

stijn



callp FcClearPf('fcpckblt');

open fcpckblt;

Query='SELECT phfirm, phwknr, phkdnr, phpck, phrout, pptrmt,
PPKLTN,' +

' phshpd FROM fckbph, fckbpp WHERE PHFIRM =''1'' and' +

' PHWKNR =''000'' and pHkdnr in (66666, 50033) and ppfirm
=' +

' phfirm and ppwknr = phwknr and pppck = phpck and pppcks
= 0' +

' and phShpd > 100301 and PhShpd < 100310';





//Query1 = %replace(%char(SeFrDt):Query:%scan('STR':Query):3);

//Query2 = %replace(%char(SeToDT):Query1:%scan('TO':Query1):2);





exsr select_data;



w_count = 0;

dow sqlcod = 0;

exsr fetch_data;

if sqlcod = 0;

write FCPCK1;

w_count = w_count + 1;

endif;

enddo;



exsr close_downl;



close fcpckblt;



if W_count = 0;

S1ERROR = 'No data selected';

exfmt rfmat01;

$SUBR = 'S9999';

// exsr s01;

else;

callp FcDownload('fcpckblt');

S1ERROR=('File fcpckblt created in dir. AS400 on General.');

exfmt rfmat01;

endif;



--
This is the RPG programming on the IBM i / System i (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 message (including any attachments) is only for the use of the person(s) for whom it is intended. It may contain Mattel confidential and/or trade secret information. If you are not the intended recipient, you should not copy, distribute or use this information for any purpose, and you should delete this message and inform the sender immediately.

Mattel UK Limited is incorporated in England and Wales with its registered office at Mattel House, Vanwall Business Park, Vanwall Road, Maidenhead, Berkshire SL6 4UB. Company Registration Number 1471442.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.