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

The site for RFEs is https://www.ibm.com/developerworks/rfe

You will need to get an IBM ID - they are free, and you can tell them not to contact you with advertisement, I believe.

From there you need to take options to get you to IBM i. I didn't take time to get the entire link.

HTH
Vern

On 7/23/2020 10:15 AM, Maria Lucia Stoppa wrote:
Thank you, Vernon, I completely agree with you.
I know the IN predicate requires a comma-separated list, but I hoped the
system could take care of that.
Before trying to use a DS with an array inside, I did some tests with a
simple array too, and obviously it didn't work either, that's why I tried
with a DS.
As per opening an RFE, it's a good idea, maybe there already is one. Do you
know the link to manage RFEs?
Thank you

Il giorno gio 23 lug 2020 alle ore 14:37 Vernon Hamberg <
vhamberg@xxxxxxxxxxxxxxx> ha scritto:

Hi Maria

I don't think it can work. The IN predicate uses a comma-separated list
of values, or the results of a subquery (or subselect - I am not sure
which term is right).

A DS, as I understand it at present, doesn't give you a list like the
first item, there are no commas in it, for example.

A more basic question is, can any array be used for the values in an IN
predicate? If not, certainly a subfield array could not be so used.

Now is it possible? Is it a reasonable idea for embedded static SQL?
Maybe - so this might a good topic for an RFE.

Regards
Vern

On 7/23/2020 2:34 AM, Maria Lucia Stoppa wrote:
Hi all,
I am wondering whether a DS with an array as a subfield might be used as
the argument of an SQL "IN predicate".

My system is running V7R2 and I make use of SQL RPG ILE quite
intensively,
so I know DSs with arrays inside can be used to fetch data in case of
multiple rows, but I like to use them within the "IN predicate" in a
static
SQL statement.

So far, the only way I have it working is by naming each array's element
and build a list with them.

Nor I found evidence of it in the IBM public boulder.

But I might have missed something, and that's why I am asking for your
opinions.

Any thought will be appreciated.

Thanks

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com




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.