Previous Topic Next topic Print topic


Generating Code

Explains the processes of generating AMB objects, such as screens, programs, and full applications from both the Enterprise Developer IDE in Eclipse and from the command line.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

Generating Objects

You can generate source code for a single object listed on the Program Explorer. Each object generates code as specified by your AppMaster Builder preferences and/or object properties.

Generating Applications

When you generate an application, the AppMaster Builder Generator and Precompiler translate your AppMaster Builder specifications into a complete, executable structured COBOL application.

The generation options you assign regulate how AppMaster Builder generates an application. Options are available for controlling both the Generator and Precompiler, as well as target-specific options.

When AppMaster Builder generates an application, it:

  • Ensures that each component of the application exists.
  • Rearranges program specifications into proper COBOL program organization.
  • Includes externally-defined information that the program references, such as copyfiles and user-defined rules, at the appropriate COBOL program locations.
  • Processes all database and user interface calls and user-defined rules, translating all source to COBOL source.
  • Generates screen symbols for the precompiler and screen source for the data communications user interface.
  • Translates all AppMaster Builder Report Writer source to COBOL source.
  • Writes a temporary error message file and merges it with the COBOL compiler error message file. The combined error message file presents messages sorted by program line number with both types of messages appearing where appropriate.

Generated Source Code Locations

By default, generated source code is saved in the testlib subdirectory of your User Area as specified in your AppMaster Builder preferences. However, you can redirect source code output by checking the Save COBOL, Save GENSRC, or Save MFS / BMS output options. These options redirect source code output to a subdirectory of your Project path. For a list of these subdirectories and their contents, see AMB Libraries and Directories.

Customizations via APRPROG

Program properties are stored in an APRPROG member, which is required for successful generation. If no APRPROG member is found during generation, generation fails unless you have set the Use default APRPROG if none found in the AppMaster Builder Output preferences. When set, this option enables successful generation by creating a temporary program property file. By default, all property values in the temporary file are set to system defaults.

Important: The only exception is the Online Express/Program Painter flag. This flag is dynamically set during generation, depending on the existence of an APSEXPS member with the same program name.

However, when no APRPROG member is found during generation and the Use default APRPROG if none found option is turned on, you can override default property values by providing your own set of properties and values in an aprprog.tmpl file. When present, the values set in the template file are used in the generated temporary APRPROG member.

Create an aprprog.tmpl file in any editor; then copy it to the %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\template\amb\properties directory.

For more information, see To set AppMaster Builder preferences and Output.

You can generate objects and applications from the Enterprise Developer IDE in Eclipse, or from the command line.

Previous Topic Next topic Print topic