The Script Client Interface Requirements
Installation
Windows
UNIX
Configuration
Commandline arguments
XML
Example XML file
Further information
The Upload process
The Download process
Logging
Messages
The script client is run with the operating system script startDMZInstallation
Windows
UNIX
Configuration
Commandline arguments
XML
Example XML file
Further information
The Upload process
The Download process
Logging
Messages
- startDMZ.bat for Windows
- startDMZ.sh for UNIX
All parameters are case sensitive, including their values (i.e. job names, organisation names. Use the browser to view the job/organisation etc for the exact case to use).
The return codes from the startDMZ script are as follows:
- 0 - Ok, transfer occured ok
- 1 - Nothing to do, no downloads were pending
- -1 - An error occurred (note that -1 can be represented as 255 on some systems)
startDMZ -cupload -jTest -dc:\files -lfile1.txt
if %ERRORLEVEL% EQU -1 echo "Failed with ERRORLEVEL %ERRORLEVEL%"
if %ERRORLEVEL% EQU 0 echo Ok
if %ERRORLEVEL% EQU 1 echo Nothing to do.
The commands that can be performed are:
Command parameters
- Upload
e.g. startDMZ -cupload -dc:\files\ -o"Other Organisation" -l"File1.txt File2.txt" -Lc:\upload\logs
The minimum parameters required to upload files to DMZTransfer are given below:startDMZ -cupload -j"JOB NAME" -d"DIRECTORY" -f"DATA FILE" -t"TRANSFER DATE"
e.g. startDMZ -cupload -j"My job" -d"\sourcefiles\new\" -f"list_of_filenames.txt" -t1/1/2002
e.g. startDMZ -cupload -j"JOB NAME" -d"DIRECTORY" -l"FILE1 FILE2 FILEn" -t"TRANSFER DATE"
e.g. startDMZ -cupload -j"My job" -d"\sourcefiles\new\" -f"file1.dat file2.dat" -t1/1/2002
where
- JOB NAME - The name of the Job to upload to.
- DIRECTORY - The source directory of the files to upload.
- TRANSFER DATE - The transfer date for this upload to apply.
It is in the format DD/MM/YYYY [HH:MI:SS]. Note 24 hour clock
- DATA FILE - A file containing the list of files to upload.
Each file is listed on a new line.
Do not specify directory information here.
- FILE1..FILEn - The list of individual files to be uploaded.
These files can be entered directly on the command line.
Do not specify directory information here.
- JOB NAME - The name of the Job to upload to.
-
Download
startDMZ -cdownload -j"JOB NAME" -t"TRANSFER DATE" -o"ORGANISATION" [-d"DIRECTORY"] [-pending] [-keeppath]
e.g. startDMZ -cdownload -j"Someone elses job" -d"\downloadfiles\new\" -t1/1/2002 -pending
where
-
JOB NAME - The name of the Job to download. This corresponds to the "Job Name" of the job created in the Job Maintenance window. Note: the "Job Name" is case sensitive.
-
TRANSFER DATE - The target transfer date for this download. It is in the format DD/MM/YYYY [HH:MI:SS]. Use 24 hour clock. If no date is specified, then the next transfer schedule from the current date and time is used. If a transfer date is specified, then the next transfer due from this date is chosen. If the time part is not specified in the transfer date, then it defaults to 00:00:00.
-
ORGANISATION - The organisation that uploaded the file. Note: The organisation name must match exactly the name entered when the organisation was created.
-
DIRECTORY - The destination directory of the files.
If this is not specifed, the destination directory
specifed when the job was created will be used.
-
PENDING - Only download a transfer which has download pending status
set for this transfer. Transfers which have been downloaded
previously will be ignored.
-
DIRECTORY The destination directory for the files. If this is not specified, the destination directory parameter specified when the job was created will be used. For example -d"C:\Temp\"
-
JOB NAME - The name of the Job to download. This corresponds to the "Job Name" of the job created in the Job Maintenance window. Note: the "Job Name" is case sensitive.
- XML
XML allows the batching of uploads and downloads and so requires only a single call to startDMZ to run a full batch of commands. This has performance benefits by reusing connections between the many uploads and downloads in the batch and requiring Java to start only once. See the XML section for more information.
e.g. startDMZ -cxml -xc:\xmlfiles\myuploads_and_downloads.xml - config
e.g. startDMZ -cconfig
Additionally, you can reconfigure only parts of the configuration. These are:- user to configure the user authentication parameters e.g. startDMZ -cconfig -Tuser
- con to configure the connection parameters e.g. startDMZ -cconfig -Tcon
- all to configure all the parameters. This is the same as not specifying -T e.g. startDMZ -cconfig -Tall
Other parameters
- Job name
The name of the Job which you are using. If you are uploading, then this is your job that you are uploading to. If you are download, then this is the sending organisation's job that you can download from.
Note: This and all parameters are case sensitive.
- Directory
The directory to store or find files. For uploads, this is the directory where files are to be found. For downloads, this is the location where to store the files.
- Date Time Optional.
The date and time used to search for the next transfer. It is in the format DD/MM/YYYY [HH:MI:SS]. Note 24-hour clock.
If no date is specified, then the next transfer due after the current date and time is used. If a transfer date is specified, then the next transfer due from that date is chosen.
If the time part is not specified in the transfer date, then it defaults to 00:00:00.
Note: if the job is set up as an Adhoc job type then the transfer date is ignored and the current time is used.
File parameters
- Files listed in another file-f[Data file]
A file containing the names of files to be uploaded. Each name listed within the file must be on a new line. When specified, the value for directory (-d) is prepended to the each file name to find the file.
- StartDMZ.sh -cupload -j"MyJob" -d"C:\Temp" -f"c:\data\dataFile.txt"
where dataFile.txt contains the following lines:
myfile1.txt
myfile2.txt
- Files listed-l[File1 File2 FileN]
Individual file names for files to be uploaded. These files can be entered directly on the command line and are found by prepending the directory path (-d).
- Other Organisation -o[Other Organisation]
The name of other organisation participating in the transfer. Remember to quote any names that contain spaces and not to include spaces between -o and the organisation name.
- Number of retries -r[Number of Retries]
The script client can attempt to retry failed transfers. Use this parameter to specify more than one attempt at each transfer.
- Retry interval-i[Retry Interval]
The time (in seconds) to wait between retries. - -iRetriesInterval Specifies the interval in minutes between the retries.
- Log directory-L[Directory to log to] The directory to place the log files.
- -L"LOG Directory" Specifies the directory to place the log files and packing slip.
Download specific parameters
- Keep path-keeppath, for downloads only
Indicates that downloads should add the path supplied by the uploader when writing the downloaded file to the filesystem. The directory for download is concatenated with the uploaders parameter to get the actual path for the saved file.
- Pending-pending, for downloads only
Indicates that only downloads that have yet to be succesfully download will be attempted. Those that are already downloaded will not be downloaded again.
XML specify parameters
- XML file-x[xml file.xml]
Location of the XML file.