Miscellaneous Utility Programs
Finding Control Characters in Files
You may occasionally find control characters in your data files that are unprintable. Control characters are pieces of information your system cannot interpret.
The presence of control characters in data files can be identified by several symptoms. The most common symptoms are hardware disk errors, programs or reports executing incorrectly, and aborted file copies.
Although there are several factors that cause control characters in files, the most common are inadequate electrical power, poor system maintenance, and rebooting the (text-based) system without using the [E6] System shutdown function in the (Z) System Utilities screen.
The ;SPCFINDBN and ;SPCFINDBU programs are designed to locate control characters in data files.
The ;SPCFINDBN Program
The ;SPCFINDBN program searches a single file for control characters.
Note: You must run the ;UTLCLEAN program for all files where control characters are found. For instructions on performing the ;UTLCLEAN program, go to Running Diagnostic Programs.
Double-click
.
When the Keyop Menu opens, double-click
. The (Z) screen opens.
In the Enter Utility Type field, type B. In the Enter Subset Number field, type 4.
At the Enter File Name field, type ;SPCFINDBN and press Tab.
In the Enter Unit # field, type 04.
The cursor moves to the Enter File To Check field. Enter the name of the file for which to search for control characters.
Press Tab to move to the Unit Number field and enter the number of the unit where the file is located.
The Enter Starting Record prompt appears. Press Enter to accept the default of 1.
The Do You Wish to Log Binary Records to a File prompt appears. Type N. The system begins searching the file for control characters.
If the system finds a control character, the Current Record Number prompt appears. The cursor appears in the Delete This Record field. Type N. If another line or file has control characters, the system displays the next line that has control characters, the byte at which the control characters are located, and the value of the control character. The cursor remains in the Delete This Record field.
If the system does not find a control character, the Current Record Number message appears. When the program is finished, or when you specify N in the Delete This Record field for the last control character, the End of File message appears.
To return to the Enter File to Check field, press Enter. You can search another file by entering the name of the next file to search in this field.
The ;SPCFINDBU Program
The ;SPCFINDBU program searches for control characters in one or all of the files on a disk unit.
Note: You must run the ;UTLCLEAN program for all files where control characters are found. For instructions on performing the ;UTLCLEAN program, go to Running Diagnostic Programs.
Double-click
.
When the Keyop Menu opens, double-click
. The (Z) screen opens.
In the Enter Utility Type field, type B. In the Enter Subset Number field, type 4.
At the Enter File Name field, type ;SPCFINDBU and press Tab.
In the Enter Unit # field, type 04.
The cursor moves to the Enter Files to Check field. To search a single file for control characters, enter the name of the file.
Press Tab to move to the Unit Number field and enter the number of the unit where the file is located.
To search an entire unit for control characters, press Tab. In the Unit Number field, enter the unit number to search.
To search all files in a specific database, use the wild card function. To do so, enter the first character or the first few characters of a filename followed by question marks (?) in the Enter Files to Check field. For example, to search all the files in the customer database, enter C-??????. The system searches all files that begin with C-.
The Send Results to Printer prompt appears. To print the results, type Y. The system displays the Enter Printer to Use prompt. Press Enter to print the report on the default printer, P1, or enter the logical name of another printer.
To skip printing the results, type N. The system displays the results on the terminal.
The system begins searching the specified files and the Searching for Binaries Record Number prompt appears.
If a control character is found, the system stops the search in that particular file and begins searching the next file, if any. When the program is finished, the cursor returns to the Enter File Name prompt.