COPYLIB Command [ HP SYSTEM DICTIONARY XL COBOL DEFINITION EXTRACTOR Reference Manual ] MPE/iX 5.0 Documentation
HP SYSTEM DICTIONARY XL COBOL DEFINITION EXTRACTOR Reference Manual
COPYLIB Command
The COPYLIB command opens the COBOL copy library into which the COBOL
source is generated. Through this command you can name an old copy
library or create a new one. When specifying a new copy library, you
must include the KEY-FILE parameter.
Syntax
COPYLIB [;NAME = file-name]
[;KEY-FILE = kfile-name]
[;UPDATE-DICT = update-option]
[;OPEN-MODE = open-mode]
{.}
Parameters
file-name Name of the copy library KSAM file. If the named KSAM
file does not exist, SDCDE assumes that the file is new,
and uses the KEY-FILE parameter value to create a new
file. There is no default for this parameter.
kfile-name Name of the key file of a new copy library. If the
named copy library already exists, the value of this
parameter is ignored. There is no default for this
parameter.
update-option Through this option, you can enter the
entity/relationship definitions involving the copy
library and the key file into System Dictionary. When
UPDATE-DICT = ON, and a new copy library is created, the
COPYLIB entity definition and the KSAMFILE entity
definition are created from the copy library and key
file name, respectively. Then the COPYLIB key KSAMFILE
relationship is created with the entity definitions.
Note that in order create these definitions, the
dictionary must be opened in either shared-update or
exclusive-update open mode and the STATUS parameter of
the DEFINE command must be TEST. SDCDE issues an error
message if you create a copy library when the
UPDATE-DICT parameter is set to ON and the dictionary is
not open or open in the wrong mode. When this happens
SDCDE creates the copy library, but does not update the
dictionary. You can set the UPDATE-DICT parameter
without opening a copy library. The initial default for
this parameter is OFF.
open-mode When generating COBOL source, if the module name you
specify already exists in the copy library, you can
either have the new source replace the lines that
already exist in the module or you can have the new
source appended to the end of the old lines. Specify
REPLACE if you want to replace an existing module in the
copy library. Because of KSAM, the REPLACE option does
not delete copylib records, it flags them as deleted.
Therefore it is possible to hit an end of file in the
copy library even when REPLACE = ON. Specify APPEND if
you want to append to an existing module in the copy
library. You can set the OPEN-MODE parameter without
opening a copy library. The initial default for this
parameter is APPEND.
Example
The following example creates a new copy library.
>COPYLIB NAME=CL1001
>> KEY-FILE=CL1001K
>> UPDATE-DICT=OFF
>> OPEN-MODE=REPLACE.
New copy library created
>
MPE/iX 5.0 Documentation