Hercules Version 3: Installation and Operation

Installation Procedure

Building from source

These instructions apply to the Linux or Mac OS X versions. Volker Bandke has instructions on how to build the Win32 version at http://www.bsp-gmbh.com/hercules/nude_w32.html.

  1. Download the distribution file hercules-3.02.tar.gz

    Notes:

    1. By downloading this file you agree to the terms of the Q Public Licence.
    2. IE4 may report "problem with security settings or file does not exist" when downloading this file. I do not know why. If you experience this problem, use IE5 or Netscape Navigator instead.

  2. Use these commands to unzip the distribution file:
    tar xvzf ../hercules-3.02.tar.gz
    cd hercules-3.02
  3. Configure Hercules for your system:

    ./configure

    By default, the configure script will attempt to guess appropriate compiler optimization flags for your system. If its guesses turn out to be wrong, you can disable all optimization by passing the --disable-optimization option to configure, or specify your own optimization flags with --enable-optimization=FLAGS

    For additional configuration options, run ./configure --help

  4. Build the executables:

    make

  5. Install the programs: as root:

    make install

Important: You must use the egcs compiler and the glibc2 library. Refer to the Hercules Frequently-Asked Questions page for required compiler and other software levels.

Installing prebuilt RPMs:

  1. Download the RPM file you want:
  2. Install the RPM:
    rpm -Uvh RPMfile
This will leave the Hercules executables in /usr/bin and the dynamic libraries in /usr/lib and /usr/lib/hercules, where you can run them from anywhere. Sample configuration files will be placed in /etc/hercules, and the IPLable card deck for the ZZSA standalone utility will be placed in /var/share/hercules.

Installing Debian packages:

Debian packages are available for "woody" and later releases. As of this writing, "woody" is not yet released.

Installing on Mac OS X:

  1. Download the compressed disk image: hercules-3.02.dmg
  2. Mount the image by double-clicking on it in the Finder. Your web browser may have done that for you already.
  3. Installation and use instructions are in the file OS X ReadMe.rtf.
  4. If you want to use CTC networking on your Hercules system, you will need to install the supplied Tunnel driver.

Installing on Windows:

  1. You must first install the Cygwin package. Download the setup program from the Cygwin site, and run it. If it's not preselected for you, select the libintl-2 package when you're presented with a list of packages to install. Hercules version 3.02 was built with version 1.5.5 of Cygwin, and may not work with other versions, as the Cygwin library tends to have subtle incompatibilities from version to version that Herucles seems to stress.
  2. Download the self-extracting Windows archive: The Fish threads versions are recommended unless you encounter strange problems.
  3. Run the self-extracting archive to install on your system. Note that Hercules has several file paths compiled into the code, and so it is best to install the package into the defult directories unless you really know what you're doing.

Configuration Procedure

You will need to amend the configuration file hercules.cnf to reflect your device layout and intended mode of operation (S/370, ESA/390, or z/Architecture). See the Hercules Configuration File page for a complete description.

Creating DASD volumes

The Creating Hercules DASD page describes various methods of creating and loading virtual DASD volumes. The compressed CKD DASD support is described in this page.

Operating Procedure

Note: If you intend to run any licensed software on your PC using Hercules, it is your responsibility to ensure that you do not violate the software vendor's licensing terms.

Loading a standalone program or operating system

To start Hercules enter this command at the Unix shell prompt:

hercules [-f filename] [> logfile]
where filename is the name of the configuration file (the default is hercules.cnf), and logfile is an optional log file which will receive a copy of all messages displayed on the control panel.

Next connect a tn3270 client to the console port (normally port 3270). The client will be connected to the first 3270 device address specified in the configuration file (this should be the master console address). If your master console is a 1052 or 3215, connect a telnet client instead of a tn3270 client.

Now you can enter an ipl command from the control panel.

