Charles,

Sounds logical enough.

I ran this:

CALL gnodgdf.ORDERAPI_getshortsku (?, CHAR('010'), CHAR('001769522'),
CHAR('EFL2A '))

I got this:
SQL State: 42601
Vendor Code: -104
Message: [SQL0104] Token CHAR was not valid

Greg

|-----Original Message-----
|From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
|bounces@xxxxxxxxxxxx] On Behalf Of Wilt, Charles
|Sent: Tuesday, September 11, 2007 8:24 AM
|To: Midrange Systems Technical Discussion
|Subject: RE: Syntax for calling stored procedure
|
|Greg,
|
|Make sure you cast the parameters to CHAR.
|
|call gnodgdf/getShortSKU (?, CHAR('001'), CHAR('100'), CHAR('3410'))
|
|By default, string literals are treated as VARCHAR and since SQL
procedures
|and functions can be
|overloaded, the system is looking for a procedure named getShortSKU
that
|takes VARCHAR parameters
|which of course doesn't exist.
|
|HTH,
|Charles
|
|> -----Original Message-----
|> From: midrange-l-bounces@xxxxxxxxxxxx
|> [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
|> Fleming, Greg (ED)
|> Sent: Tuesday, September 11, 2007 8:15 AM
|> To: Midrange Systems Technical Discussion
|> Subject: RE: Syntax for calling stored procedure
|>
|> Thanks Alan.
|>
|> When I do that, I get the following:
|>
|> SQL State: 42724
|> Vendor Code: -444
|> Message: [SQL0444] External program SORDERAPI in GNODGDF not found.
|> Cause . . . . . : An attempt was made to CALL procedure or invoke
|> function GETSHORTSKU in GNODGDF. External program or service
|> program SORDERAPI in schema GNODGDF was not found.
|>
|> Someone else in my organization said they use question mark
|> instead of the out parameter, but I get the same result.
|>
|> I know the service program is there, and it works when used
|> from a regular RPG calling program. Is there something
|> special I need to do with the CRTSRVPGM parameters when it is
|> going to be used with an SQL stored procedure ?
|>
|> Greg
|>
|> |-----Original Message-----
|> |From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
|> |bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
|> |Sent: Monday, September 10, 2007 6:08 PM
|> |To: midrange-l@xxxxxxxxxxxx
|> |Subject: Re: Syntax for calling stored procedure
|> |
|> |<snip>
|> |I got the message indicating that it was successfully created.
|> |
|> |Now the question. How do I call it ? Can I test this interactively
|> |from STRSQL or Iseries Navigator RUNSQL Scripts ?
|> |
|> |What's the correct syntax ?
|> |</snip>
|> |
|> |Use Run Sql Scripts in Ops Nav
|> |
|> |Call gnodgdf/getShortSKU ('SKU1', '001', '100', '3410')
|> |
|> |
|> |--
|> |This is the Midrange Systems Technical Discussion
|> (MIDRANGE-L) mailing
|> list
|> |To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
|> |unsubscribe, or change list options,
|> |visit: http://lists.midrange.com/mailman/listinfo/midrange-l
|> |or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting,
|> please take a
|> |moment to review the archives at
|> |http://archive.midrange.com/midrange-l.
|>
|>
|> --
|> This is the Midrange Systems Technical Discussion
|> (MIDRANGE-L) mailing list To post a message email:
|> MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
|> list options,
|> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
|> or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting,
|> please take a moment to review the archives at
|> http://archive.midrange.com/midrange-l.
|>
|>
|>
|
|This e-mail transmission contains information that is intended to be
|confidential and privileged. If you receive this e-mail and you are
not a
|named addressee you are hereby notified that you are not authorized to
|read, print, retain, copy or disseminate this communication without the
|consent of the sender and that doing so is prohibited and may be
unlawful.
|Please reply to the message immediately by informing the sender that
the
|message was misdirected. After replying, please delete and otherwise
erase
|it and any attachments from your computer system. Your assistance in
|correcting this error is appreciated.
|
|--
|This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
|To post a message email: MIDRANGE-L@xxxxxxxxxxxx
|To subscribe, unsubscribe, or change list options,
|visit: http://lists.midrange.com/mailman/listinfo/midrange-l
|or email: MIDRANGE-L-request@xxxxxxxxxxxx
|Before posting, please take a moment to review the archives
|at http://archive.midrange.com/midrange-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.