Warning: This utility contains options capable of modifying Sage MAS 90 data files. There is no audit trail for records modified or deleted in DFDM. Back up all files being modified before using the program.
Note: This article was written for Sage MAS 90 and 200 version 3.xx. Some of the steps below may vary for version 4.xx.
The DFDM utility is a multi-purpose file analysis and maintenance tool to access and examine the contents of Sage MAS 90 data files. This utility can be used to modify or remove data records.
To access this program, select Data File Display and Maintenance from the Repair menu.
How to display record information:
The record display includes several pieces of useful information. In addition to the file name, the key size, record size, number of records, and record type are shown in their corresponding fields.
At the top of the record information area, the Key line shows the key of the currently-displayed record.
The vertical column of numbers along the left side is the Variable Index. Each number in this index corresponds to a specific data field within the record. Data fields exceeding 74 characters wrap on to any subsequent lines. The index numbers corresponding to these are followed by a colon (:).
The numbered grid spanning the top of the display allows you measure the number of bytes contained within the data field. (Each character constitutes one byte.) For example, if the right bracket (]) is situated beneath the - - - 6 - - - section of the grid, the field size is 60 bytes.
Several options are available when viewing record information:
•Click the right-arrow navigation button to view records one at a time beginning with the first record in the file. Click the left-arrow button to go back through each record, or navigate directly to the first or last record.
•To display information for records starting with a specific key value, enter an alphanumeric value in the Key field, and press ENTER. For example, type A to shows the information for the first record beginning with the letter A.
Note: Information entered in the Key field is case-sensitive.
•Click the Key Scan button to display a list of records. Click the Search button to enter a starting key. Enter the alphanumeric value corresponding to the appropriate record. For details, see the How to display record information section above.
•Click the Edit button to modify the data content of the record. For instructions to modify a record, see the How to modify data records section below.
•Click the Delete button to remove the on-screen record from the file. For instructions, see How to modify data records section below.
Note: The Delete button is disabled when viewing an Index type data file.
•Click the Printer button to open the Print window.
•In the Print Option list, click Print Records or Print Keys.
•De-select the All check box to define the range of records or keys to print.
How to display a data file:
1.Click the Folder button to select a file, or enter the name in the File Name field, and press ENTER.
◦The first two characters of the path represent the application code; the final three characters represent the company code. For example, enter GLABC to display General Ledger files for company ABC. Enter GL0ABC to display GL0 file for company ABC.
◦For a list of Sage MAS 90 data file names, refer to Data File Names and Keys in the TRSG.
◦After the file name is entered, its specifications display.
3.Click the arrow buttons to navigate through the records.
4.In the Key field, enter a key expression, and press ENTER to view the first record beginning with that expression. For example, type A to display the information for the first record beginning with the letter A. For details, see the How to display record information section above.
5.Click the Key Scan button to display only key information for the selected file. This option is useful for quickly checking the contents of a file without looking at the individual data values for each record. For details, see the How to display record information section of this article.
Note: Only direct files, sort files, and Mkeyed files use keys. The Key Scan button does not display indexed files.
How to display key information:
1.Click the right-arrow button to display the key information from the first record in the file.
2.To display key information for records starting with a specific key value, click the Key Scan button, click the Search button, and then enter an alphanumeric value in the Enter Starting Key field.
Note: Information entered in the Key field is case-sensitive.
3.Click OK to display records with that key value in the Key Scan window. The maximum number of characters is based on the defined key size for the file. For example, enter A to display the key information for the first record beginning with the letter A. The key information for each record in the file is displayed.
4.Scroll through the list, or press PAGE DOWN key to view additional key values.
5.Click the Search button again to display records starting with another specific key value.
6.Double-click the record in the Key Scan list to be viewed (or highlight it, and click the Select button or press ENTER) to display its information in the DFDM window.
7.Click the Printer button on the DFDM window to print a Data File Listing with either record information or key information. For more information on the data record display and modification process, see the How to display record information section above.
How to modify data records:
A powerful feature of DFDM allows you to modify the content of numeric or string data records. Using any combination of the modification options provided, users are not restricted to simply replacing the contents of a data field. You may also increase or decrease the field length, delete the contents of fields, or change alpha fields to numeric fields and change numeric fields to alpha fields.
Warning: The modification feature should be used only to repair records damaged by hardware or software errors. This feature should not be used to tamper with data processed using standard procedures. The system records no audit trail when modifying data in this manner.
1.In the DFDM window, click the Edit button.
2.In the Field Number field, enter the variable index (for example, 01 - 99) corresponding to the data field to be modified. For most files, the first variable (index=1) is the string variable for the record followed by several numeric variables (index=2...99).
3.Enter a variable index for a string field or a numeric field, and press ENTER. When entering a variable for a numeric field, the contents of that field display. When entering a variable index for a string variable, the Starting Position and Length fields are activated.
How to search for data by string position:
The File Layout section of the Appendix lists the field positions of all files associated with Sage MAS 90, so you can modify the exact data field position.
•In the Starting Position field, enter a one-, two-, or three-digit number representing the first string position for the field to be modified.
•In the Length field, enter a one- or two-digit number representing the string length of the field to be modified.
How to search for data by specific characters:
1.Click the Match Field button to open the Edit window with different controls available. The Match String button label toggles with the Position button. In the Field Number text box, enter the variable index (for example, 01 - 99) corresponding to the data field to be maintained. However, you cannot enter match string data in a numeric field. In the Match String field, type the characters matching the data you wish to replace. The specific string of characters entered will be duplicated in the Old Data field. Information entered in the Match String field is case-sensitive.
If you are accessing and modifying an existing string or numeric field, and if you have entered the match string or starting position, the current data value for the specified string will be displayed in the Change field.
2.Click the OK button to retain the current data.
3.To modify the existing match string, simply type the replacement data in the already highlighted change field, press ENTER, and then click OK.
Note: Make certain the match string entered is at least as long as the replacement string.
4.When editing an existing record key, a new data record is created. Refer to the File Layout section of the Appendix to determine which fields are part of the record key. Whenever a record key is modified, the message "Remove the Old Key?" occurs.
◦Click Yes to remove the old record key.
◦Click No to retain the data record as a backup under the original key as well as create a new record under the new key. This feature provides a simple method of record duplication.
5.To display or edit additional record data, repeat the above steps as necessary. Click anywhere within the File Name field in the DFDM window to clear the data and reset the window for the next operation.
6.When you have completed the modifications, additions, or deletions, the changes are saved automatically when clicking OK button in the Edit window.
How to change the length of a string data field:
In some situations, modifying the content of a data field may necessitate increasing or decreasing the length of the data field itself. After selecting the variable index corresponding to the string data field to be maintained, you may begin the data field expansion process from the Starting Position field.
How to increase the length of a string data field:
1.Enter a two-digit string position in the Starting Position field and a two-digit number representing the length of the data string in the Length field. If the numeric value of the position plus the value of the field length exceed the current length of the string, you'll be prompted to expand the field length.
2.Click Yes to increase the field size. Click No to retain the original size. When clicking Yes to the Expand message, the Edit window displays with the Change field information highlighted.
3.Enter the new information, or click OK to leave it blank.
Note: This procedure only increases the length of the single record being modified, not all records in the data file.
How to decrease the length of a string field:
1.If you wish to decrease the length of an existing string, type 0 in the Starting Position field and a numeric value for the new length in the Length field. You'll be prompted to shrink the field length.
2.Click Yes to decrease the field size. Click No to retain the original size. Upon clicking Yes at the Shrink prompt, the Edit screen appears with the Change field information highlighted. To enter data into the new string position, see step 2 of How to modify data records section above.
Note: This procedure only reduces the length of the single record being modified, not all records in the data file.
Converting Types
In some situations, modifying the content of a data field may necessitate changing the field type. A numeric field may need to be converted to a string field due to data corruption or a damaged file.
How to convert a numeric string to a field:
Convert a numeric field to a string field by first selecting the variable index corresponding to the numeric data field.
1.Click the Edit button in the DFDM utility to open the Edit window.
2.Enter the index variable in the Field Number field for the numeric field to be converted.
3.Enter the alphanumeric data in the Change field, and click OK.
4.Select Yes when the message "Do You Wish To Change This To An Alpha Field?" occurs. Select No to cancel this operation and return to the DFDM Edit window.
5.Additionally, alpha fields may be converted to numeric fields. This process begins by shrinking the field to the size of the numeric replacement data. Following the data modification procedure, enter the numeric replacement data; the field will be automatically converted.
How to convert a field string to a numeric string:
1.Click the Edit button in the DFDM window.
2.In the Edit window, enter the index variable for string field to be converted.
◦Type 0 in the Starting Position field.
◦Type 1 in the Length field.
3.Select Yes when the message "Shrink Field Length" occurs. Enter 0 in the Change field.
4.Click OK.
How to search for data by match string:
1.If you know the data to be modified but not the exact string position, click the Match String button in the Edit window.
2.In the Field Number field, enter the variable index (usually 1) for the string field to be modified.
3.In the Match String field, enter the exact data string to be modified (for example, 01AVNET 0000102IN). If the string entered is not exact (case-sensitive, matching spaces), the message "Match String Not Found" occurs, and the data must be reentered.
How to delete data records:
Data records may become damaged by power interruptions, defective disks, and so on. These records may need to be removed from the database.
Warning: Removing records from a file may result in an "out of balance" condition in your accounting data. File removal may also leave detail records in subsidiary files without corresponding masterfile records (for example, invoices in the Open Invoice file with no corresponding customer in the Customer Masterfile).
1.With the record displayed in the DFDM window, click the Delete button to begin deleting the record, and a confirmation message displays.
2.Click Yes to delete the record, or click No to retain the record.
How to recognize damaged records:
The most important function of DFDM is to determine which record within a data file is damaged. After a damaged record is identified, selecting the appropriate corrective action becomes straightforward.
To determine if a particular record is damaged, review the following:
1.For direct files, always verify that the key information displayed matches the data information displayed. The information labeled KEY= and enclosed by brackets ([ ]) should exactly match the information displayed on the first data line. A mismatch indicates that either the directory of the file has become damaged, or the key portion of the data record has been damaged. If the key displayed is not identical to the data record displayed, use the Rebuild Key Files utility to rebuild the file directory. If the key portion of the data record appears damaged, click the Edit button in the DFDM window to enter the correct key information. For details on the data fields that constitute the key, refer to File Names and Keys in the Appendix. If the number of numeric variables in the record differs from those in the file layout lists, the variable indexes cannot be deleted or added. The entire record must be deleted then reentered.
2.Check for invalid characters appearing in the data fields. Non-standard ASCII characters will appear as question marks. If any question marks are displayed within a data record, this usually indicates that the record has been damaged. A damaged data field may be corrected in the Edit window. You may also delete the entire record. See step 3 for instructions to correct damaged data fields.
Note: A single question mark does not necessarily constitute damaged data. Date fields may contain legitimate question marks as part of the year data. However, if the question mark represents anything other than an unprintable character in a date field or binary data field, it is an indication that the record is probably damaged. For an explanation of how dates are stored, see step 4.
3.Review each data field within a record to ensure that data appropriate to the field is displayed. Refer to File Layouts in the Appendix to determine the starting position and length of each data field. Make sure all numeric fields are displayed as numbers. Numeric fields must not contain strings. Numeric fields are always displayed as a separate variable with a mask showing two or more decimal places. Click the Edit button in the DFDM utility to enter the proper data for the damaged field.
4.Date fields cannot be easily verified since year information is stored in a special compacted form. The format of the date fields are YYMMDD, where YY is a compacted representation of the four-digit year, MM is the two-digit month, and DD is the two-digit date. For example, the date 05/31/99 is stored as ?&0531 where ?& represents 1999. When interpreting or modifying a date field, refer to the Compacted Date Table for character values of commonly-used years.