The following rules apply to resources in general.
- Resources are files (other than COBOL objects) that are included in a COBOL object library.
- Resources are named as if they were files, but without any directory information. A resource takes on the same base name as
its source file (including suffix). For example, if you include the resource
c:\mystuff\toolbar1.bmp, that resource would be called
toolbar1.bmp in the COBOL object library.
- Resources preserve the case of their names in the object (as specified at the time they were included in the object). However,
resource names are matched regardless of case. Thus, in the preceding example, a program could refer to the resource as
ToolBar1.Bmp with identical results.
- A resource name with a hyphen (MY-FILE) is considered equivalent to the same resource name given with an underscore (MY_FILE).
- Resources are accessed by various specific COBOL subroutines or operations. The current list of resource types include: bitmap,
JPEG, PNG, TIFF, WAV, ActiveX resource, and runtime configuration files. The library routines
C$RESOURCE can access resources. See
Using the Runtime System for information about embedding a runtime configuration file in an object library.
- The presence of one or more resources in an object converts that object into a library. A library consists of a collection
of COBOL objects and resources (either of which may be absent). COBOL objects are named in a library by their PROGRAM-IDs,
while resources are named by their file names. The CALL verb ignores resources when trying to find a COBOL object, and resource
processing routines (such as W$BITMAP) ignore COBOL objects when trying to find a resource.
- You can include a resource in an object file by using either the COPY RESOURCE statement or by using