DLSw Support

This project aims to provide a way of connecting SDLC devices to Hercules. This should give more options for connecting real 3270 terminals to Hercules.

Introduction

Inspired by the people that have managed to get real 3270 terminals to work with Hercules (Link 1, Link 2) I was keen to try this myself. The catch seems to be that a very specific hardware and software combination is required to make it work. Namely that is an IBM 3174 with either an Ethernet or Token Ring card and microcode C6.4. It seems that these are quite difficult and expensive to obtain, particularly in the UK so I decided to explore other options.

IBM 3174 establishment controllers with SDLC connection seem to be much easier to obtain so I went ahead and bought an IBM 3174 Model 91R. Now in terms of how to link this up with Hercules there have been various suggestions in the past such as using an SDLC or synchronous serial card in a PC. The problem with this approach is that it will require O/S specific drivers and limit the number of platforms on which it can be supported.

After some research I came across DLSw (Data Link Switching protocol) which is a protocol developed jointly by IBM and Cisco for transmitting SNA packets between routers over a TCP connection. DLSw is documented in RFC 1795. Because only a TCP connection is required on the Hercules end this is the perfect solution to maintain the potability of the emulator.

I also considered Enterprise Extender protocol (RFC 2353) which is a more modern replacement for DLSW however it seems (from what I could find) that less routers support it when compared to DLSw.

Hercules

I'm using the TK4- version of Hercules for this development. The reason is that I didn't have much knowlege of how to configure VTAM when I started this project so I thought it would be best to start with TK4- which already has SNA terminals configured.

I've added the DLSw support by extending the existing 3705 simulation. The code is not in a state that is suitable for general release yet as some existing functionality of the 3705 (telnet terminals) has been broken in the process. I need to work out a way of getting the two methods of connection to co-exist which is more difficult than you might have expected due to the 3705 not knowing what has been configured in VTAM.

Hercules Configuration

In the configuration file conf/tk4-_default.cnf enable DLSw support for one of the 3705 devices. Only one device at a time can be enabled at the moment.

# NCP VTAM
#
0660 3705 lport=${N660PORT:=37051} locncpnm=N07 rmtncpnm=N08 …
          unitsz=252 ackspeed=1000
0661 3705 lport=${N661PORT:=37052} locncpnm=N10 rmtncpnm=N11 …
          idblk=017 idnum=00018 locsuba=10 rmtsuba=11 unitsz=252 …
          ackspeed=1000
0662 3705 lport=${N662PORT:=37053} debug=yes dlsw=yes locncpnm=N12 …
          rmtncpnm=N13 idblk=017 idnum=00019 locsuba=12 rmtsuba=13 …
          unitsz=252 ackspeed=1000
0663 3705 lport=${N663PORT:=37054} locncpnm=N14 rmtncpnm=N15 idblk=017 …
          idnum=0001a locsuba=14 rmtsuba=15 unitsz=252 ackspeed=1000

VTAM Configuration

For the TK4- distribution the physical units (PU) and logical units (LU) are defined to VTAM in SYS1.VTAMLST(S3705). The PU in this case is our SDLC device (3174 or similar) and the LU is the 3270 terminal attached to it. We are working with remote subarea 13 (note that rmtsuba=13 for the 3705 device that we enabled DLSw on). You need to find the section that defines this subarea. Note that the subarea is defined twice, once for PU type 1 and once for PU type 2. We need the section for type 2.

*********************************************************************
* PU2/LU2/3270 DEVICES        Remote NCP Subarea 13
*********************************************************************
P3278S3  PU    ADDR=C1,
               IDBLK=017,
               IDNUM=00019,
               MAXDATA=256,
               DISCNT=YES,
               ISTATUS=ACTIVE,
               MAXLU=16,
               PUTYPE=2
T3278S31 LU    LOCADDR=3,
               BATCH=NO,
               BUFLIM=2,
               ISTATUS=INACTIVE,LUTYPE=2,
               SSCPFM=USS3270,
               MODETAB=BSPLMT02,
               USSTAB=BSPUDT01,
               VPACING=0

The LOCADDR of the LU will need to be changed to match the unit number of the 3270 terminal as defined on the 3174. I don't know if it makes any difference but I also changed MAXDATA for the PU to match the settings of the 3174 (256 in my case). Additional terminals can be defined by adding more LU definitions with a different terminal name and a different LU number.

