White Papers
Abstract
Venkatasuresh Kothuri
Project Manager
Venkata.SK@hcl.com
The build server reads the build script from a file system and parses the script. As it parses, the build server develops the logic to process the script. Using the INCLUDE statement, a part of the script can be pulled from a separate file that is similar to a COBOL COPY statement. This facilitates sharing of common code between many build scripts.
This paper explains the different approaches possible for various requirement scenarios.
Content
Introduction
IBM Rational Business Developer (RBD) allows Developers to use the INCLUDE statement in the COBOL runtime build scripts, which is similar to the use of INCLUDE in JCL. Currently, Business Developers place the common symbolic parameters like COBCOMP, COBOLIB, RESLIB, ELA and so on in all the build scripts. If there is a change in the compiler version, the Business Developer updates all the build scripts. With the introduction of the INCLUDE statement, Rational Business Developer places all the common Symbolic Parameters in one member and refers it in all the build scripts. Another use of the INCLUDE statement is the sharing of common code among different build scripts.
The scenarios described in this paper explain how to handle the INCLUDE statement in build scripts during the generation of host-side programs.
Prerequisites
• IBM Rational Business Developer (RBD)
• Knowledge of developing using EGL and RBD
• Knowledge of generating the COBOL programs from EGL
Scenario 1: Using INCLUDE statement for accessing common Symbolic Parameters of COBOL Runtime Build Scripts
Following is the build script format without INCLUDE statement:
Following is the build script format with INCLUDE statement:
Add all the common Symbolic Parameters in a member DEFVARS and invoke the member in the built script as shown.
The build server reads the entire build script file into a buffer in the memory. It reads one line at a time and determines what to do with it.
When the build server finds a line containing the INCLUDE statement, it pushes the pointer to the buffer into a stack, reads the member referred to, in the INCLUDE statement in a new buffer, and sets the pointer to the new buffer. From this point, the build server continues to read and parse from the new buffer. When the buffer is finished, it sets the pointer to what was saved and resumes the parsing of the original script from where it had left.
Scenario 2: Using Nested INCLUDE statement for accessing common Symbolic Parameters of COBOL Runtime Build Scripts
A nesting level, up to five, is allowed for INCLUDE statement in COBOL runtime build scripts. In this example scenario, instead of keeping all the common parameters in DEFVARS, some parameters can be kept in the second level DEFVARS1 and it can be called from the main level DEFVARS, but the build script refers to only the main level INCLUDE DEFVARS.
Conclusion
This white paper discusses two different scenarios on how to use the INCLUDE statement in COBOL runtime build scripts. Based on the features of the INCLUDE statement, and according to the business purpose of sharing common code across multiple build scripts, Business Developers can use the INCLUDE function for various purposes.
Was this topic helpful?
Document Information
More support for:
Rational Business Developer
Software version:
All Versions
Operating system(s):
z/OS
Document number:
1096138
Modified date:
15 November 2019
UID
ibm11096138