You do this in Enterprise Developer.
The files generated are determined by the options specified on the General page of the Mapset Properties dialog box.
The language selected in the Lang group specifies the value of the LANG operand of the DFHMSD macro in the BMS source file. When you compile a BMS macro file, the value of the LANG operand is used to determine which type of copybook or include file to generate:
Generation of C DSECT (include) files is not currently supported.
The option selected in Type determines the files generated:
If &&SYSPARM is selected you must specify whether you want to generate the copybook, the load module, or both, in the BMS file properties. See Build Settings for the BMS Painter.
It is not possible to compile the BMS file in Enterprise Developer while it is still open in the BMS painter. You need to save the file and close it in the BMS painter, then go to Enterprise Developer and compile the file with it.
The copybook (.cpy or .mac file) is created in the copylib folder of the project and the load module (.mod file) is created in the loadlib folder of the project.