Changing Imported Fields

Sometimes the source data in your ACL project may change, or you may realize that a field is missing, or imported incorrectly. One’s natural inclination might be to re-import the data file into ACL through the import wizard. While this approach will certainly work, it can be performed more efficiently by modifying the import from your log.   The steps below summarize how to find your import command in your log and how to modify the command, depending on what you need to change. The field length, type, and name can easily be modified without using the wizard to re-import and define your data file.

  1. Select the log tab on the bottom of the Project Navigation Pane.

Number 1

  1. Find your IMPORT command that you would like to modify. If you do not see it in the project navigator pane, use the search/find to find your most recent or first IMPORT in your log.
  1. To search in the log, right click from within the log and select ‘Find’ (or type CTRL+F).

Number 3

  1. Enter the main word that you would like to find in the log, such as IMPORT or the source file name. Remember, ACL defaults to search up, so if you are at the top of your log change the direction to “down”.

Number 4

  1. Once you have found your import command save it to a script by checking the box next to the IMPORT command, right click and select save selected items, and select script. After saving the import command to a script, uncheck the box next to the IMPORT command.

Number 5

    1. Open the new script and modify the IMPORT command by identifying the field that you would like to modify.
  • To change the field length: change the width number after the WID parameter to the desired length.
  • To change the field type: change the letter after the field name to “C” for character, “D” for date/time, or “N” for numeric. For Date/time fields, you also need to provide the display format (e.g. PIC “YYYY-MM-DD”). For Numeric fields, you need to provide the number of decimals (e.g. DEC 2).
  • To change the source field name, change the field name within the double quotes directly after the FIELD parameter. To change the display of the field name within your table, add the desired name within the double quotes after the AS parameter.

In this example, we want to modify the “Work Dept” field to a length of 5.

Number 6

Number 6.2

NOTE: If you need to keep your old data table, be sure to change the table name in your modified IMPORT command (by modifying the table display name and table file name within the double quotes after the TO parameter).

Bonus Tip: If you ever realize that you do not want to exclude a field in your ACL import, simply put IGNORE and the column number where the field occurs.

  1. After you have made all the desired changes to the new import script click run to re-import your data file.