CREATE - Create an External File

Syntax


CREATE

{ line-control-range }

[ filename ]

[ X | NX ]

[ U | NU ]


Operands


line-control-range

The range of lines which are to be included by the command.  Line control ranges provide a powerful tool to customize the range of lines to be included.   The full syntax and allowable operands which make up a line control range are discussed in "Line Control Range Specification".  Refer to that section of the documentation for details.


Note:  Prior editions of this document showed syntax that implied that the line-control range on CREATE was optional.  That is not correct.  You must specify a line-control-range, unless the line-control-range is implied via a C/CC or M/MM block.  We are trying to emphasize that fact by showing the syntax in red above, and in braces rather than brackets.


file-name


The name of the file you wish to create.

X | NX

Specifies a subset of the line range to be included.   X requests only excluded lines are to be included, NX requests only non-excluded lines are to be included.   If neither X or NX are specified, all lines in the range will be included.


U | NU

Specifies a subset of the line range to be included.   U requests only User lines are to be included, NU requests only non-User lines are to be included.   If neither U or NU are specified, all lines in the range will be included.


Abbreviations and Aliases


CREATE can also be spelled as CRE

Description


CREATE will use all or a specified portion of the Edit data to create a new external file. If you do not specify a full pathname as part of file-name, then the file will be created in the same directory as the file being edited. Note: If the filename already exists, then use the REPLACE command instead.  The CREATE and REPLACE commands are almost identical, except that CREATE prevents overwriting of an existing file, whereas REPLACE does not.


To copy the entire Edit data into a new file:


On the Command line, type:

CREATE file-name  .ZF  .ZL


The filename operand is optional. If you do not specify it, the standard Windows File Open dialog will be displayed. Enter the filename in this dialog.


Press Enter. The entire Edit data is copied to the new filename.  



To copy only a portion of the Edit data into a new File:


On the Command line, type:

CREATE filename  line-control-range


The filename operand is optional. If you do not specify it the standard Windows File Open dialog will be displayed. Enter the filename in this dialog.  


The line-control-range would typically specify the starting and ending line numbers to be included in the new file (or some other line-control-range variation). As described under "Line Control Range Specification" a variety of other possibilities for specifying the line range exist including marking the lines with the CC/CC or MM/MM lines commands.


Press Enter. The specified Edit data is copied/moved to the new filename.


File Format


If you wish to write a file in a format other than the normal default specified by your PROFILE EOL and SOURCE settings see "Handling Non-Windows Text Files" for additional info.


Default Directory


When no operand at all or only a simple unqualified filename is provided for the CREATE command, the default directory used for writing the file or for the file open dialog's starting directory will be determined as follows:




Created with the Personal Edition of HelpNDoc: What is a Help Authoring tool?