   <PA=i> T. Worlton--	DCL-336 DCL-336	T. Worlton--   		MODIFY   MODIFY  E qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq   MODIFY    > Modifies a set of ASCII files by detabbing, changing to fixed 6 record length, truncating records, or searching for a = specified string and replacing it with another string.  Both  ; string substitution and length conversion can occur in the   same command execution.   E qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq  4 FORMAT	MODIFY file-spec[,...] Search-string Replace- string    E                  qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq  C restrictions	You must have read access to the input file and write  : access and available disk quota for the output file.  You ; must also have delete access for files in the output direc- 6 tory for a temporary file which will be deleted if no 9 changes are made.  Trailing blanks are removed from each  7 record unless the output file is a fixed record length   file.   E qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq   PARAMETERS	file-spec[,...]< 		Specifies the names of one or more files to be searched.  9 You must specify at least one file name.  If you specify  2 two or more file names, separate them with commas.  < 		Wildcard characters are allowed in the file specification.   		Search-string > 		Specifies the string to search for in the specified files.  ; If the search-string contains any lowercase letters or non- : alphanumeric characters (including spaces), enclose it in ; quotation marks.  The search-string is required unless the  ' LENGTH or DETAB qualifier is specified.   > 		You can use the /CONTROL and /EXACT qualifiers to alter the ' way that MODIFY matches search strings.    		Replace-string8 		Specifies the string to be used to replace the search 6 string in the specified files.  If the replace-string 2 contains any lowercase letters or nonalphanumeric 7 characters (including spaces), enclose it in quotation   marks.  E qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq  G DESCRIPTION	The MODIFY command enables you to search through files for  8 a specific character string and replace it with another 9 character string.  All records containing occurrences of  < the string are displayed followed by the modified record in ; reverse video.  MODIFY also allows you to convert files to  < fixed record length files, to truncate records in files, or  to detab files.   = 		The MODIFY command opens the specified files with READONLY  : access.  It creates output files which record all records < of the input files with any modifications.  If there are no = modified records, the output files are deleted when closed.   8 Aborting the operation with CTRL_Y will leave a file of : type "JOU" and the file name of the output file which was  being created.  E qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq   QUALIFIERS	/COMMENT 7 		When specified with the /F77 qualifier, comments are  6 converted to standard Fortran 77 form.  Comment lines ; starting with "!" are changed to "*" comment lines.  Debug  ; lines starting with "D" are changed to "C" comment lines.   1 Trailing comments beginning with "!" are removed.   
 		/CONFIRM> 		Controls whether a request is issued before each individual 6 MODIFY operation to confirm that the displayed record  should be modified as shown.  > 		When the system issues the prompt, you can issue any of the  following responses:  ! 		Yes--Modify the record as shown    		No--Do not modify this record   : 		Retype--Retype the line (allows line editing, works with 		records up to 158 bytes)  = 		Quit--Use the modifications made up to this point and copy  , the rest of the records from the input file.  3 		Abort--Stop searching and delete the output file.   < 		Only the first character of each response should be typed.  
 		/CONTROL= 		Specifies that the caret symbol ("^") in the search-string  ; and/or replace-string is to be interpreted as a flag which  4 indicates that the following character is a control 
 character.  
 		/DETAB=n> 		Specifies that tabs in the input file are to be replaced by ; an appropriate number of spaces.  If the tab length, n, is  7 not specified, the DEC default tab length of 8 will be  1 used.  Tabs will be replaced whenever one of the  8 qualifiers: RANGE, LENGTH, DETAB, TRUNCATE, or CLIP are 
 specified.   		/EXACT 		/NOEXACT (default)9 		Controls whether the MODIFY command matches the search  : string exactly, or treats uppercase and lowercase letters < as equivalents.  Unless the strings are enclosed in quotes, ; they will still be converted to upper case by the system.   9 The default qualifier, /NOEXACT, causes MODIFY to ignore  & case differences in the search string.  ; 		Specifying the /EXACT qualifier causes the system to use  : less CPU time.  Therefore, if you are sure of the case of 7 the letters in the string, it is more efficient to use   /EXACT.    		/FIXED: 		Specifies that the output file should have fixed record < length.  The /FIXED qualifier requires the specification of  the /LENGTH qualifier also.    		/F776 		Specifies that a Fortran file is to be converted to 7 standard source form from tab-format.  If the /COMMENT  ; qualifier is also specified, "!" comments are converted to  7 "*" comments, and "D" debug lines are converted to "C"  : comment lines.  If the length qualifier is not specified, 7 the text past column 72 is discarded.  Use the /LENGTH   qualifier to keep longer lines.    		/LENGTH=n = 		Specifies the record length of the output file for a fixed  ; record length output file when /FIXED is specified, or the  < maximum record length of the output file when /FIXED is not 
 specified.   		/LOG (default) 		/NOLOG> 		Controls whether the MODIFY command displays each record to 7 be modified followed by the modified record in reverse   video.   		/OUTPUT=file-spec 9 		Specifies the name of the output file.  By default the  8 output file has the same name as the input file with an < incremented version number.  Wild cards are allowed for the < file name or type, but no partial wild cards are allowed in 7 the output file specification.  For example HE*.DAT is  7 allowed as an input file specification, but not for an   output file specification.   		/RANGE=n1:n2= 		Specifies the range of columns to search for the specified  : search-string.  If no range is specified, all occurrences 6 of the search string are located and replaced in each  record.    		/TRUNCATE = 		Specifies that text beyond the allowed record length is to  
 be truncated.    		/UNCOMMENT7 		when specified with the /F77 qualifier it causes all   comments to be removed.    		/WRAP = 		Specifies that text beyond the allowed record length is to   be wrapped to a new record.   M qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq EXAMPLES     4 1	$ MODIFY/EXACT  HE*.FOR/OUTPUT=*.FTN "Larry" "Moe"  7 		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 it with the string "Moe".   6 The new files created have the same name as the input 8 files, but with a file type of FTN instead of FOR.  The 6 /EXACT qualifier means that only strings matching the ; search string exactly (including upper/lower case) will be  $ found, so "LARRY" would be bypassed.    0 2	$ MODIFY/CONFIRM DRA1:[*]LOGIN.COM SUBS MODIFY  8 		This command searches the LOGIN.COM files in all main : directories on disk DRA1: for the string "SUBS", displays ; the records containing this string, followed by the record  ; as it will appear after the change and prompts the user to  < confirm the change.  The output file in each directory will < be LOGIN.COM with an incremented version number.  Note that 7 if you have SYSPRV, the output file will belong to the  5 parent directory.  You must have read access to each  ; LOGIN.COM file and write access to each directory in order  6 to perform this operation.  In addition there must be ; adequate disk quota for each directory owner to create the   file.       3 $ MODIFY/CONTROL *.TXT "^@" ""  : 		Delete all occurrences of the NUL character in files of 9 type TXT in the current directory.  The search_string is Y, deleted whenever the replace_string is null.    7 4 $ MODIFY/FIXED/LENGTH=72/NOLOG/OUTPUT=IBM.FOR IBM.TXT   8 		Convert file IBM.TXT to a fixed record length file of ; length 72 and truncate each record that is greater than 72 o6 bytes long.  The new fixed record length file will be 2 called IBM.FOR.   Since there will be no apparent 9 difference between the two records when displayed on the e9 screen and many records will be affected, the display of q8 changes was turned off with the /NOLOG qualifier.  Note 9 that when an output record length is specified, tabs are l9 converted to the appropriate number of spaces.  Since no d; DETAB qualifier and value was given, the DEC default value o of 8 will be used.    - 5 $ MODIFY/RANGE=2:10 SAMPLE.TXT "Abc" defgh n  9 		Search columns 2 through 10 of file SAMPLE.TXT for the a6 string "Abc" and replace it with the string "DEFGH".  9 Although the search string is in quotes, the case is not S; significant since the /EXACT qualifier was not specified.  t; Since the replace string was not in quotes, it would be in f: upper case in the output document even if /EXACT had been 
 specified.     6 $ MODIFY/DETAB=5 JUNK.TXTn  9 		Examine each record of JUNK.TXT for tab characters and  9 replace them with the appropriate number of spaces for a c tab length of 5.    " 7 $ MODIFY/LENGTH=64/WRAP TEST.DAT  < 		Read each record of TEST.DAT and write the output records 6 with a maximum of 64 characters/record, wrapping text ! beyond column 64 to a new record.      8 $ MODIFY/F77/LOG TEST.FOR/  4 		Read each record of TEST.FOR and convert from DEC , tab-format Fortran to standard fixed-format.