× 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 agree - CL is not designed for database work - use RPG and make it simple.

And there is no way directly to get the results of a SELECT statement in a CL program. Your options include OPNQRYF, which is using older query technology and might be less efficient, the EXCSQL or other QMQRY solution with and outfile, and then use RCVF in either case.

Vern

On 8/6/2010 8:18 AM, couturem@xxxxxxxxxxx wrote:
Bernd,

How many records we are talking here ?

Are you going to get a single record ?

At this point I tend to call and RPG, why make it simple when it could be
complicated? right ! Lollll

Think about maintenance afterward !



--------------------------------------------------
From: "Bernd Dworrak"<bdworrak@xxxxxxxxxxxxxxxx>
Sent: Friday, August 06, 2010 7:01 AM
To:<rpg400-l@xxxxxxxxxxxx>
Subject: WG: Running SQL statement from CLP or CLLE




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.

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.

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

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



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.