You can use the PGMINFO keyword to control whether the interface
to the procedure will be included in the program-interface
information when a module is being created.
If you do not specify the PGMINFO keyword on the Procedure specification
for any procedures, then when you create a module, program-interface
information is generated for the main procedure and all exported subprocedures
that are not Java™ native methods.
- *YES
- When PGMINFO(*YES) is specified for one or more procedures in
the module, program-interface information will not be generated for
any procedure for which PGMINFO(*YES) is not specified. If the module
has a cycle-main procedure, program-interface information will not
be generated for the main procedure.
- *NO
- When PGMINFO(*NO) is specified for one or more procedures in the
module, program-interface information will only be generated for the
procedures which do not have the PGMINFO keyword. If the module has
a cycle-main procedure, program-interface information will be generated
for the main procedure.
Note: - The PGMINFO keyword is only in effect when a module is being created.
When a program is being created, program-interface information is
only generated for the main procedure. If you want to prevent program-interface
information being generated for the main procedure when a program
is being created, using the PGMINFO(*NO) keyword
in your Control statements to prevent any program-interface information
from being generated. See the example below.
- All the PGMINFO keywords in the module must have the same value,
either *YES or *NO.
- If the module has a cycle-main procedure, you can prevent program-interface
information from being generated for the main procedure when you create
a module by specifying PGMINFO(*YES) on one or more of the exported
subprocedures.
- The PGMINFO keyword is ignored if program-interface information
is not requested, either by the PGMINFO parameter of the command or
the PGMINFO keyword in the Control statements of the module.
- If you are using PGMINFO(*NO) to disallow program-interface information
from being specified for some procedures, it is not necessary to specify
PGMINFO(*NO) for procedures that do not have program-interface information
generated, such as Java native
methods, or procedures that are not exported.
Examples
- In the following example, program-interface information is only
generated for procedures PROC1 and PROC3, because the PGMINFO(*YES)
keyword is not specified for PROC2.
CTL-OPT PGMINFO(*PCML : *MODULE);
CTL-OPT NOMAIN;
DCL-PROC PROC1 EXPORT PGMINFO(*YES);
END-PROC;
DCL-PROC PROC2 EXPORT;
END-PROC;
DCL-PROC PROC3 EXPORT PGMINFO(*YES);
END-PROC;
- In the following example, program-interface information is only
generated for procedure PROC1 and PROC3, because the PGMINFO(*NO)
keyword is specified for PROC2.
CTL-OPT PGMINFO(*PCML : *MODULE);
CTL-OPT NOMAIN;
DCL-PROC PROC1 EXPORT;
END-PROC;
DCL-PROC PROC2 EXPORT PGMINFO(*NO);
END-PROC;
DCL-PROC PROC3 EXPORT;
END-PROC;
- In the following example, if PGMINFO(*NO) is specified by the
command, no program-interface information is generated, even though
PGMINFO(*YES) is specified for procedures PROC1 and PROC3.
CTL-OPT NOMAIN;
DCL-PROC PROC1 EXPORT PGMINFO(*YES);
END-PROC;
DCL-PROC PROC2 EXPORT;
END-PROC;
DCL-PROC PROC3 EXPORT PGMINFO(*YES);
END-PROC;
- The following example shows how to prevent
program-interface information from being generated for the main procedure.
- Control specification keyword PGMINFO(*NO) prevents any program-interface
information from being generated when a program is being created.
- Procedure specification keyword PGMINFO(*NO) prevents program-interface
information from being generated for the main procedure, myPgm when
a module is being created.
CTL-OPT MAIN(myPgm);
/IF DEFINED(*CRTBNDRPG) 1
CTL-OPT PGMINFO(*NO);
/ENDIF
DCL-PROC myPgm PGMINFO(*NO); 2
END-PROC;
DCL-PROC PROC1 EXPORT PGMINFO(*NO);
END-PROC;
DCL-PROC PROC2 EXPORT;
END-PROC;
- In the following example, program-interface information is not
generated for the cycle-main procedure because PGMINFO(*YES) is specified
for one of the subprocedures.
CTL-OPT PGMINFO(*PCML : *MODULE);
// Cycle main procedure
RETURN:
// Subprocedures
DCL-PROC PROC1 EXPORT PGMINFO(*YES);
END-PROC;