Home > Ask the AS/400 Experts > iSeries Application Development Questions & Answers > SQL external UDFs
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

SQL external UDFs

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 23 November 2004
Can we have parameters for the external UDF be "pass by value" rather than reference?

>
I am not sure about this -- I do not use SQL much. But the manual "DB2 for AS/400 SQL Programming", chapter 14.4.1, 'Declaring Host Variables' (I am looking at V4R2) says that the ILE RPG/400 SQL pre-processor recognizes a limited set of RPG data types -- basically, any type that can be the result field of a PARM statement. This implies that if you write your UDF in RPG, you can use the factor1 / factor2 / result method of parameterization, where data passed by reference in the RESULT field is converted to a value in the field specified in factor1; and a value in factor2 is passed back as a value into the space pointed to by the result field pointer. It's worth experimenting with this.

If you don't use RPG for your UDFs, the other languages may also support some method of converting a reference to a value -- check their manuals. As for native SQL UDFs, I do not know how they pass parameters, so I can't comment.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries COBOL programming
Implementing a browser interface in COBOL: Displaying database fields
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
Allow access to data from a stored procedure result set using COBOL or RPG
Eight steps for creating program documentation using AS/400 utilities
Coloring source lines with COBOL and using a shortcut from within PDM
Top 10 programmer tips YTD
Slow system performance
Changing the font size
New option within the WRKSYSACT command
iSeries COBOL programming Research

RPG iSeries programming
Enhancing RPG with external SQL stored procedures
Introduction to SQLRPGLE on IBM i: Making a report
Making the most of RPG data handling on IBM i
IBM i shop boosts online sales with RPG-based Web platform
Migrating from RPG to EGL on IBM i
Allow access to data from a stored procedure result set using COBOL or RPG
EGL Rich UI on IBM i: Do you Dojo?
Programming for the Web on the IBM i, what is possible
A taste of COMMON: ILE, IBM releases, Web applications and new products
Documenting nested program structures on the AS/400

iSeries ILE programming
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
How to use an embedded SQL statement and display the result in a subfile
Eight steps for creating program documentation using AS/400 utilities
Searching fields for values
Searching part of a name or address in AS/400
Top 10 programmer tips YTD
How to use the binder language to manage service programs -- Part 3: Examples and pitfalls
Top 10 programmer tips of 2005
How to use the binder language to manage service programs -- Part 2: Understanding the binder language

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Report Program Generator  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts