ILUSING

Specifies the namespace for a class to be imported. This directive enables you to write just the class name in the program code, without its namespace, potentially making the code shorter and simpler.
Restriction: This directive is supported for JVM COBOL only.

Syntax:

>>---.---ILUSING---"namespace"--.---><
     +-NOILUSING----------------+

Parameters:

namespace
The name of a namespace to be imported into the program.

Properties:

Default: NOILUSING. The command line default is NOILUSING .
Note: Specifying NOILUSING clears any settings that are in effect as a result of previous ILUSING directives.
IDE equivalent: Click Project > Properties > Micro Focus > Build Configuration and add the directive in the Additional Directives sections of the options within it.
$SET: Initial.

Examples:

When referring to a class whose name begins with the specified namespace (or one of the specified namespaces if there are multiple ILUSING directives), the namespace may be omitted. For example:

01 d1 type java.util.Date.

Is equivalent to:

$set ilusing"java.util"
01 d1 type Date.

Note that the complete namespace must be specified in an ILUSING directive for it to be effective.

For example:

$set ilusing"java"
01 f1 type java.util.date. 		   *> this is OK
01 f2 type util.date.			   *> this does not work

However, this does work:

$set ilusing"java.util"
01 f3 type date.
Note: This has the same effect as the import java.util.* statement in Java.

Comments:

You can add this directive more than once, to add multiple namespaces to your programs.

If you set the directive in a file, using the $set command, the imported namespace is only applicable to programs, classes and referenced copybooks in that file. If you set the directive through the IDE or from the command line, the imported namespace is applicable to all programs and classes in the project or specified on the command line.