Panel commands

      Command      Description...
      -------      -----------------------------------------------
      ?            list all commands
      help         command specific help
      quit         terminate the emulator
      exit         (synonym for 'quit')
      cpu          define target cpu for panel display and commands
      start        start CPU (or printer device if argument given)
      stop         stop CPU (or printer device if argument given)
      startall     start all CPU's
      stopall      stop all CPU's
      .reply       scp command
      !message     scp priority messsage
      i            generate I/O attention interrupt for device
      ext          generate external interrupt
      restart      generate restart interrupt
      store        store CPU status at absolute zero
      archmode     set architecture mode
      loadparm     set IPL parameter
      ipl          IPL from device xxxx
      iplc         IPL CLEAR from device xxxx
      sysreset     SYSTEM Reset Manual operation
      sysclear     SYSTEM Reset-clear Manual operation
      psw          display program status word
      gpr          display general purpose registers
      fpr          display floating point registers
      cr           display control registers
      ar           display access registers
      pr           display prefix register
      clocks       display tod clkc and cpu timer
      ipending     display pending interrupts
      ds           display subchannel
      r            display or alter real storage
      v            display or alter virtual storage
      devtmax      display or set max device threads
      k            display cckd internal trace
      attach       configure device
      detach       remove device
      define       rename device
      devinit      reinitialize device
      devlist      list all devices
      sh           shell command
      cache        cache command
      cckd         cckd command
      shrd         shrd command
      quiet        toggle automatic refresh of panel display data
      b            set breakpoint
      b-           delete breakpoint
      g            turn off instruction stepping and start CPU
      pgmtrace     trace program interrupts
      savecore     save a core image to file
      loadcore     load a core image file
      loadtext     load a text deck file
      ldmod        load a module
      rmmod        delete a module
      lsmod        list dynamic modules
      lsdep        list module dependencies
      iodelay      display or set I/O delay value
      tt32stats    display CTCI-W32 statistics
      toddrag      display or set TOD clock drag factor
      panrate      display or set rate at which console refreshes
      syncio       display syncio devices statistics
      script       Run a sequence of panel commands contained in a file
      cscript      Cancels a running script thread
      evm          ECPS:VM Commands
      aea          Display AEA tables
      sf+          add shadow file
      sf-          delete shadow file
      sf=          rename shadow file
      sfc          compress shadow files
      sfd          display shadow file stats
      t{+/-}       turn instruction tracing on/off
      s{+/-}       turn instruction stepping on/off
      t{+/-}dev    turn CCW tracing on/off
      s{+/-}dev    turn CCW stepping on/off
      t{+/-}CKD    turn CKD_KEY tracing on/off
      f{+/-}adr    mark frames unusable/usable

The ipl command may also be used to perform a load from cdrom or server. For example if a standard SuSE S/390 Linux distribution CD is loaded and mounted on /cdrom for example, this cdrom may then be ipl-ed by: ipl /cdrom/suse.ins

The attach and detach commands are used to dynamically add or remove devices from the configuration, and the define command can be used to alter the device number of an existing device.

The devinit command can be used to reopen an existing device. The args (if specified) override the arguments specified in the configuration file for this device. The device type cannot be changed and must not be specified. This command can be used to rewind a tape, to mount a new tape or disk image file on an existing device, to load a new card deck into a reader, or to close and reopen a printer or punch device.

In single-step mode, pressing the enter key will advance to the next instruction.

There is also an alternate semi-graphical control panel. Press Esc to switch between the command line format and the semi-graphical format. Press ? to obtain help in either control panel.