T3279S31 LU    LOCADDR=4,
               BATCH=NO,
               BUFLIM=2,
               ISTATUS=INACTIVE,LUTYPE=2,
               SSCPFM=USS3270,
               MODETAB=BSPLMT02,
               USSTAB=BSPUDT01,
               VPACING=0

If additional terminals are defined then further changes are required in SYS1.VTAMLST(N13). Change the definition of MAXLU for N13P1 to match the number of logical units defined.

**********************************************************************
* SWITCHED LINE GROUP FOR DIAL INCOMING
**********************************************************************
N13G1    GROUP DIAL=YES,
               ISTATUS=ACTIVE,
               LOGTAB=ISTINCLM,   WRONG, BUT FIXES LOOPING PROB (?)
               LNCTL=SDLC,
               CALL=IN,MAXLU=3,
               SSCPFM=USSSCS
N13LP1   LUPOOL NUMBER=16
N13L1    LINE
N13P1    PU    MAXLU=3
N13L2    LINE                                                         
N13P2    PU    MAXLU=1
N13L3    LINE
N13P3    PU    MAXLU=1
N13L4    LINE

The compiled versions of these configuration files in SYS1.VTAMOBJ must be replaced. The easiest way to do this is the delete the members N13 and S3705 in SYS1.VTAMOBJ and re-IPL the system. Before doing that though any additional terminals must also be added to SYS1.PARMLIB(STARTSTD).

CMD V NET,ACT,ID=T3278S31,LOGON=SNASOL,LOGMODE=MHP3278E
CMD V NET,ACT,ID=T3279S31,LOGON=SNASOL,LOGMODE=MHP3278E

Cisco Router

A router supporting DLSw with a synchronous serial "WAN interface" is required. I'm using a Cisco 2811 with a WIC-2T module. The serial interface needs to be configured for SDLC encapsulation with DLSw enabled. A DLSW peer needs to be configured to point at Hercules. Normally this would point at another router however in this case Hercules is pretending to be a DLSw capable router!

Cisco 2811 router with WIC-2T

Configuration

Here is an example of the commands used to setup the Cisco router. The SDLC device being connected to the router is refered to as the 'SDLC target' in my comments.

dlsw local-peer peer-id 192.168.0.95    ! Local interface for DLSw
                                        !
dlsw remote-peer 0 tcp 192.168.0.44     ! Remote system running Hercules
                                        !
interface FastEthernet0/0               ! Ethernet interface to Hercules
 ip address 192.168.0.95 255.255.255.0
                                        !
interface Serial0/0/0                   ! Serial interface to SDLC target
 encapsulation sdlc
 clock rate 64000                       ! 64 Kbit/s baud rate
 sdlc role primary                      ! Router is primary SDLC device
 sdlc vmac 4000.0999.0100               ! Virtual MAC address associated with
                                        !   the SDLC target. This is an
                                        !   arbitrary value but the last two
                                        !   digits should be 00
 sdlc address C1                        ! SDLC addess of SDLC target
                                        !   on the serial link
 sdlc xid C1 01700019                   ! XID to report to DLSw peers for
                                        !   the SDLC target
 sdlc partner 4000.1020.1000 C1         ! The MAC address of the remote SDLC
                                        !   partner (within Hercules).
                                        !   Currently this is unused so any
                                        !   value can be input however it
                                        !   may be used for selecting between
                                        !   NCPs in the future
 sdlc dlsw C1                           ! Enable DLSw for this SDLC address

DEC MicroServer (DECnet/SNA Gateway)

As I was unable to find any microcode for the IBM 3174-91R I thought I would try some other devices from my collection that can be conneted via SDLC. First up is a DEC MicroServer which when running the DECnet/SNA Gateway-ST (Synchronous Transport) software will emulate an IBM 3174. Applications such as the 3270 terminal emulator connect to the gateway from a VMS host using the DECnet protocol.

The gateway is connected to the router using a BC19F and CAB-SS-V35FC cable.

DEC MicroServer (DEMSA)

Configuration

These are the commands used to setup the DECnet/SNA Gateway

