── MAKE ──<file name>─┬────────┬───────────────────────────────────────► └─<type>─┘ ►─┬───────────────────────────────────────────────────┬────────────────┤ │ ┌◄──────────────────── , ───────────────────┐ │ └─ : ─┴─┬─/1\─┬─ GUARDED ────┬─<file title>─────┬─┴─┘ │ ├─ CONTROLLED ─┘ │ │ │ ┌◄────────────────────┐ │ │ └─┴─┬─/1\─┬─ PRIVATE ─┬─┴─────────┤ │ │ └─ PUBLIC ──┤ │ │ └─/1\─┬─ IO ──────┤ │ │ ├─ IN ──────┤ │ │ ├─ OUT ─────┤ │ │ └─ SECURED ─┘ │ ├─/1\─ USECATALOG ─┬─────┬─┬─ TRUE ─────┤ │ └─ = ─┘ └─ FALSE ────┤ ├─/1\─ VERSION ──────┬─┬─────┬─<number>─┤ ├─/1\─ CYCLE ────────┤ └─ = ─┘ │ ├─/1\─ BLOCKSIZE ────┤ │ ├─/1\─ RECSPERBLOCK ─┘ │ └─/1\─ MARKID ──<dlm>──<ID>──<dlm>──────┘
Explanation
The MAKE command creates a new work file. If an unsaved work file already exists, the following message is displayed:
#REMOVE OR SAVE WORKFILE
The work file must be removed or saved before another work file can be created.
MAKE <file name>
MAKE <file name> <type>
The file name defines a new file within the user's library to become the name associated with the work file. If the file type is not specified, the work file is type SEQ by default. Allowable types and their associated attributes are defined in Basic Constructs.
The file name cannot reference an existing file in the user's library. CANDE rejects such requests with a message similar to the following:
#SOURCE AND OBJECT FILE ALREADY PRESENT
The MAKE command does not support long node file names. The traditional file naming constructs continue to apply to the file names used by this command. Regardless of whether a system is configured to support long file names, the MAKE command always truncates file name nodes that are greater than 17 characters. If you attempt to use a file name containing a node that is longer than 17 characters, a warning message is issued, and the command proceeds using a truncated form of the name.
Security Options
The security of the work file can be specified with the PUBLIC, PRIVATE, GUARDED, CONTROLLED, SECURED, IN, OUT, or IO options. The default security is PRIVATE IO. (CLASSA and CLASSB are recognized as nonpreferred synonyms for PUBLIC and GUARDED, respectively.)
For more information about the security specifications listed above, refer to the SECURITYGUARD and SECURITYTYPE file attributes in the File Attributes Reference Manual.
If a guard file is specified, its name must be less than 137 characters, including a prefix of either a usercode or an asterisk (*) prefix, and an ON <pack name> suffix. The prefix and suffix are supplied by CANDE if not specified by the user.
USECATALOG
The USECATALOG option can be specified for those installations that use file cataloging. The USECATALOG option can be used only when the CANDE option CATALOGOK is set. Refer to the CANDE Configuration Reference Manual for additional information about the CATALOGOK option of the ?OP control command.
MARKID <dlm> <ID> <dlm>
The MARKID <dlm> <ID> <dlm> option establishes an initial MARKID. The MARKID command can be used at any time afterwards to establish a new MARKID.
The following commands display the correspondence between the ID field of a record and the current value of the MARKID, if the MARKID option is specified:
-
FIND on a work file using the TEXT option
-
RANGE on a work file using the TEXT option
-
LIST on a work file without the PAGEFORMAT or UNSEQUENCED options.
-
REPLACE using the TEXT option, before the ID field of the record is changed
The displays from each of the preceding commands include the following:
-
The sequence number
-
An asterisk (*) if the record ID is the same as the MARKID; otherwise, a blank
-
The text.
BLOCKSIZE <number>
The BLOCKSIZE option enables you to specify a blocksize value for your new work file. The BLOCKSIZE value must be a multiple of the maximum record size (MAXRECSIZE) of the file. If the BLOCKSIZE value you specify is not a multiple of MAXRECSIZE, CANDE terminates the MAKE command and issues an error message.
The MAKE command is also terminated and an error message is displayed if the specified BLOCKSIZE value is zero (0).
The maximum value of BLOCKSIZE for a file is 65520 words and the default value is determined by the file type.
RECSPERBLOCK
The RECSPERBLOCK option is used to specify the number of records per block for a file, which is another way to specify the BLOCKSIZE value. The RECSPERBLOCK value cannot be zero (0).
If the BLOCKSIZE option is also specified, the values of both of these options must correspond; otherwise, the MAKE command is terminated with an error message. For example, if both BLOCKSIZE and RECSPERBLOCK are specified for a file of type ALGOL (record length is 15 words) and the value for BLOCKSIZE is 420, then the value for RECSPERBLOCK must be 28.
Examples
The following examples show how to specify file names and security options with the MAKE command:
make it #WORKFILE IT: SEQ MAKE TOP/SECRET : PRIVATE,OUT #WORKFILE TOP/SECRET: SEQ MAKE CAT/FILE: USEC=TRUE,VERSION=5,CYCLE=11 #WORKFILE CAT/FILE: SEQ
The following examples show the MAKE command with file names and file types specified:
MAKE GUARDED/PROGRAM COBOL: GUARDED FBI ON PACK #WORKFILE GUARDED/PROGRAM: COBOL make testonly a #WORKFILE TESTONLY: ALGOL
The following examples demonstrate how to use the MARKID option and the flagging with an asterisk of changed records as a result of the MARKID option.
MAKE CANDE/EX ALGOL:MARKID "ORIG" #WORKFILE CANDE/EX : ALGOL, MARKID "ORIG " 100XXX 200YYY LIST 100*XXX 200*YYY # SAVE #UPDATING #WORKSOURCE CANDE/EX SAVED GET CANDE/EX : MARKID "CHGED" #WORKFILE CANDE/EX: ALGOL, 2 RECORDS, SAVED, MARKID "CHGED " 100XXXABC LIST 100*XXXABC 200 YYY #
The following examples show the use and results of the BLOCKSIZE and RECSPERBLOCK options:
MAKE SAMPLE TEXT: BLOCKSIZE 800 #BLOCKSIZE VALUE NOT A MULTIPLE OF MAXRECSIZE MAKE SAMPLE TEXT: BLOCKSIZE 795 #WORKFILE SAMPLE: TEXT MAKE TEST/PROGRAM ALGOL: RECSPERBLOCK 56 #WORKFILE TEST/PROGRAM: ALGOL