You can use the SQL INCLUDE directive to get secondary input from the include library, INCLUDE. The INCLUDE directive causes input to be read from the specified member of the include library until the end of the member is reached. The included library input cannot contain other INCLUDE directives, but can contain both host language and SQL statements. The include library must have fixed-length records of 80 bytes.
You can use the INCLUDE only in the extended mode. If the Preprocessor finds an INCLUDE while in the ANSI mode, it ignores the INCLUDE during processing, and issues a warning message. Processing by the Preprocessor continues.
The INCLUDE can be used anywhere within the program. The Preprocessor locates the member name and includes the member in the COBOL source. If the result is invalid COBOL, the precompiler does not check for valid COBOL syntax in an INCLUDE.
Note: INCLUDE directives cannot be nested, that is to say, a member named in an INCLUDE directive cannot contain an INCLUDE directive.
z/OS
In z/OS, the format for the INCLUDE instruction is:
EXEC SQL
INCLUDE member-name
END-EXEC
z/VSE
In z/VSE, the format for the INCLUDE instruction is:
EXEC SQL
INCLUDE member-name,member-type
END-EXEC
Note: In the previous example, member-type is a one-byte identifier of the file type under which the member is cataloged. Any letter is a valid value for member-type. If member-type is not specified, it defaults to C.
|
Copyright © 2014 CA.
All rights reserved.
|
|