Please enable JavaScript to view this site.

Navigation: Using the Cobwebb Designer

Calling an Exit Program

Scroll Prev Top Next More

CPPD can call user created Exit Programs passing and receiving parameters.  This is a very powerful feature of CPPD enabling, for example, the looking up of detailed product descriptions or stock levels.  

Exit Programs are called with six parameters each 132 characters in length plus an error indicator, which is a numeric parameter of length one.  You do not have to use all the parameters but they must be included in your program. Note:  You must define your parameters before calling your exit program. I.e. your parameters must be defined higher up the Explorer Window than the call to the exit program.

See Defining your Exit Program Parameters.

Exit Program Properties

See General Properties for details on the General tab.

Once you have defined your parameters you need to insert an Exit Program element to call your program to retrieve the data.  To do this you need to select the Exit Program element from the Insert menu.  On the Exit program tab of the Properties box you may enter the name of your program and the library where it may be found.  You will see that the parameters that you have previously defined appear under the parameters heading.

If you wish to add a list of libraries to be used when running your exit program you will need to enter the Library name in the box and click on Add.  You need to do this for each library up to five.  Extra libraries are only needed if you are referencing files in a library that does not exist in the CPPD library list.  Now please click on the General tab and type in a description for the Exit program element.

Exit Program Element Properties

Program Name

The name of your exit program (max. 10 chars)

Library

The name of the library where the exit program resides (max. 10 chars). If you wish to add a list of libraries to be used when running your exit program you will need to enter the Library name in the box and click on Add.  You need to do this for each library up to five.  Extra libraries are only needed if you are referencing files in a library that does not exist in the CPPD library list.  

To remove a library name from the list first select it and then click on the Del button.

Parameters

The list of up to six parameters that may be passed into your exit program. These Exit Program Parameters must be defined before the Exit Program in the Explorer Window and then you will see them in this list.

Note: If you need to add more than five libraries then you can either call a dummy PPD Exit program with another 5 libraries or add the required libraries to a previous call to an exit program, as they are cumulative. The maximum number of libraries that can be added is 255.