Migrating from the CL Program build style to the Build Specification style

You can manually migrate from the CL Program build style to the Build Specification style.

You can switch the CL Program build style to the Build Specification style. See The Build Specification Build Style. A default build specification is generated when you open the build specification editor for the first time. The default build specification contains command sets and builders that will build the most common IBM® i objects. If you already customized your CL Program build style by modifying COMPILE.CLLE member or BIND.CLLE member, you can leverage these customized commands to edit the default commands in the command sets of the build specification. The COMPILE.CLLE and BIND.CLLE also help you to determine if new builders or new command sets are required.

Open COMPILE.CLLE source member. Compare the object types to be built in the COMPILE.CLLE with the builders available in the default build specification and find out what kinds of builders are applicable to the project. Remove the builders not applicable.

For each applicable builder, look at COMPILE.CLLE to determine if the default builder is sufficient to compile the source members as the way you specified in the COMPILE.CLLE. If not, you can edit the commands in existing command sets based on CL commands in COMPILE.CLLE. Note that you need to replace the hard-coded library name, file name and source name in your CL command with predefined build specification variables &L, &F and &N respectively when copying it over to the build specification. Also remember to specify OPTION(*EVENTF) in the command so that the compile errors are gathered and made available in the build result after the build is performed.

In some cases, you may need to create new builders and new command sets. For example, a subset of RPGLE source members in your i Project need to be built with DBGVIEW(*SOURCE) while other RPGLE source members only need default CRTRPGMOD command without any debug view. You can create a new builder Builder_RPGLE_DBGVIEW and a corresponding command set RPGLE_DBGVIEW. The builder Builder_RPGLE_DBGVIEW build debuggable modules for those RPGLE source members. The RPGLE_DBGVIEW command set contains a CRTPRGMOD command with DBGVIEW(*SOURCE).

If COMPILE.CLLE compiles some object types not covered in the default build specification, create new builders and new command sets for those object types. Again, the commands can be created based on the commands specified in COMPILE.CLLE.
Note: The generated COMPILE.CLLE has commands to track errors
MONMSG MSGID(CPF0000) EXEC(DO)   CHGVAR VAR(&FAILED) VALUE(&FAILED + 1) ENDDO
When moving to Build Specification style, these commands can be safely ignored because the error tracking has been built into the build runtime for the build specification style build.

If you created a BIND.CLLE to build programs and service programs, you need to create new builders and new command sets for the programs and service programs because the default build specification does not have builders for these objects. Make sure the prerequisites of the builders are specified correctly. For the commands, you can copy over the commands in BIND.CLLE and modify them accordingly in the build specification.

Please refer to Jazz™.net for more information.


Feedback