Connecting to U.S. Customs ABI, AES, and AMS with 3770Link
Communicating with U.S. Customs requires several components.
- Formatting the data.
- Adding jcl (job control language) to the beginning and end of the data set.
- Transmitting and/or receiving the data.
A separate application is required to format your data file according to U.S. Customs requirements.
For more information visit Customs Automated Manifest Interface Requirements (CAMIR).
3770Link handles the 3rd step (communications). If you already have a program that handles the first two steps or you plan on writing such a program, then you simply need to install 3770Link and add a simple script to complete your communications package.
If instead you are looking for a complete solution that includes data formatting as well as communications, we suggest contacting one of our partner companies:
These companies offer products that are bundled with 3770Link and custom scripts to provide a complete Customs solution.
Once 3770Link is installed you must configure a few options to match settings supplied to you by Customs.
Run 3770Link and go to the Configure | Physical Unit... menu. The Poll Address must be set to 01. Encoding must be set to NRZ. Device Type must be set to 017. These settings wil be the same for all customers connecting to Customs. The Station ID (IDNUM) parameter will be unique for each customer. Enter the value supplied to you by Customs.
Click here for a screen shot.
Next configure your login by going to the Configure | Logical Units... menu. The default settings are for a formatted logon and an LU number (LOCADDR) of 1. These settings should work for most customers. You must enter the values for APPLID and DATA for the login. Set the value for APPLID to JES2AS1. Leave the LOGMODE field blank. These settings will be the same for all customers. The data field follows the format RMTNNNN,,PASSWORD where you must enter the values for your remote number (NNNN) and password supplied to you by Customs. Often the remote number is supplied in the form N1RNNNN. For purposes of your login string, you will just use the last four digits.
Click here for a screen shot.
Writing a script
3770Link is designed to be very flexible. Below is a sample script that will meet the needs of most customers. The script language is well documented in the manual and help file, making it easy for users to modify any script.
; Sample script for communicating with Customs
PTR "C:\incoming\data" /s
SUBMIT "upload\*.*" /t=5
This script dials up to Customs, logs in, sets the default path and file name for incoming data (using the /s option so that incoming files are auto-numbered with the extensions .001, .002, .003, etc. to prevent accidental over-writing of files), waits to receive any files that Customs may be ready to send, sends all files in the C:\Program Files\3770Link\upload directory (deleting them after they have been sent), waits again to receive files from Customs, logs off, disconnects, then exits.
You can run your script several different ways. The most common way is to launch the 3770Link script processor with the -s switch and the name of the script you wish to run.
"C:\Program Files\3770Link\3770so.exe" -s"customs.s"
This assumes that you have stored your script in the 3770Link directory. If not, you can supply a path on the command line along with the file name. The script processor will launch, run the script, then exit. A log is generated automatically in the C:\Program Files\3770Link directory called "LU1.log" which you may view with any text editor in order to review the results of your script.
You may create a shortcut with this command line on the desktop so the user can launch the script when needed. Alternately, some customers use the built-in scheduler (or a 3rd party scheduling program) to launch this command line at certain repeated intervals.