IBM MVS/TSO KERMIT ================== Programmer: Fritz

advertisement
IBM MVS/TSO KERMIT
==================
Programmer: Fritz Buetikofer, Help desk member at the University of
&Documentation:
Bern (Switzerland).
Language:
PASCAL/VS
Adaptation from the CMS-version of Victor Lee (Queens
University)
Version:
2.3
Date:
September 1987
TSO Kermit Capabilities At A Glance:
Local operation:
Remote operation:
Transfers text files:
Transfers binary files:
Wildcard send:
^X/^Y interruption:
Filename collision avoidance:
Can time out:
8th-bit prefixing:
Repeat count prefixing:
Alternate block checks:
Terminal emulation:
Communication settings:
Transmit BREAK:
Transaction logging:
Session logging:
Raw transmit:
Act as server:
Talk to server:
Advanced server functions:
Advanced commands for servers:
Local file management:
Command/init files:
Command macros:
Handle Attribute Packets:
Extended-length packets:
Sliding windows:
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
(RECEIVE only)
(only from startup file)
(puts them in the LOG-file)
(Maximum size is 1K)
Kermit-TSO is a program that implements the KERMIT file transfer
protocol for IBM 370-series mainframes (System/370, 303x, 308x, etc.)
under the MVS/TSO operating system.
It is written in IBM PASCAL/VS language. This Program runs only over
ASCII (asynchronous) lines attached to a 3705-style front end.
Actually Kermit-TSO is unable to interrupt a read on its "console".
This means that the TSO version of Kermit cannot timeout. The only way
to "timeout" TSO Kermit is from the other side: typing a carriage
return to the local Kermit causing it to retransmit its last packet,
or an automatic timeout as provided by most other Kermits.
The File System under MVS
=========================
The features of the TSO file system of greatest interest to Kermit
users are the format of file specifications and the concept of records.
File Specifications
------------------The MVS/TSO file specification is in the form
a) sequential files:
'USERID.FILENAME.FILETYPE'
or NAME.FILETYPE
(short form)
a) partitioned files (PDS):
'USERID.FILENAME.FILETYPE(MEMBER)'
or NAME.FILETYPE(MEMBER)
(short form)
FILENAME, FILETYPE and MEMBER are at most 8 characters in length each.
The name field is the primary identifier for the file. The type is an
an indicator which, by convention, tells what kind of file we have. For
instance TEST.FORT is the source of a FORTRAN program named TEST. LOAD
is the normal suffix for executable programs. MVS/TSO considers the
FILETYPE parameter optional.
The USERID parameter is the normal userid under which the user logs on
to MVS/TSO. If USERID is omitted from a file specification when sending,
the short form of the file specification is used (that means, the file
is cataloged under the userid of the KERMIT user).
To provide compatibility with most other operating systems, Kermit-TSO
sends only the FILENAME and FILETYPE; for members of a partitioned dataset, the MEMBERNAME and FILETYPE are sent.
The FILENAME, FILETYPE and MEMBER may contain, in any order, uppercase
letters, digits, and the special characters "$" (dollar sign),
"@" (at sign) and "#" (hash).
File Formats
-----------Several differences exist between MVS/TSO files and those of most other
operating systems. One distinction is that MVS encodes its data using
the EBCDIC character set. The operating system, MVS, translates all
incoming characters from ASCII to EBCDIC. Kermit-TSO then translates the
data it reads back to ASCII (characters not representable in ASCII are
replaced by a null). This is done in order to correctly calculate the
checksum, the method used to guarantee error-free transfer. When
Kermit-TSO sends packets, it converts all data back to EBCDIC. Note that
the translate tables used by Kermit must correspond to the ones used by
the system (MVS/VTAM).
Another difference is that MVS/TSO stores files as records rather than
byte character streams. MVS/TSO Kermit has to worry about assembling
incoming data packets into records and appending carriage return
linefeed to outgoing records.
Program Operation
=================
Kermit-TSO can be invoked at the command line or from a CLIST. Invoke
the program under TSO by typing "KERMIT". When you see the command's
prompt,
KERMIT-TSO>
you may type Kermit commands repeatedly until you are ready to exit the
program, for example:
Welcome to KERMIT under MVS/XA-TSO V2.3
KERMIT-TSO> send foo*.fort
KERMIT-TSO> receive test.spss
KERMIT-TSO> exit
End of Kermit
Kermit-TSO Commands
===================
Here's a brief summary of all TSO KERMIT commands:
DELETE
DIR
DISK
DO
END
EXIT
FINISH
HELP
LOGOUT
MEMBERS
QUIT
RECEIVE
SEND
SERVER
SET
SHOW
STATUS
TAKE
TSO
TYPE
WHO
a specific file.
shows user directory.
space occupied by user.
execute Kermit commands from a profile member
stop Kermit-TSO.
from Kermit-TSO.
finish server-mode of the micro
about Kermit-TSO.
from Kermit-TSO and system.
displays memberlist of a PDS.
from Kermit-TSO.
files from other Kermit.
files to other Kermit.
mode of remote operation.
various parameters.
Kermit settings.
same as SHOW.
execute Kermit commands from a file
executes a TSO command.
a specific file.
is logged on.
Diagramm with KERMIT commands and syntax:
KERMIT --------------------------------------------------------------------+
|
|
|-- DElete --- <local-filespec> ------------------------------------+
|
|
|-- DIRectory ------------------------------------------------------+
|
|-- <userid> -----------------------------------------+
|
|
|-- DISk -----------------------------------------------------------+
|
|
|-- DO ------- <membername> ----------------------------------------+
|
|
|-- FInish ---------------------------------------------------------+
|
|
|-- Help -----------------------------------------------------------+
|
|
|-- LOGout ---------------------------------------------------------+
|
|
|-- MEmbers -- <local-filespec> ------------------------------------+
|
|
|-- QUit or EXit or ENd --------------------------------------------+
|
|
|-- RECeive --------------------------------------------------------+
|
|------------------- <local-filespec> ----------------+
|
|
|-- SENd <local-filespec> ------------------------------------------+
|
|----<as> ---------- <local-filespec> --------------
---+
|
|
|-- SERver ---------------------------------------------------------+
|
|
|-- SET ------------------------------------------------------------+
|
|-- <DEbug> ------- <ON | OR> ----------------------
|
|-- <TExtmode> ---- <ON | OFF> ---------------------
|
|-- <REcfm> ------- <FB | VB> ----------------------
|
|-- <INcomplete> -- <KEEP | DELETE>-----------------
|
|
|
|-- <CHecktype> ---|
|
|-- <EOLchar> -----|
|
|-- <DElay> -------|-- <decimal number> ------------
|
|-- <PACketsize> --|
|
|-- <SOHchar> -----|
|
|
|
|-- <CNtrlquote> --|
|
|-- <BIt8quote> ---|-- <EBCDIC Char> ---------------
|
|-- <Repchar> -----|
|
|
|
|-- <ATOE> --------|
|
|-- <ETOA> --------|-- <n1> -- <n2> ----------------
---+
---+
---+
---+
|
|
|
---+
|
|
|
|
---+
|
|
|
---+
|
|
|-- STatus ---------------------------------------------------------+
|
|
|-- TAke ----- <local-filespec> ------------------------------------+
|
|
|-- TYpe ----- <local-filespec> ------------------------------------+
|
|
|-- VErsion --------------------------------------------------------+
|
|
|-- WHo ------------------------------------------------------------+->
THE DELETE COMMAND
Syntax: DELETE filespec
The DELETE command causes a file to be deleted from the catalog of the
user (actually, no wildcards in the filespec are allowed).
THE DIR COMMAND
Syntax: DIR [userid]
The DIR command causes a list of all cataloged files of a specific user
to be displayed at the screen.
THE DISK COMMAND
Syntax: DISK
The DISK command displays the actual size of disk-space occupied by
the user.
THE DO COMMAND
Syntax: DO membername
Execute Kermit commands from the file KERMIT.PROFILE, where membername
should be an existing member. The command file should not include
other DO or TAKE commands!
THE END, EXIT and QUIT COMMAND
Syntax: END or EXIT or QUIT
These commands stop the Kermit-TSO program, the user returns back to
the TSO prompt 'READY' to proceed work.
THE FINISH COMMAND
Syntax: FINISH
The FINISH command sends a FINISH-packet to the server of the micro.
This command has only an effect if used from within a startup-file.
THE LOGOUT COMMAND
Syntax: LOGOUT
The LOGOUT command stops the Kermit-TSO program. Additionnaly the user
is logged off from the host.
THE MEMBERS COMMAND
Syntax: MEMBERS filespec
The MEMBERS command displays the memberlist of a partitionned file.
THE RECEIVE COMMAND
Syntax: RECEIVE [filespec]
The RECEIVE command tells Kermit-TSO to receive a file or file group
from the other system. You should then issue a SEND command to the
remote Kermit.
If the optional filespec is not included, Kermit-TSO will use the
name(s) provided by the other Kermit. If that name is not a legal TSO
file name, Kermit-TSO will try to write the incoming data to the file
KERMIT.TEMP.
If the optional filespec is provided, but more than one file arrives,
the first file will be stored under the given filespec, and the
remainder will be stored under their own names (sent by the other
Kermit).
When receiving files, any record longer than the logical record length
will be split up to as many records as necessary.
Actually the following two record formats are supported:
1) Fixed format records, with a record length of 80. This format is
used for language sources and OS job control.
2) Variable records, with a record length of 255 bytes. This format
is the default, and is used for normal text files.
If an error occurs during the file transfer, as much of the file as
was received is saved. If the sending of a file is cancelled by the
user of the remote system, Kermit-TSO will discard whatever had arrived.
If the incoming file has the same name as a file that already exists,
Kermit-TSO will change the incoming name so as not to obliterate the
pre-existing file. It attempts to rename the file by replacing the
last character of the FILENAME or MEMBER (for PDS files) with the
next-following character in the alphabetical order. It continues in this
manner, until a filename for a non-existant file is found.
THE SEND COMMAND
Syntax:
SEND filespec [[AS] local-filespec]
The SEND command causes a file or file group to be sent from the TSO
system to the Kermit on the remote system.
In filespec you may put ONE wildcard '*' anywhere in the filename, filetype or membername if present. Do not put a wildcard in the userid.
Although the file transfer cannot be cancelled from the TSO side,
Kermit-TSO is capable of responding to "cancel file" or "cancel batch"
signals from the local Kermit; these are typically entered by typing
Control-X and Control-Z respectively.
THE SERVER COMMAND
Kermit-TSO is capable of acting as a server. The user connects to the
TSO system once to set various options and to start the server. From
then on, he need not connect to the TSO system again. The current
version of Kermit-TSO can send files (the user on the other end types
the GET command, using the TSO filename conventions), receive files
(the user types SEND), several advanced server functions as user
directory, typing or deleting files and other, and terminate by either
returning to TSO (user types FINISH) or logging the user out
(user types BYE).
To put Kermit-TSO into server mode, first issue any desired SET command
to select various options and then type the SERVER command. Kermit-TSO
will await all further instructions from the user Kermit on the other
end of the connection. For example:
KERMIT-TSO> set debug on
KERMIT-TSO> server
THE SET COMMAND
Syntax: SET parameter value
Establish or modify various parameters for file transfer. You can
examine their values with the SHOW command.
The following SET commands are available in Kermit-TSO:
ATOE
BIT8-QUOTE
CHECKTYPE
CNTRL-QUOTE
DEBUG
DELAY
EOLCHAR
ETOA
INCOMPLETE
PACKETSIZE
RECFM
REPEATCHAR
SOHCHAR
TEXTMODE
Modify ASCII -> EBCDIC translation table
Character for 8th bit quoting
Type of block check to be used
Character for control character quoting
Log packets sent and received during file transfer
Delay until first SEND INIT packet is sent
Packet terminator
Modify EBCDIC -> ASCII translation table
Disposition of file for aborted transfer
Maximum receive packet size
Record format for incoming files
Character for compression indication
Start of Packet character
Translation for text files
SET ATOE
Syntax: SET ATOE n1 n2
This command allows you to modify the ASCII -> EBCDIC translation table
which is used to determine the resulting character and checksum on the
micro side. The numbers n1 and n2 should lie in the range 0..255.
SET BIT8-QUOTE
Syntax: SET BIT8-QUOTE x
This command allows you to modify the character, which is used for
8th bit quoting. Initially this character is set to '&'. Running in
server mode, Kermit-TSO uses the 8th-bit quoting character of the micro.
SET CHECKTYPE
Syntax: SET CHECKTYPE n
This command allows you to specify the block check type to be used for
ensuring a safe tranfer of the data. The allowed types are:
1 - single character checksum, 2 - two char checksum
or 3 - three char CRC.
SET CNTRL-QUOTE
SYNTAX: SET CNTRL-QUOTE x
Use the indicated printable character for prefixing (quoting) control
characters and other prefix characters. The only reason to change
this would be for sending a very long file that contains very many "#"
characters (the normal control prefix) as data. It must be a single
character in the range: 33-62, 96, 123-126 (decimal).
SET DEBUG
Syntax: SET DEBUG ON / OFF
ON
Keep a journal of all packets sent and received in the file
KERMIT.DEBUG. If the file already exists, it is overwritten.
OFF
Stop logging the packets.
SET DELAY
Syntax: SET DELAY nn
This command allows you to modify the delay time (in seconds), between
issuing the SEND command on TSO side, and when the first 'SEND-INIT'
packet. 'nn' must be between 5 and 60 (decimal); the default is 6.
SET EOLCHAR
Syntax: SET EOLCHAR nn
If the remote system needs packets to be terminated by anything other
than carriage return, specify the decimal value of the desired ASCII
character. 'nn' must be between 0 and 18 (decimal).
SET ETOA
Syntax: SET ETOA n1 n2
This command allows you to modify the ASCII -> EBCDIC translation table
which is used to determine the resulting character and checksum on the
micro side. The numbers n1 and n2 should lie in the range 0..255.
SET INCOMPLETE
Syntax: SET INCOMPLETE KEEP / DELETE
If the remote system aborts a filetransfer the INCOMPLETE options specifies what should be done with the incomplete file: whether it is kept
or deleted.
SET PACKETSIZE
Syntax: SET PACKETSIZE nn
Use the specified number as the maximum length for incoming packets.
The valid range is 26-94-1000, where 94 is the default. Packets with
a size of greater than 94 are packets according to the extended length
protocol.
SET RECFM
Syntax: SET RECFM FB / VB
Set the record format to use for incoming files. Valid options are "FB"
for fixed format (as used for job control files) or "VB" for variable
format (as used for text or data files). The default is variable.
SET REPEATCHAR
Syntax: SET REPEATCHAR x
This command allows you to modify the character, which is used for
character compression on the micro side. Initially this character is
set to '~' (tilde). Running in server mode, Kermit-TSO uses the
repeat character of the micro.
SET SOHCHAR
Syntax: SET SOHCHAR nn
If the normal start-of-packet character <Ctrl-A> should not get through
the communications line, you may change this character to any other
suitable character. Specify the decimal value of the desired ASCII
character. 'nn' must be between 0 and 18 (decimal).
SET TEXTMODE
Syntax: SET TEXTMODE ON / OFF
ON
Tells TSO Kermit that the file is plain text. ASCII-to-EBCDIC and
EBCDIC-to-ASCII translation is performed on the data. Carriage
return-linefeed are appended to outgoing records and are used to
determine the end of incoming records.
OFF
Tells TSO Kermit to treat each character as a string of bits and
not to perform translation on the data. Also, no carriage-return
is added to the end of outgoing records.
THE SHOW COMMAND
Syntax: SHOW
Use to display the values of all parameters that can be changed with
the SET command.
THE STATUS COMMAND
Syntax: STATUS
Returns the status of the previous command. The response will either
display the message "Kermit completed successfully", or the last error
encountered.
THE TAKE COMMAND
Syntax: TAKE filespec
Execute Kermit commands from the specified file, where filespec has
the normal TSO filename conventions. The command file should not
include other TAKE or DO commands.
THE TSO COMMAND
Syntax: TSO commandstring
Although Kermit-TSO does provide only few commands for managing local
files (list directory, type and delete files), it is possible to
interact with the operating system. You can issue any TSO command.
At this time, though, you cannot run another program or clist from
within Kermit-TSO.
THE TYPE COMMAND
Syntax: TYPE filespec
The TYPE command causes a file or file group to be sent from the TSO
system to the Kermit on the remote system and typed there on the screen.
(actually no wildcards in the filespec are allowed )
Although the file transfer cannot be cancelled from the TSO side,
Kermit-TSO is capable of responding to "cancel file" or "cancel batch"
signals from the local Kermit; these are typically entered by typing
Control-X and Control-Z respectively.
THE WHO COMMAND
Syntax: WHO
The WHO command displays a list of the actual users logged on at the
host system.
The KERMIT startup file
=======================
When starting KERMIT, the file called 'KERMIT.SETUP' is executed if
it exists. The KERMIT clist checks for the presence of the command
file. If he finds it, he passes an additional argument to the program,
which causes KERMIT to execute all commands in this startup file.
When sending more than one file from within the startup-file, you have
to set the micro-Kermit into server mode.
Example:
+-KERMIT.SETUP--------------------+
| SEND FILE1.TEXT
|
| SEND KERMIT.INSTALL(*)
|
| FINISH
|
+---------------------------------+
Before Connecting to the Mainframe
==================================
When connecting to the TSO system as a TTY device ("line at a time"
mode) several flags must first be set on the micro version of Kermit.
You should set the LOCAL-ECHO flag to OFF (this is used to indicate
full-duplex).
HANDSHAKE should be set to XON and FLOW-CONTROL should be set to NONE.
The parity should be set according to the system's specifications.
Set the baud rate to correspond to the line speed and set the parity
as needed for the used line.
Download