EDI Lock File Control

When two separate software packages transmit data via EDI, their transmission processes must not concurrently access the same data files. For example, synchronization problems occur if CloudSuite Industrial EDI writes data to a flat file and the translator attempts to read the flat file at the same time. The system uses a lock mechanism to handle this problem.

When EDI needs to write information to a flat file, it first checks to see if a lock file exists.

Lock File Filenames

If you are using a translator other than those listed in About EDI Translators, you must make sure the translator checks for and creates the lock file. This section lists the lock file filenames you must use with your translator. Create the appropriate lock file when writing to or reading from the flat file.

The following table lists the name of the lock file for each transaction for supply-side EDI. Supply-side lock files reside in the supply-side Outbound Data Logical Folder.

TRANSACTION X12 / EDIFACT LOCK FILENAME
Outbound Planning Schedules 830 / DELFOR 830_LOCK
Outbound Purchase Orders 850 / ORDERS 850_LOCK
Outbound Shipping Schedules 862 / DELJIT 862_LOCK
Inbound PO Acknowledgment 855 / ORDRSP 855_LOCK
Inbound Vendor Advanced Ship Notice 856 / DESADV 856_LOCK
Inbound Vendor Invoice 810 / INVOIC 810_LOCK

The following table lists the name of the Lock file for each transaction for Demand-side EDI. Demand-side lock files reside in the demand-side Outbound Data Logical Folder.

TRANSACTION X12 / EDIFACT LOCK FILENAME
Inbound CARaS EDI Ship Transactions N/A SHP_LOCK
Inbound Planning and Shipping Schedules 830 / DELFOR & 862 / DELJIT REQ_LOCK
Inbound Purchase Orders 850 / ORDERS ORD_LOCK
Outbound PO Acknowledgment 855 / ORDRSP ACK_LOCK
Outbound Advanced Ship Notice 856 / DESADV ASN_LOCK
Outbound Customer Invoice 810 / INVOIC INV_LOCK

Lock File/Flat File Processing Logic

This section describes how EDI processes flat files. Your translator software should use the same logic.

EDI performs these steps when writing data to the flat files, in this order:

  • Checks to see if the lock file is present in the Outbound Data Logical Folder.
  • Creates the lock file.
  • Outputs the transactions to the data file (appends if it already exists).
  • Copies the data file to the Outbound Archive Logical Folder.
  • Removes the lock file.

EDI performs these steps when reading data from the flat files, in this order:

  • Checks to see if the lock file is present in the Outbound Data Logical Folder.
  • Creates the lock file.
  • Reads the transactions from the data file.
  • Copies the data file to the archive logical folder.
  • Removes the lock file.
Related topics