Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.3 How to Use Methods

PowerCOBOL Methods are invoked using the INVOKE statement. This INVOKE statement is defined to invoke the methods of PowerCOBOL controls and objects and its specification is different from the OO COBOL specification.

The general format of the INVOKE statement is:

INVOKE Control-name "Method-name" 
	[USING Parameter-1 [Parameter-2... ] ]
	[RETURNING Return-Value]

Bracketed arguments can be omitted.

For example, to add "ListItem-1" to the list part of the ListBox control (control-name: "ListBox1"), code:

INVOKE  ListBox1  "AddString"  USING  "ListItem-1".