SET LINE SYN-0 -                        ! Setup serial line parameters
   DUPLEX FULL -
   PROTOCOL SDLC POINT -
   SIGNALLING NORMAL -
   CLOCK EXTERNAL -
   MODEM TYPE NORMAL -
   RECEIVE BUFFERS 34 -
   LOGGING INFORMATIONAL -
   BUFFER SIZE 265
SET CIRCUIT SDLC-0 -                    ! Setup SDLC parameters
   LINE SYN-0 -
   DUPLEX FULL -
   RESPONSE MODE NORMAL -
   STATION ADDRESS C1 -
   LOGGING INFORMATIONAL -
   STATION ID 01700019
SET PU SNA-0 CIRCUIT SDLC-0 -           ! Setup PU0
   LU LIST 2-127 -
   SEGMENT SIZE 265 -
   LOGGING WARNING
SET CIRCUIT SDLC-0 STATE ON
SET LINE SYN-0 STATE ON
SET ACCESS NAME SNASOL -                ! SNA Solicitor for access to TSO
   LU LIST 3 -                          !   using SNA/3270TE
   APPLICATION SNASOL -                 !   LU3
   LOGON MODE XT3278M2 -
   PU SNA-0
SET ACCESS NAME TESTVTM2 -              ! VTAM test application
   LU LIST 3 -                          !   using SNA/3270TE
   APPLICATION TESTVTM2 -               !   LU3
   LOGON MODE XT3278M2 -
   PU SNA-0
SET ACCESS NAME RJE -                   ! Remote Job Entry to JES2
   LU LIST 4-7 -                        !   using SNA/RJE (host based)
   APPLICATION JES2 -                   !   LU4-7
   LOGON MODE DNARJE -
   PU SNA-0
SET ACCESS NAME PRT5 -                  ! Printer emulation from JRP
   LU LIST 8 -                          !   using SNA/PRE
   APPLICATION JRP -                    !   LU8
   LOGON MODE DNASCS -
   PU SNA-0
SET SERVER SNA-ACCESS -
   LOGGING WARNING -
   NOTE "Gateway Access Server" -
   STATE ON
SET SERVER RJE -
   LOGGING WARNING -
   NOTE "Remote Job Entry" -
   STATE ON
SET SERVER DHCF -
   PU SNA-0 LU LIST 100-110 -
   LOGGING WARNING -
   NOTE "Host Command Facility" -
   STATE ON

I was successful in getting the printer emulation to work. Printer output from the mainframe is submitted to a print queue on the VAX. So far I haven't been able to get the 3270 terminals or remote job entry function to work without protocol errors.

IBM PC (with SDLC card)

The second device I tried with Hercules was an IBM PC with an ISA SDLC card fitted. This was connected to the Cisco router using a CAB-SS-232FC cable.

IBM PC 3270 Emulation Program V3.00

This DOS based terminal emulator seemed to work ok once I worked out the correct connection settings. The most important ones seemed to be setting the line to 'dedicated' and 'no continuous carrier' (see the screenshots below).

One oddity I came across was that after typing LOGON at the SNA solicitor screen and pressing enter, the screen clears and the WAIT indicator is shown at the bottom of the screen. It just sits there until you press the attention key at which point you can continue the logon process. I'm not sure if this is expected behaviour. It doesn't occur when using the telnet terminals with the 3705.

The main menu in TK4- does not seem to work well with this terminal. I suspect it requires a 3270 feature that is not present in this terminal emulation. Once you get past the menu programs such as RFE seem to run ok.

IBM Personal Communications/3270 for Windows V2.0

This is a slightly newer application for Windows 3.1. It seems to support whatever feature is missing from the DOS terminal emualtor demonstrated above as the TK4- main menu displays correctly. It did still require the attention key to be pressed to get through the logon procedure as with the DOS based terminal emulator.

IBM 3174-91R

The ultimate goal is to get an IBM 3174 Model 91R working with Hercules then I can use a real 3270 terminal.

IBM 3174-91R

It took quite a long time to track down the microcode needed to run the 3174 but I did eventually get a copy of B4.5 Control and Utility disks. Here are some pictures of the 3174 connected to Hercules (now using a Cisco 1841 router).

IBM 3178 and IBM 3179 Terminals

IBM 3174-91R and Cisco 1841 Router

Download Links

The DLSw support is still a work in progress. The latest development code is available on Github.

Link Description
SDL Hercules (DLSw branch) Source (github)
DLSw Examples Source (github)