Declare Indicators using CLF (DCLINDCLF)
The Declare Indicators using CLF (DCLINDCLF) command is used in a CL program to include pre-defined indicators into the CL source program being compiled. The command can generate CL definitions for:
- indicators related to file input/output conditions related to CLF processing
- a separate indicator area that can be used instead of passing indicators in Input/Output buffers. This option should be used in conjunction with the Separate indicator area (SEPINDARA) parameter of the Open File using CLF (OPNFCLF) command.
Restrictions:
- The DCLINDCLF command must be treated as a declare command. All declare commands (DCLFCLF, DCLFKSCLF, DCL, COPYRIGHT, DCLF, and DCLPRCOPT) must follow the PGM (Program) command and must precede all other commands in the program. The various types of declare commands can be intermixed in any order.
- This command can only be used when the CL source program is compiled using a prompiler command such as Create Bound CLF Program (CRTBNDCLF), Create CLF Module (CRTCLFMOD), or Create CLF Program (CRTCLFPGM). The Generate Indicators using CLF (GENINDCLF) command can be used to generate a stand-alone definition of these indicators.
- Any CL variable defined in the program by a DCL, DCLF, GENFFDCLF, or DCLFCLF command, with the same name as a DCLINDCLF CLFIND(*YES) defined field, must have all field attributes match.
- When using DCLINDCLF with INDARA(*YES), you should not declare the variable names &IN01 through &IN99 in your CL source code.
| Keyword | Description | Choices | Notes |
| CLFIND |
CLF file-related indicators |
*NO, *YES |
Optional |
| INDARA |
Indicators 01 - 99 |
*NO, *YES |
Optional |
CLF file-related indicators (CLFIND)
Specifies if CLF file-related indicators are to be declared.
- *NO
- No CLF file-related indicators are to be declared.
- *YES
- CLF file-related indicator are to be declared. The indicators, and the Input/Output parameter associated with each indicator, are:
&EOF EOF End of File
&ERR ERR Error (such as record not available)
&RNF RCDNOTFND Record Not Found
Indicators 01 - 99 (INDARA)
Specifies whether a separate indicator area should be declared.
- *NO
- A separate indicator area will not be declared.
- *YES
- A separate indicator area will be declared.
The name of the separate indicator area will be &CLF_IND_. The &CLF_IND_ variable will be defined as TYPE(*CHAR) with LEN(99) and have each character within the variable set to '0' (off). CL logical variables &IN01 through &IN99 will be declared and defined over the &CLF_IND_ variable. &IN01 will correspond to the first byte of &CLF_IND_, &IN02 the second byte, and so on.
Examples for DCLINDCLF
Example 1: Basic Use
DclIndCLF CLFInd(*Yes) IndAra(*Yes)
This command will declare CL variables for both file-related indicators and a separate indicator area in the current compilation of a CL program.
Error messages for DCLINDCLF
*ESCAPE Messages
- VC29002
- Function did not complete. See previously listed messages related to possible user errors.
- VC29003
- Function did not complete. See previously listed messages for possible cause.
- VC29004
- Function did not complete. See previously listed messages for possible cause.
- VC29005
- Function did not complete. Contact your service provider.
|