How To Call Procedures

How To Call Procedures

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

How To Call Procedures

The syntax of a call to a procedure is

procname (expression)

Parameters

procnameThe name assigned to the procedure in its PROCEDURE or LOCALPROCEDURE command.
expressionAny value expression.

Comments

The list of expressions must be enclosed in parentheses; even when no expressions are required, the parentheses must still appear.
At the prompt level, you can issue a call to the main procedure of any procedure program.
Within a procedure program, you can issue a call to

  • any local procedure in the current program
  • the main procedure in the current program
  • the main procedure in any other procedure program

Any procedure in a procedure program can issue a call to itself.
In a call to a procedure, you must supply one expression for each parameter specified in the PROCEDURE or LOCALPROCEDURE command that describes the called procedure. The number and type of expressions listed in the call to a particular procedure must match the number and type of parameters in the PROCEDURE command in order for the procedure to execute. The value of expression can be assigned to the corresponding parameter (IN parameters), or expression can take on the value of the corresponding parameter when the procedure ends (OUT parameters), or both (INOUT parameters).
When you specify more than one expression, each must be separated from the next by a comma.

Was this article helpful?
5 out of 5 stars

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish