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



A completley silly reply ( since it doesn't answer the how to question ) and no doubt your example is a puesdo example.

But you can derive the week day number in .Net using something like the thisdate.dayofweek method

Sorry I'm on a mobile so I'm not sure of the exact syntax!

As I said not a lot of use :-) but an interesting question you have posed anyhow

Maurice O'prey

Sent from my iPhone

On 11 Feb 2009, at 13:34, "Walter Hesius" <walter@xxxxxxxxxx> wrote:

Hi all,

To call an iseries program or serviceprogram from .net, i wrap the call inside a storedprocedure, and then use that storedprocedure from my .net application.
Works like a charm, except, i can't figure out how to call a serviceprogram that has a return value.
something like this:
d DayOfWeek PR 1 0
d InputDate D DatFmt(*iso)
For any given date, it returns the day of week as a number;

I thought about wrapping it in a function, but i couldn't make that work.
I could of course, wrap such a function inside another storedprocedure, and add the returnvalue as an extra parameter, but i was wandering if somebody knew
howto do this.

I find it a bit strange that it is possible to call a subprocedure inside a serviceprogram directly, but that you cannot get at the returnvalue.
Perhaps there is some way to define this in the storedprocedure, but there is so little documentation about this.

I'm on a V5R3 machine, and i use IBM.Data.DB2.iSeries assembly.

thanks for all replies.

walter.hesius@xxxxxxxxx
+32 497 252 749
+32 2 335 2335
www.inxin.com
--
This is the .net use with the System i (SystemiDotNet) mailing list
To post a message email: SystemiDotNet@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/systemidotnet
or email: SystemiDotNet-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/systemidotnet.

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.