Syntax


REPLACE

[ 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 is discussed in "Line Control Range Specification". Refer to that section of the documentation for details.


If no line control range is specified, either via C/CC or M/MM line selection or via the command line, then ALL lines will be selected.


file-name

The name of the file you wish to replace. The filename may contain system variables ( %xxx% ) if desired, they will be substituted from the System variable settings.


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.



Description


REPLACE will use all or a specified portion of the Edit data to replace 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 does not already exists, then command will create it as a new file. The CREATE and REPLACE commands are almost identical, except CREATE prevents overwriting of an existing file, whereas REPLACE does not.


To copy the entire Edit data into an existing file:


On the Command line, type:


REPLACE file-name


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 will replace the existing contents of the filename.  



To copy only a portion of the Edit data into an existing file:


On the Command line, type:

REPLACE 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 replaced 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 line commands.


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


File Format


If you wish to write a file in a format other than the normal default specified by your PROFILE DCB 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 REPLACE command, the default directory used for writing the file or for the file open dialog's starting directory will be determined as follows:


    • If there is an active file being edited in the tab where the command is issued, then the path for that active file is used as the default for the command.


    • If there is no active file (when the tab header displays (New), CLIP etc. ), a pop-up will appear for you to enter your desired path and file-name.

Created with the Personal Edition of HelpNDoc: Make Your PDFs More Secure with Encryption and Password Protection