RETURN_CODE

AIX HP-UX Linux OS/2 OS/390 OS/400 PTX SUN Win NT
X X X X X X X X X

Purpose

The return code returned by a call to a built-in function or a call to a language environment. Net.Data uses this value to process MESSAGE blocks. You can use this variable to determine whether a function call succeeded or failed. A value of zero indicates successful completion of a function call.

You can reference the RETURN_CODE variable in any part of the Net.Data macro.

This value is predefined; it is not recommended to modify the value. Use it as a variable reference.

Examples

Example 1: A message stating whether the function completed successfully

@function1()
%IF ("$(RETURN_CODE)" == "0")
 The function completed successfully.
%ELSE
The function failed with the return code $(RETURN_CODE).
%ENDIF

Example 2: A default message when a return code is not 0

%MESSAGE{
default: "<h2>Net.Data received return code: $(RETURN_CODE)</h2>" : continue
%}

If a function returns a return code other than 0, the default message is displayed.


[ Top of Page | Previous Page | Next Page | Index ]