Problem solve Get help with specific problems with your technologies, process and projects.

Call an AS/400 stored procedure

How can I invoke a stored procedure that I create on DB2/AS/400 with RDO for Visual Basic 6.0 applications?

In order to call an AS/400 stored procedure via VB your best shut is using OLE DB provider. For example, the one provided by Client Access Express.


1. Get mdac up and running -- This is the microsoft part.

2. Create the procedure on the AS/400 using one of the compilers (i.e rpg' cobol' c' pure sql).

3. Register the procedure using the create function as follows:

(parm1 OUT CHAR(10), parm2 OUT CHAR(10))

4. Embed the code for procedure call, an example can be found here:

ANE Classics: More AS/400 Client/Server Programming with ADO and VBA

It is easy and it works. Note that on the AS/400 your program will be called by an AS/400 host server with user name quser.

This was last published in March 2001

Dig Deeper on FTP

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.



  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...