On Fri, 2010-08-06 at 14:01 +0200, Bernd Dworrak wrote:
Von: Bernd Dworrak
Gesendet: Freitag, 6. August 2010 07:24
An: 'rpg400-l-bounces@xxxxxxxxxxxx'
Betreff: Running SQL statement from CLP or CLLE



Hello,

I'm not sure whether this is the right forum to ask the following
question but I try.

Probably not, but until David asks us to go elsewhere ...


I have a CLP in which I want to get information from a file.

As the file is quite big I do not want to get the info from it by RCVF
command because it could take a lot of time to get the information
back.

MYFILE1 is a keyed file with MYFIELD1,.2,.3,.4 as unique key.

Those are funny field names: .2, .3, .4


Of course I could call a RPG program from the CLP to get the requested
info returned by a parameter, but why not getting it by a single
"SELECT" statement?

The point is, that I want to do it like this: "SELECT MYFIELDx FROM
MYLIB/MYFILE1 WHERE MYFIELD1 = &PARM1 AND MYFIELD2 = &PARM2 AND
MYFIELD3
= &PARM3 AND MYFIELD4 = &PARM4 ".

If perchance you are selecting on the key fields of the file, then
POSDBF followed by RCVF may be the ticket.

Cheers,
Terry.



I haven't found any info or examples yet.

Maybe one of you know how to do it best or has another brilliant idea.

Thanx in advance

Bernd





This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.