Using COPY RESOURCE

If you are creating a simple, single-object library, you can use the COPY RESOURCE statement to package your applications, bitmaps, and configuration file instead of the cblutil utility.

Use the COPY RESOURCE statement as follows:

COPY RESOURCE resource-name [ {IN} path-name ] .
                              {OF}

where resource-name and path-name identify a resource file to be included in the resulting object file.

The effect of a COPY RESOURCE statement is to add resource-name to a list of resources that the compiler embeds into the resulting COBOL object file. The resources are added to the end of the COBOL object in the same order as the corresponding COPY statements. Because the resources are added to the end of the object, the location of the corresponding COPY RESOURCE statement in the COBOL program is irrelevant. Conventionally, COPY RESOURCE statements are placed either in Working-Storage or at the end of the program, but any location is acceptable.

If resource-name resolves to a COBOL object or library file, the compiler includes this object or library in the resulting object in a manner similar to "cblutil -lib". These are not considered resources, but are embedded COBOL objects.