Dec 312017
Applications notes for use of Zmodem to split long files in download time limit situations - useful.
File DSZOP3.ZIP from The Programmer’s Corner in
Category Communications
Applications notes for use of Zmodem to split long files in download time limit situations – useful.
File Name File Size Zip Size Zip Type
DSZOPT.TXT 12739 4315 deflated
DSZSTDAL.ONE 9094 3816 deflated

Download File DSZOP3.ZIP Here

Contents of the DSZOPT.TXT file

Dsz documentation is obscure ( although it may be that registered users have
more complete documentation ). Because it is obscure, normal users have
difficulty using this program and can't make full use of it.
The following are some Dsz features which I've managed to understand more
or less.
The version of Dsz which I had been using is 15-Oct-1987.
Zmodem 'Crash recovery'
Explanation : for example, let's imagine that you're in the middle of the
downloading of a 200 K file. For some reason, you fall asleep, or, tired of
waiting you go out to make a cup of coffee, your child comes and type
at the keyboard an Alt-N, or your wife yells at you and disconnect the phone.
Horror, you've got only the first 190 K's. Should you call back your favorite
BBS and start again the downloading from 0 ? What a waste... but, didn't
you know that Dsz have 'Crash recovery' feature : it allows to resume the
download at the point where it was aborted priorly. Only the last missing
10 K's will be downloaded to complete the 200 K file.
The problem, you ask yourself, how can I exploit this 'Crash Recovery'.
- First : no panic, you can make the 'Crash recovery' at any time you want,
say, tomorrow when your child is at school and your wife is at the market.
- Second, don't touch the truncated file which you've already received.
( You can see that it is incomplete by typing at DOS prompt DIR :
the truncated file has no date on it ).
If you want to check if it is workable with the missing part, copy it to
another directory and work on the copy.
- Third, make sure that it is in your usual downloading directory.
- Fourth, log back onto your BBS. Proceed normaly.
For example, on this Opus BBS, at the File section, enter :
d z filewant.big
where 'd' is the normal Opus download request, 'z' is Zmodem protocol, and
'filewant.big' is the file which download was aborted priorly.
( That's a nicety on Opus that successive commands can be put on a single
line, instead of waiting each time for a prompt ).
- Fifth, from your comms program, make a shell to DOS. Now, that's here
where 'Crash recovery' will be possible. Instead of typing the normal
'dsz rz', enter :
dsz rz -r
That's all, Dsz will do the rest. Ouf !
With the '-r' option, Dsz automatically check the current directory for
'filewant.big'. If size doesn't match what Opus is sending, Dsz request
that Opus send only the missing part and appends it to the file.
Since the day I've learned this 'Crash recovery' possibility, I've made
systematic use of it. Now, I voluntarily abort huge file downloading,
I take a look at the firsts K's to check if I'll want to complete the
downloading or no.
Timing options
When using Dsz, it may be that you see a lot of 'Time-out', or it may be
that the performance of Zmodem file transfer seems bad. ( Performance is
bad if at 1200 bauds you get less than 105 char/sec throughput ).
The cause may be that your PC is a too fast clone ! Too fast, the protocol
'time-out', and request retransmission of a packet, which in fact is
already on the way, at times the same packet is sent over and over even if
there's no error.
Make a rough check whether your system require timing change or not. Type :
dsz d rz
( The 'd' allows to make timing test without being on-line ).
After about 10 seconds, you should see the message :
Byte -1 retry 0: TIMEOUT
Then after another 10 secs :
Byte -1 retry 1: TIMEOUT
If the time between the TIMEOUTs is less than 10 seconds, your system is
probably too fast. To make Dsz timing changes, you may try one or more
combination of the following :
dsz pa10000 d rz { change the "global" timing 'a' parameter }
dsz z pp500 d rz { change the "in-packet" Zmodem time-out }
dsz z pt1000 d rz { change the "receiving" Zmodem time-out }
dsz z pT4000 d rz { chnage the "sending" Zmodem time-out }
Or you may combine all :
dsz pa10000 z pp500 pt1000 pT4000 d rz
( All cases are significant, options must be separated by spaces, and
after a 'z' option, all 'p' are related to the 'z' option. Typing
"dsz pa3000 z pp100 pt400 d rz" is correct, but
"dsz z pp100 pt400 pa3000 d rz" is not ).
Try until you find some correct 'pa', 'z pp', 'z pt', 'z pT' values.
Hints to facilitate the search of good timing parameters.
- For downloading, it is sufficient to change only the 'z pt' parameter.
- Start with a big 'z pt' value. With your watch, take note of the time
between the TIMEOUTs messages. Divide this time by 10. With the divisor
you've calculated, divide your initial 'z pt' value.
Example : Suppose that after you type "dsz z pt2000 d rz" you get a timing
of 120 seconds between two succesive TIMEOUT. 120 divided by 10 gives 12.
2000 divided by 12 gives approximately 167. Try then with "dsz z pt167 d rz".
Once you have find, you should write a batch file which makes the timing
settings each time Dsz is called ( otherwise each time Dsz reverts to its
default settings ) . For example DSZ.BAT :
echo off
dsz pa6000 z pt167 %1 %2 %3 %4 %5 %6 %7 %8 %9
In case you use an RZ.BAT batch file which contained :
dsz rz %1 %2 %3
Change it to :
dsz pa6000 z pt167 rz %1 %2 %3
Note that timing options are different from file transfer options.
Timing parameters, just as 'CON' or 'port' or 'speed' options described in
DSZ.DOC must precede 'rz', while the "Crash recovery" '-r' option must
follow 'rz'.
An overview about Dsz options
It is easy to understand if you consider that Dsz requires 3 groups of options:
- The first group are those related to the system on which you run Dsz,
such as timings, which port your modem is connected, etc. With the 'pa',
'z pt', 'CON' etc, you tell the configuration to Dsz.
- The second group specifies what you want to be done with Dsz :
send or receive, and which protocol you request ( X, Y or Z-modem ).
- The third group of option is dependent on the transfer protocol you have
requested. You tell what kind of modification to the protocol you want.
Thus '-r' Crash recovery is specific to Zmodem. Filenames may or may not be
needed, depending on the transfer protocol requested.
You can mix as many options as you want. The only important requirement is
that the order should be consistent : the options are context-dependent.
Thus if you want only to have a look at the default 'p' parameters, enter :
dsz p
Or you want to look at the default 'z p' parameters, enter :
dsz z p
Or you want to look at 'p' and 'z p' together, enter :
dsz p z p
Or if you want to make a Zmodem download with full debugging report, with
modem connected to COM2 at 2400 bauds and on a system which require timing
fine tuning, the command may be :
dsz CON port 2 speed 2400 pa7300 pv9 z pt92 pT1200 rz
| |
( 'pv9' means Verbose Level 9 - must not follow a 'z' ).
You can put more configuration option between the 'dsz' and 'rz', for
example you may insert a 'd' to test off-line, and you may insert lone 'p'
to view that the 'pa' is indeed changed to 7300 :
dsz CON port 2 speed 2400 pa7300 pv9 p z pt92 pT1200 p d rz
| |
The first lonely 'p' prints out a list of the 'p' parameters settings.
The second lonely 'p', since it follows a previous 'z', it prints out a list
of the 'z p' parameters settings.
Following is a summary table of Dsz options. A table is convenient to test
possibilities in case you need it. More detailed explanations would require
the manual, I'm waiting for my registration...
---------------------- ---------------- ---------------
Configuration settings Transfer request Protocol option
---------------------- ---------------- ---------------
CON rz {receive Zmodem} [-abnpr+y] [filename]
LARG sz {send Zmodem} [-abnpr+y] wildcard
port # rx {receive Xmodem} [-abc+y] filename
speed # sx {send Xmodem} [-k] filename
d rb {receive Ymodem} [-ab+y] [filename]
handshake sb {send Ymodem} [-k] wildcard
z p?#
---------------------- ----------------- ---------------
Where # is a number, It should be obvious -a would mean translate
? is a letter. rz sz rx sx ... the end of line (no need
Any mixing of the may not be mixed to worry what EOL is on
above is valid each system: with the -a
option, Zmodem manages
itself the translation
so that it suits the
system, Unix| DOS| CPM)
-b binary transfer (it
is the default)
-r Crash recovery (dont
mix with -a option !)
-k use 1K blocks
-c use CRC
-+ append to existing
-n replace destination
file if source file is
-y overwrite existing
-p protect file
[ ] means optional, do
not type those [ and ]
in the dsz command !
Valid mixtures depend
on the kind of transfer
requested. Thus 'sx' can
accept only '-k', while
'rz' may accept '-an'.
As an afterthought, it comes to me that in fact Dsz is many programs in one.
It would ease users life if a batch menu is written to select options...
Vincent Vinh-Hung

07-Feb-1988 update.

I've read on Bix from jfleming that 'd' option didn't work.
It may be due to hardware configuration.
My system has a terminal connected to COM1 and an internal modem card as COM2.
I've tested the following :
dsz d rz ---> it's OK.
dsz port 1 d rz ---> it's OK. Disconnecting the terminal, it was OK too.
dsz port 2 d rz ---> DSZ finishes immediately and returns to DOS.
Taking out the modem card :
dsz port 2 d rz ---> DSZ tells "port 2 (2F8) failure" and the system hang.
It seems that to make use of the 'd' option, the hardware should have a free
RS232 on it. I haven't check, but I suspect that if my internal modem card was
configured as COM1, the 'd' option wouldn't work.


Newer versions of Dsz have greatly improved doc - each successive file
I download, I find a clearer and clearer text accompanying Dsz - I think
that what I said some months ago about the obscure doc is now untrue.

 December 31, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>