Generating a Program, Screen, Server, Communication Monitor, or Folder
You can generate the COBOL code of a Program, Screen, Server, Communication Monitor, or Folder. If a Business Component-type Server is not included in a Folder, you must generate the corresponding service manager. From certain types of Servers, you can also generate single-view proxies that the Client will use to remotely activate the services of the Business Components from the graphical application. From a Folder, you can generate a multi-view proxy. This proxy contains a set of classes that are used to manage the Folder in a graphic application.
Before you begin
The preference Structure checking before generation management, which is available from , checks that the nesting of subfunctions in the COBOL code is correct before the generation. By default, it blocks the generation if structure errors are detected.
Procedure
- Right-click a Program, Screen, Server, Communication Monitor, or Folder in the Design Explorer view, the Keywords view, or the result view of a design or reference search. Select Generate and the entity type of the selected instance.
- Right-click anywhere in the COBOL code that is opened in the PDP COBOL editor or in the Generated Code Structure view. Select Generate the code.
- Click
in the Design view of the instance. To be able to do so, you must have previously generated the instance a first time and opened its code in the PDP COBOL editor.
Note: The Design view is deprecated. It will be removed in a future version. - Enter an rpp –generate command line from a command prompt.
- The type of the Server (or Server Dialog if the value is inherited) is S: Business Component.
- The LOCATION=FMCODE-ENVIRNAME option is present in the -GO Lines of the Business Component or of its Dialog. In this option, FMCODE is the Communication Monitor name and ENVIRNAME the environment name. The presence of LOCATION triggers the default recognition of the implicit SRVMGR=YES option (this option is not visible). The service manager is then generated by default.
- The SRVMGR=NO option is not present in the -GO Lines of the Business Component or of its Dialog. The SRVMGR=NO option overrides the implicit SRVMGR=YES option.
From a Server (except IT: Initialization/Termination Business Component and E: Error Message Server), selecting generates the proxy that can be used to manage the services of the Business Component on the Logical View in a graphic environment.
Results
A progress information message box is displayed until the generation is complete.
- A .cbl file that is nested under the instance in the Design Explorer view. If you right-click it and select , the instances that are involved in the generation are automatically displayed in the References view. For explanations on the generated constants, variables, and functions, see COBOL description of a generated Program, Screen, or Server.
- A map description file for a Screen (.map, .bms, or .mfs) that is nested under the Screen instance in the Design Explorer view.
- A metadata file of the generated design (.cblpdp) and a metadata file of the map for a Screen (.mappdp, .bmspdp, or .mfspdp). These files can be viewed in the Package Explorer view: They must not be edited but must be assigned the same version number as the other generated files.
To edit the generated .cbl file, right-click it and select . You access the COBOL editor and views where you can work on the code.
The generation of a service manager produces a .cbl file under the Business Component in the Design Explorer view. This file is generated by default in a project and folder that are distinct from the project and folder of the .cbl file that corresponds to the generated code of the Business Component. If the generation project and folder are identical, the file names must be different. The name of the service manager is the name that is indicated in the External name of the service field. If this name is not indicated, the file name corresponds to the Business Component name.
The generation of a proxy produces a .txt file under the Server in the Design Explorer view. The proxy must then be integrated into the graphic applications so that the Client can activate the services on the Server.