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



UDTF is a good idea but I don't really want to go down that route if there
is a quicker answer, to be honest large parts of this routine are synon
generated, i.e .the array declaration filling the array etc.

The result set return is done using a little be of user source.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: 08 April 2009 22:54
To: Midrange Systems Technical Discussion
Subject: Re: Stored Procedure Result sets

What was wrong with the UDTF suggestion?

Why can't you set your DS field names to the names the PC guys are
expecting? (Is this RPG/400 or something?)


Neill Harper wrote:
I didn't think there would be a way to do it.

I guess I'm just going to store my data in a work file and SQL it out into
a
cursor where I can control the column names....

Either that or get the pc guys to change their code to reference the field
names of the data structure.

Thanks for the reply.

Neill

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: 08 April 2009 20:58
To: Midrange Systems Technical Discussion
Subject: Re: Stored Procedure Result sets

Not with a stored procedure. The system doesn't keep track of which
columns are returned by a stored procedure -- indeed, your program logic
could potentially change those columns each time you run it.

However, if you used a UDTF, you could control the column names...

Otherwise, I suggest that you simply name your DS subfields the name
that you want SQL to see.

Neill Harper wrote:
Anybody know of a way to override the Result set column name generated by
the following:

SET RESULT SETS ARRAY :X FOR :Y ROWS

Where is X is a multi occurrence data structure.
Thanks
Neill




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.