1 MODIFY

 The MODIFY command is used to modify ASCII files.  It may  be
 used to replace a string of printable characters or control characters, 
 detab a file, or convert a  file to a fixed record length.  

Format:

	$ MODIFY file-spec[...] srch_string rep_string
2 Parameters
 file-spec

  Any valid VMS file specification, including wild-cards.  If wild-cards
  are used all files matching the specification will be modified.  
  Separate a list of files by commas.

 srch_string

  Is the string to be located and replaced.  Control characters are
  designated by a letter preceded by a carat.  For instance, use a 
  srch-string of "^@" to locate nulls in the file.  If the string 
  contains blanks or control characters, enclose it in quotation marks.
  The search string is required unless the LENGTH and/or DETAB qualifiers 
  are specified. 

 rep_string 

  The string to replace the srch_string.  If it contains blanks or lower 
  case letters, enclose the string in double quotes. 

2 Qualifiers

/CONFIRM

  Requests that each change be confirmed by the user.

/CONTROL

  Signals MODIFY to interpret the carat (^) as a control character
  indicator instead of an ASCII character.

/DETAB=n

  Convert tabs to spaces with a tab length of n.  If n is not specified 
  and detabbing is required, the DEC standard of n=8 will be used.

/EXACT
/NOEXACT(default)

  Requires an exact match of the search-string, including case.  The 
  search-string must be enclosed in quotation marks or the system will 
  convert it to upper case.

/FIXED

  Species that the output file is to have fixed record length.  If /FIXED
  is specified, /LENGTH must also be specified.

/LENGTH=value

  Specifies the maximum output record length.  If the /FIXED qualifier
  is also specified, the output file will have fixed record length equal
  to this value.

/LOG(default)
/NOLOG

  Requests that changed lines are logged to the screen (or to a file
  if the /OUTPUT qualifier is specified).

/OUTPUT=fspec

  Specifies a name for the output file.  Otherwise the output file  
  name is the same as the input file name, but with an incremented  
  version number. 

/RANGE=c1:c2

  Species the starting (c1) and ending (c2) column numbers for locating
  the search string in each record.

2 Examples:

  $ MODIFY/EXACT HE*.FOR/OUTPUT=*.FTN "Larry" "Moe"

  This command searches all files of type FOR and name beginning with 
  the letters HE in the current directory for the string "Larry" and 
  replaces them with the string "Moe".  The new files created have the 
  same name as the input files, but with a file type of FTN instead of 
  FOR.  Because of the /EXACT qualifier, "LARRY" would not be modified.

  $ MODIFY/CONTROL *.TXT "^@" ""

  Delete all occurrences of the NUL character in files of type TXT in 
  the current directory.

  $ MODIFY/FIXED/LENGTH=72/NOLOG/OUTPUT=IBM.FOR IBM.TXT

  Convert file IBM.TXT to a fixed record length file of length 72 and 
  truncate each record that is greater than 72 bytes long.  The new fixed 
  record length file will be called IBM.FOR.  Display of the changes has 
  been turned of with the /NOLOG qualifier.  Since no detab qualifier was 
  specified, any tabs will be converted to spaces using the DEC default 
  tabbing of 8 spaces.

