How to perform file Import/Export function using Batch Processing

By | October 28, 2020

Batch processing is a method of queued up transaction executed without manual intervention on the regular interval.

The batch server is a background process that launches programs or system commands. A queue of tasks is processed by the server, executing and logging the results of each task.

we come across the scenario where file based import and export function to be performed for transferring data between x3, the process can be automated through user-defined time scheduling of batch jobs.

How to add export batch task to the batch server queue:

STEP 1: Navigate to Usage > Batch server > Query management.

STEP 2: Click on Query.

STEP 3: Task code, Enter Export.

STEP 4: Click on Validation.

STEP 5: Enter your template in the Template field

STEP 6: Select Server as the Location. Batch processes do not use client files.

STEP 7: Exports-Enter a Data file name or select one using the lookup button. The name needs to be a storage volume followed by a file name, e.g. [TMP]/SOHFILE.csv

STEP 8: Exports-Range and Criteria fields used to filter the data to be exported.

Once the status of the Export task is finished, you can select Log from the action button’s menu on the row of batch task.

Create recurring batch task for export batch task

STEP 1: Navigate to Usage > Batch server > Recurring task management.

STEP 2: Click New.

STEP 3: Enter a Recurring task code and Description.

STEP 4: For the Task code EXPORT/IMPORT.

STEP 5: Select a Periodicity. Choose either Weekly or Monthly and select or enter the days the job should run.

STEP 6: Enter a Time Range or one to three Fixed times to run the job each scheduled day.

STEP 7: Click Create.

STEP 8: Click Parameters.

STEP 9: Enter your template in the Template field

STEP 10: Select Server as the Location. Batch processes do not use client files.

STEP 11: Enter a Data file name or select one using the lookup button. The name needs to be a storage volume followed by a file name, e.g. [TMP]/ SOHFILE.csv

STEP 12: Range and Criteria fields are available to filter the data to be exported.

STEP 13: Click OK.

STEP 14: Select ACTIVE button and click on save button.

Task code-EXPORT

        A standard task called ‘EXPORT’, which runs the batch export function BATCHEXP. A standard task called ‘IMPORT’, which runs the batch export function BATCHIMP.Set up a recurring task with EXPORT or IMPORT as the task code, X3 will ask you to enter parameters, which will include the template to use.

How to add Import batch task to the batch server queue:

STEP 1: Navigate to Usage > Batch server > Query management.

STEP 2: Click on Query.

STEP 3: Task code, Enter Import.

STEP 4: Click on Validation.

STEP 5: Enter your template in the Template field

STEP 6: Select Server as the Location. Batch processes do not use client files.

STEP 7: Select the Location of file to be imported.

STEP 8: Click OK.

Click on Log, if import task status completed successfully.

This blog helps us to understand what is batch task and how to perform import/export using batch processing and create recurring task for import/export batch task.