Additional Panel Command Help Information

    help        Enter "help cmd" where cmd is the command you need help
                with. If the command has additional help text defined for it,
                it will be displayed. Help text is usually limited to explaining
                the format of the command and its various required or optional
                parameters and is not meant to replace reading the documentation.


    quit        Format: "quit [NOW]". The optional 'NOW' argument
                causes the emulator to immediately terminate without
                attempting to close any of the device files or perform
                any cleanup. Only use it in extreme circumstances.


    cpu         Format: "cpu nnnn" where 'nnnn' is the cpu address of
                the cpu in your multiprocessor configuration which you wish
                all panel commands to apply to. For example, entering 'cpu 1'
                followed by "gpr" will display the general purpose registers
                for cpu#1 in your configuration as opposed to cpu#0


    start       Entering the 'start' command by itself simply starts a stopped
                CPU, whereas 'start <devn>' presses the virtual start button on
                printer device <devn>.


    stop        Entering the 'stop' command by itself simply stops a running
                CPU, whereas 'stop <devn>' presses the virtual stop button on
                printer device <devn>, usually causing an INTREQ.


    .reply      To reply to a system control program (i.e. guest operating system)
                message that gets issued to the hercules console, prefix the reply
                with a period.


    !message    To enter a system control program (i.e. guest operating system)
                priority command on the hercules console, simply prefix the command
                with an exclamation point '!'.


    r           Format: "r addr[.len]" or "r addr-addr" to display real
                storage, or "r addr=value" to alter real storage, where 'value'
                is a hex string of up to 32 pairs of digits.

    v           Format: "v addr[.len]" or "v addr-addr" to display virtual
                storage, or "v addr=value" to alter virtual storage, where 'value'
                is a hex string of up to 32 pairs of digits.


    attach      Format: "attach devn type [arg...]


    define      Format: "define olddevn newdevn"


    devinit     Format: "devinit devn arg [arg...]"


    sh          Format: "sh command [args...]" where 'command' is any valid shell
                command. The entered command and any arguments are passed as-is to the
                shell for processing and the results are displayed on the console.


    b           Format: "b addr" where 'addr' is the instruction address where you
                wish to halt execution. Once the breakpoint is reached, instruction
                execution is temporarily halted and the next instruction to be executed
                is displayed. You may then examine registers and/or storage, etc. To
                continue execution after reaching a breakpoint, enter the 'g' command.


    b-          Format: "b-"  (removes any previously set breakpoint)


    pgmtrace    Format: "pgmtrace [-]intcode" where 'intcode' is any valid program
                interruption code in the range 0x01 to 0x40. Precede the interrupt code
                with a '-' to stop tracing of that particular program interruption.


    savecore    Format: "savecore filename [{start|*}] [{end|*}]" where 'start' and 'end'
                define the starting and ending addresss of the range of real storage to be
                saved to file 'filename'. '*' means address 0 if specified for start, and end
                of available storage if specified for end. The default is '* *' (beginning
                of storage through the end of storage; i.e. all of storage).

    loadcore    Format: "loadcore filename [address]" where 'address' is the storage address
                of where to begin loading memory. The file 'filename' is presumed to be a pure
                binary image file previously created via the 'savecore' command. The default for
                'address' is 0 (begining of storage).

    loadtext    Format: "loadtext filename [address]". This command is essentially identical
                to the 'loadcore' command except that it loads a text deck file with "TXT"
                and "END" 80 byte records (i.e. an object deck).

    script      Format: "script filename [...filename...]". Sequentially executes the commands contained
                within the file -filename-. The script file may also contain "script" commands,
                but the system ensures that no more than 10 levels of script are invoked at any
                one time (to avoid a recursion loop)


    cscript     Format: "cscript". This command will cancel the currently running script.
                if no script is running, no action is taken


    evm         Format: "evm". This command invokes ECPS:VM Subcommands.
                Type "evm help" to see a list of available commands


The  hercules.rc  (run-commands)  file:

Hercules also supports the ability to automatically execute panel commands upon startup via the 'run-commands' file. If the run-commands file is found to exist when Hercules starts, each line contained within it is read and interpreted as a panel command exactly as if the command were entered from the HMC system console.

The default filename for the run-commands file is "hercules.rc", but may be overridden by setting the "HERCULES_RC" environment variable to the desired filename.

Except for the 'pause' command (see paragraph further below), each command read from the run-commands file is logged to the console preceded by a '> ' (greater-than sign) character so you can easily distinguish between panel commands entered from the keyboard from those entered via the .rc file.

Lines starting with '#' are treated as "silent comments" and are thus not logged to the console. Line starting with '*' however are treated as "loud comments" and will be logged.

In addition to being able to execute any valid panel command (including the 'sh' shell command) via the run-commands file, an additional 'pause nnn' command is supported in order to introduce a brief delay before reading and processing the next line in the file. The value nnn can be any number from 1 to 999 and specifies the number of seconds to delay before reading the next line. Creative use of the run-commands file can completely automate Hercules startup.


Technical Support

If you have a question about Hercules, please refer to the Hercules Frequently-Asked Questions page first. If your question and/or concern is not addressed in the FAQ, please feel free to post your question to the Hercules-390 forum:
Community email addresses:
  Post message: hercules-390@yahoogroups.com
  Subscribe:    hercules-390-subscribe@yahoogroups.com
  Unsubscribe:  hercules-390-unsubscribe@yahoogroups.com
  List owner:   hercules-390-owner@yahoogroups.com

Files and archives at:
  http://groups.yahoo.com/group/hercules-390

The Hercules-390 forum is in fact your primary source for Hercules support, and you are strongly encouraged to subscribe. We have a vibrant, active community of over 3350 members, many of which are very knowledgeable in many different areas of mainframe technology, both from a hardware point of view as well as from an operating system and software point of view.

In addition to the main Hercules-390 forum, other more specialized Hercules forums also exist to provide more focused support for a variety of popular IBM mainframe operating systems, such as DOS/VS, VM (VM/370, VM/SP, and VM/ESA), and MVS.

Note! the use of Yahoo! as host for the Hercules-390 and related forums should in no way be interpreted as an endorsement of the Yahoo! service.


back

Last updated 4 December 2004