|
Hi, TEST3 is an host variable and must be specified with a preceeding colon (:) in a SQL-Statement. You missed the colon for the second TEST3 in your SET-Statement: C/EXEC SQL C+ Set :TEST3 = LOWERADJUST(:TEST3) C/END-EXEC Mit freundlichen Grüßen / Best regards Birgitta Hauser "Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown) "If you think education is expensive, try ignorance." (Derek Bok) "What is worse than training your staff and losing them? Not training them and keeping them!" -----Ursprüngliche Nachricht----- Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von Chandana Silva Gesendet: Tuesday, March 06, 2007 05:05 An: RPG programming on the AS400 / iSeries Betreff: SQL User Defined Function Issue SQL Gurus, I did create a User Defined Function to call the LowerAdjust Prototype. I can update the FirstName by set FirstNme = LowerAdjust(FirstNme), shown below on Line 40. I need assistance, to set a Returning value from a prototype to a host variable, as shown below in Line 35. C/exec sql 0035.00 C+ set :Test3 = LOWERADJUST(TEST3) 0036.00 C/end-exec 0037.00 0038.00 C/exec sql 0039.00 C+ Update TESTLIB/EMPLOYEE 0040.00 C+ set FirstNme = LOWERADJUST(FIRSTNME) with NC 0041.00 C/end-exec 0042.00 Compile Fails. DIAGNOSTIC MESSAGES MSG ID SEV RECORD TEXT SQL0104 30 35 Position 35 Token TEST3 was not valid. Valid tokens: :. . Your hlep is greatly appreciated.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.