<< Click to Display Table of Contents >>
Submitting SUBMIT files
When using the ZSUBMIT program, files in SUBMIT file format may be submitted by simply copying them to a file in the specified directory with the extension ".SUB". If the file contains more than one "%%[MESSAGE]" section (i.e. contains more than one message to be sent) then it is first split up by the program into separate message files in the polling directory, named ~ZSUBnnn.SUB, where "nnn" is a unique number for each file. Each file is then interpreted separately and submitted to the server for sending.
Syntax errors
If an error is found in the format of one of the files (e.g. an invalid or missing line in the message options), an error message is logged giving the problem and file name, and the file extension is changed to ".ERR"; otherwise the file is deleted once it has been separated (in the case of multiple message files) or submitted successfully. This directory should be checked if submit errors occur to identify the problem then delete the ".ERR" file - performance of the program will be affected if the number of files in the directory is allowed to become very large.
Automatic deletion
ZSUBMIT deletes SUBMIT files automatically once they have been processed and submitted to the Zetafax server. It will also delete matching files with extensions .001, .002 etc., continuing until it does not find the next file in sequence. This makes it simple to submit messages comprising multiple files, without having to tidy up manually.
Conversely, if a file is used by more than one SUBMIT file, it should not be given an extension of .001.
File creation
It is important to ensure that the submit file is complete (and any files it references exist), from the moment when the ZSUBMIT program might try and read it.
The ZSUBMIT program will behave correctly if the .SUB file is locked, retrying until it can access the file; however this can still give inaccurate results with some applications. With some programs, the file can be accessed and is "readable" even while it is being created, whilst others can create a zero length file first before reopening it to write the data. The symptom is occasional failures when ZSUBMIT tries to read the file at the precise moment it is being created.
The best and recommended approach is to create the file with a different extension e.g. .NEW and rename it to .SUB only when it is complete.