Don't get lost: Training » Sage 300 Training Manual » Step 12 – Advanced File Archiving

Step 12 – Advanced File Archiving

IMan provides sophisticated, almost transactional control of file operations. This step will show how to use the File Task to move only those files which have been processed.

SYS.INPUTFILE

On any File Reader (CSV, XML, Excel & Fixed Width Text), there is an additional field added to the dataset containing the full File Path of the File(s).

The File Task can reference this SYS.INPUTFILE field to move specific files.

Actions the File task can do using the SYS.INPUTFILE field:

  • Move the Orders file from the Archive directory to its parent directory.
  1. Open the Sage300 Order Import connector.

  1. Go to the fields mapping tab, and click the edit button.

  1. As per the discussion for Using the Log Key for Unmapped Fields
    • Set the log key for the SYS.INPUTFILE to 20.

  1. Save the Grid and Close.
  2. Re-open the File Task.

  1. Clear the Source Directory field.
  2. Set the Source File to:
    • %[OE0520.SYS.INPUTFILE]

The Field must be fully referenced to include both the Transaction Id as well as the field name.

  1. Press Refresh.
    • The file will now be moved to the Archive directory.
    • This has the same effect as the previous ‘simple’ example but in a high volume environment this will now only move files which have been processed, since only processed files can be referenced by this field.
  2. Press Apply to save and then close.
  1. Save the integration.
  2. Run the integration in total from the Scheduler.
    • Just remember to move the file from the Archive folder back to the original folder first!