Hercules, MVS38J

HERCPLEX in MVS 3.8J

Overview

Several years ago, I experimented with the Shared DASD device functionality offered by the Hercules Emulator software v3.07 and v3.13. I quickly setup two separate Hercules instances sharing one DASD device following the Hercules Shared Device topics in the Hercules User Reference . Consequently, I moved away from that ‘project’ to another before completing and documenting!

Today, using multiple MVS 3.8J systems (tk3, tk4-) and with the debut of TK5, I decided to resurrect my old DASD sharing project via a Hercules-only instance hosting DASD (or DASDs) to be shared amongst MVS 3.8J instances, thus, creating a ‘Herc-Plex’!!

Why? For convivence!

Instead of transferring datasets across systems, datasets can be shared across systems for immediate access from DASD device(s)!

DASD Sharing function is fully described in various Hercules manuals.

Below are several helpful references from Hercules v3.07 to SDL Hercules:

Hercules v3.07 User Reference (stored locally)
Hercules v3.13 User Reference (stored locally)
SDL Hercules site

 

Shared DASD Herc-Plex Schematic

The objective is sharing DASD devices across MVS 3.8J systems. Initially, sharing one 3390 DASD device across two MVS 3.8J systems. Each Hercules emulator host can be a physical and/or virtual machine.

My implementation uses three separate virtual machines running Ubuntu OS, Windows OS, Hercules Emulator, MVS 3.8J tk3, and MVS 3.8J tk5.

The Shared DASD server runs Ubuntu OS and Hercules Emulator only.

Below is a diagram detailing the host environment used in the implementation section:


                                     Hercules
                                   +----------+  Hercules-only
                                   |  SHARED  |  
                                   |   DASD   |  
                                   |  Server  |  IP=192.168.1.120
                                   +----------+ DNS=herc00-shr.home.lan
                                        |
                                        |
                                        |
                 +----------------------+----------------------+
                 |                                             |
              Hercules                                      Hercules
            +----------+                                  +----------+
            | MVS 3.8J |                                  | MVS 3.8J | 
            | System A |                                  | System B | 
            +----------+                                  +----------+
              IP=192.168.1.121                              IP=192.168.1.122
             DNS=                                          DNS=

Implementation

This section is a step-by-step which includes the creation of a 3390 DASD device for sharing among two MVS instances. Access to the HTML Hercules console and server terminal in necessary.

1. Create a TXT file for DASDLOAD utility

Note: Hercules utility DASDLOAD is used instead of DASDINIT.

Create TXT file (DSHR00.TXT) on the Hercules DASD Server to define a 3390 DASD device with VOLSER=DSHR00 with VTOC space of 15 tracks –


DSHR00 3390 *
sysvtoc vtoc trk 15

2. Create 3390 DASD

Create 3390 DASD on Hercules DASD Server by using the Hercules DASDLOAD utility.

Using Window command prompt or Linux/Debian terminal or equivalent console application, change directory to Hercules program folder on your Hercules DASD server –

Type the command below to create 3390 packs

DASDLOAD -z -a directory/DSHR00.TXT directory/DSHR00.390


Windows       e.g.  DASDLOAD -z -a M:\MVS38J\temp\DSHR00.TXT M:\MVS38J\dasd\DSHR00.390
Linux/Debian  e.g.  DASDLOAD -z -a /home/larryb/DSHR00.TXT M:\MVS38J\dasd\DSHR00.390

3. Start Hercules DASD Server

Start the Hercules emulator on the DASD server. The following messages should appears on the HTML Hercules console regarding the shared DASD device (scroll to bottom of textbox below)

Hercules System Log

HHC00109E set_thread_priority( 5 ) failed: Operation not permitted
HHC00007I Previous message from function 'impl' at impl.c(1173)
HHC00110W Defaulting all threads to priority 1
HHC00007I Previous message from function 'impl' at impl.c(1177)
HHC01413I Hercules version 4.7.0.11119-SDL-gf7d2360a
HHC01414I (C) Copyright 1999-2024 by Roger Bowler, Jan Jaeger, and others
HHC01417I ** The SDL 4.x Hyperion version of Hercules **
HHC01415I Build date: May  6 2024 at 22:19:09
HHC01417I Built with: GCC 9.4.0
HHC01417I Build type: GNU/Linux x86_64 host architecture build
HHC01417I Modes: S/370 ESA/390 z/Arch
HHC01417I Max CPU Engines: 128
HHC01417I Using   shared libraries
HHC01417I Using   setresuid() for setting privileges
HHC01417I Using   POSIX threads Threading Model
HHC01417I Using   Error-Checking Mutex Locking Model
HHC01417I With    Shared Devices support
HHC01417I With    Dynamic loading support
HHC01417I With    External GUI support
HHC01417I With    IPV6 support
HHC01417I With    HTTP Server support
HHC01417I With    sqrtl support
HHC01417I With    Signal handling
HHC01417I With    Watchdog monitoring
HHC01417I With    CCKD BZIP2 support
HHC01417I With    HET BZIP2 support
HHC01417I With    ZLIB support
HHC01417I With    Regular Expressions support
HHC01417I Without Object REXX support
HHC01417I Without Regina REXX support
HHC01417I With    Automatic Operator support
HHC01417I Without National Language Support
HHC01417I With    CCKD64 Support
HHC01417I With    Transactional-Execution Facility support
HHC01417I With    "Optimized" instructions
HHC01417I With    OPTION_USE_SKAIP_AS_LOCK
HHC01417I With    OPTION_SIE2BK_FLD_COPY
HHC01417I With    OPTION_IODELAY_KLUDGE
HHC01417I With    OPTION_MVS_TELNET_WORKAROUND
HHC01417I With    OPTION_SIE_PURGE_DAT_ALWAYS
HHC01417I With    OPTION_NOASYNC_SF_CMDS
HHC01417I Machine dependent assists: cmpxchg1 cmpxchg4 cmpxchg8 cmpxchg16 hatomics=C11
HHC01417I Running on: herc00-shr (Linux-6.8.12-10-pve x86_64) MP=16
HHC01417I Built with crypto external package version 1.0.0.52-ga5096e5
HHC01417I Built with decNumber external package version 3.68.0.102-g3aa2f45
HHC01417I Built with SoftFloat external package version 3.5.0.105-g4b0c326
HHC01417I Built with telnet external package version 1.0.0.63-g729f0b6
HHC00100I Thread id 00007fce619a4540, prio -1, name 'impl_thread' started
HHC00100I Thread id 00007fce618a1700, prio -1, name 'logger_thread' started
HHC00017W Crash dumps NOT enabled
HHC00007I Previous message from function 'impl' at impl.c(1258)
HHC00018W Hercules is NOT running in elevated mode
HHC00007I Previous message from function 'impl' at impl.c(1267)
HHC00150I Crypto module loaded (C) Copyright 2003-2016 by Bernard van der Helm
HHC00151I Activated facility: Message Security Assist
HHC00151I Activated facility: Message Security Assist Extension 1, 2, 3 and 4
HHC00111I Thread CPU Time IS available (_POSIX_THREAD_CPUTIME=0)
HHC00100I Thread id 00007fce6145c700, prio -1, name 'Processor CP00' started
HHC00811I Processor CP00: architecture mode z/Arch
HHC00100I Thread id 00007fce6135b700, prio -1, name 'timer_thread' started
HHC00811I Processor CP00: architecture mode S/370
HHC02204I ARCHLVL        set to S/370
HHC02204I LPARNUM        set to BASIC
HHC17001I Console server listening on port 3270
HHC02204I conkpalv       set to (3,1,10)
HHC02204I CPUMODEL       set to 3090
HHC02204I CPUSERIAL      set to 000611
HHC02204I CPUVERID       set to 00
HHC02204I ECPSVM         set to disabled
HHC02204I PORT           set to port=8090 noauth
HHC01802I HTTP server using root directory /home/larryb/herc47/share/hercules/
HHC02204I ROOT           set to /home/larryb/herc47/share/hercules/
HHC01807I HTTP server signaled to start
HHC02204I LOADPARM       set to ........
HHC02204I LPARNAME       set to HERCULES
HHC17003I MAIN     storage is 16M (mainsize); storage is not locked
HHC02204I MOUNTED_TAPE_REINIT set to disabled
HHC02204I NUMCPU         set to 1
HHC02204I MAXCPU         set to 1
HHC02204I PANOPT         set to FULLPATH RATE=50 MSGCOLOR=DARK "TITLE=Hercules Server herc00-shr"
HHC02204I DIAG8CMD       set to ENABLE  ECHO
HHC02204I SHCMDOPT       set to ENABLE  NODIAG8
HHC02204I TIMERINT       set to 50
HHC02204I TZOFFSET       set to +0000
HHC02204I YROFFSET       set to 0
HHC02204I SHRDPORT       set to 3990
HHC00414I 0:0390 CCKD file /home/larryb/MVS38J/dasd/DSHR00.390: model 3390-1 cyls 1114 heads 15 tracks 16710 trklen 56832
HHC00100I Thread id 00007fce6165f700, prio -1, name 'shrd srvr 0.2' started
HHC00737I Shared: waiting for shared device requests on port 3990
HHC00100I Thread id 00007fce60a58700, prio -1, name 'http_server' started
HHC01802I HTTP server using root directory /home/larryb/herc47/share/hercules/
HHC01803I HTTP server waiting for requests on port 8090












Device 3390 (VOLSER=DSHR00) is available for sharing using port 3990 at server herc00-shr.home.lan (IP=192.168.1.120).

4. Config Shared DASD on MVS System A

Before proceeding, locate an unused 3390 Unit address. Several tools are available to assist in identifying used and unused UCBs on your system.

If the the DUCBD add-on is installed on your system, use the DASD3390* command to display all system defined 3390 devices.

On MVS System A, an unused UCB is available at unit 0395.

Attach to unit address 0395 a 3390 device pointing to shared device on herc00-shr-home.lan port 3990 on unit address 0390.

Using Hercules Console on MVS System A, use the following command –

attach 0395    3390    herc00-shr.home.lan:3990:0390

Response on Hercules console of MVS System A confirming connection to shared device –

HHC01603I attach 0395    3390    herc00-shr.home.lan:3990:0390
HHC00721I 0:0395 Shared: connected to v0.2 server id 2 file herc00-shr.home.lan:3990:0390
HHC00708I 0:0395 Shared: file herc00-shr.home.lan:3990:0390: model 3390 cyls 1114 heads 15 tracks 16710 trklen 56832
HHC02915I client 3901 COMM: Connection received
HHC02908E client 3901 COMM: Connection closed during negotiations

Using Hercules Console of MVS System A, vary shared DASD device (0395) online using the following command –

/v 395,online

Response on Hercules console of MVS System A confirming online availability –

/v 395,online
/14.24.33           IEE302I 395      ONLINE
HHC02915I client 3903 COMM: Connection received
HHC02908E client 3903 COMM: Connection closed during negotiations

Using Hercules Console of MVS System A, mount shared DASD device (0395) onto MVS System A using the following command –

/m 395,vol=(sl,DSHR00),use=private

Response on Hercules console of MVS System A confirming submission of MOUNT job –

/m 395,vol=(sl,DSHR00),use=private
/14.26.12 STC  694  $HASP100 MOUNT    ON STCINRDR
/14.26.12 STC  694  $HASP373 MOUNT    STARTED
/14.26.12 STC  694  IEF403I MOUNT - STARTED - TIME=14.26.12
/14.26.12 STC  694  IEF404I MOUNT - ENDED - TIME=14.26.12
/14.26.12 STC  694  $HASP395 MOUNT    ENDED
/14.26.12 STC  694  $HASP150 MOUNT    ON PRINTER2        17 LINES
/14.26.12           $HASP160 PRINTER2 INACTIVE - CLASS=Z
/14.26.12 STC  694  $HASP250 MOUNT    IS PURGED
HHC02915I client 3905 COMM: Connection received
HHC02908E client 3905 COMM: Connection closed during negotiations

Attempt to access shared device DSHR00 on MVS System A using option 3.4 as shown below.

 --------------------------------  RFE DSLIST  ---------------------------------
 Command ===>                                                                   
                                                                                
      blank - display data set list                                             
      ALLOC - allocate a new data set                                           
                                                                                
                                                                                
                                                                                
      Data set name prefix ==>                                                  
                                                                                
      Volume serial number ==> DSHR00                                           
                                                                                
                                                                                
                                                                                
      Data set selection codes                                                  
                                                                                
           A - Allocate like   B - Browse          C - Catalog                  
           D - Delete          E - Edit            I - Info                     
           L - Listcat         R - Rename          S - Short info               
           U - Uncatalog       V - View            Z - Compress                 
                                                                                
                                                                                
                                                                                
                                                                      7864K FREE

If no datasets appear, allocate a small PS (sequential) dataset.

When a dataset is written to the Shared DASD device the first time, an informational message may be displayed as shown below but can be disregarded:

2025/01/16 21:20:42.963 00005CF0 /21.20.43 TSU 1908  IEC604I VTOC CONVERT ROUTINE ENTERED ON 395,DSHR00,DOS

5. Config Shared DASD on MVS System B

Before proceeding, locate an unused 3390 Unit address. Several tools are available to assist in identifying used and unused UCBs on your system.

If the the DUCBD add-on is installed on your system, used the DASD3390* command to display all system defined 3390 devices.

On MVS System B, an unused UCB is available at unit 0390.

Attach to unit address 0390 a 3390 device pointing to shared device on herc00-shr-home.lan port 3990 on unit address 0390.

Using Hercules Console of MVS System B, attach shared device using the the following command –

attach 0390    3390    herc00-shr.home.lan:3990:0390

Response on Hercules console of MVS System B confirming connection to shared device –

HHC01603I attach 0390    3390    herc00-shr.home.lan:3990:0390
HHC00721I 0:0390 Shared: connected to v0.2 server id 2 file herc00-shr.home.lan:3990:0390
HHC00708I 0:0390 Shared: file herc00-shr.home.lan:3990:0390: model 3390 cyls 1114 heads 15 tracks 16710 trklen 56832
HHC02915I client 3901 COMM: Connection received
HHC02908E client 3901 COMM: Connection closed during negotiations

Using Hercules Console of MVS System B, vary shared DASD device (0390) online using the following command –

/v 390,online

Response on Hercules console of MVS System B confirming online availability –

/v 390,online
/14.24.33           IEE302I 390      ONLINE
HHC02915I client 3903 COMM: Connection received
HHC02908E client 3903 COMM: Connection closed during negotiations

Using Hercules Console of MVS System A, mount shared DASD device (0390) onto MVS System B using the following command –

/m 390,vol=(sl,DSHR00),use=private

Response on Hercules console of MVS System B confirming submission of MOUNT job –

/m 390,vol=(sl,DSHR00),use=private
/14.26.12 STC  694  $HASP100 MOUNT    ON STCINRDR
/14.26.12 STC  694  $HASP373 MOUNT    STARTED
/14.26.12 STC  694  IEF403I MOUNT - STARTED - TIME=14.26.12
/14.26.12 STC  694  IEF404I MOUNT - ENDED - TIME=14.26.12
/14.26.12 STC  694  $HASP395 MOUNT    ENDED
/14.26.12 STC  694  $HASP150 MOUNT    ON PRINTER2        17 LINES
/14.26.12           $HASP160 PRINTER2 INACTIVE - CLASS=Z
/14.26.12 STC  694  $HASP250 MOUNT    IS PURGED
HHC02915I client 3905 COMM: Connection received
HHC02908E client 3905 COMM: Connection closed during negotiations

Attempt to access shared device DSHR00 on MVS System B using option 3.4 as shown below.

 --------------------------------  RFE DSLIST  ---------------------------------
 Command ===>                                                                   
                                                                                
      blank - display data set list                                             
      ALLOC - allocate a new data set                                           
                                                                                
                                                                                
                                                                                
      Data set name prefix ==>                                                  
                                                                                
      Volume serial number ==> DSHR00                                           
                                                                                
                                                                                
                                                                                
      Data set selection codes                                                  
                                                                                
           A - Allocate like   B - Browse          C - Catalog                  
           D - Delete          E - Edit            I - Info                     
           L - Listcat         R - Rename          S - Short info               
           U - Uncatalog       V - View            Z - Compress                 
                                                                                
                                                                                
                                                                                
                                                                      7864K FREE

The dataset created on MVS System A should appear.

Allocate a small PS (sequential) dataset on MVS System B.

When a dataset is written to the Shared DASD device the first time, an informational message may be displayed as shown below but can be disregarded:

2025/01/16 21:20:42.963 00005CF0 /21.20.43 TSU 1908  IEC604I VTOC CONVERT ROUTINE ENTERED ON 395,DSHR00,DOS

At this point, both MVS systems are sharing volume DSHR00!

Hardening Configurations

When dynamic definitions from above are completed, the configurations can become permanent by applying those configurations to each Hercules/MVS 3.8J system.

When using Hercules device sharing, the device IO management is managed by Hercules to handle dataset contention and serialization using a form of enqueue/deque including VTOC updates to prevent dataset corruption.

Apply to MVS System A Hercules configuration file:

0395    3390     herc00-shr.home.lan:3990:0390

Apply to MVS System A, SYS1.PARMLIB(VATLST00):

DSHR00,1,2,3390    ,N     RESERVED,PRIVATE -Shared DASD 1

Apply to MVS System B Hercules configuration file:

0390    3390     herc00-shr.home.lan:3990:0390

Apply to MVS System B, SYS1.PARMLIB(VATLST00):

DSHR00,1,2,3390    ,N     RESERVED,PRIVATE -Shared DASD 1

HERCPLEX is fully configured and available for use!

IPL MVS 3.8J with Shared Devices

When MVS 3.8J undergoes an IPL with attached shared devices that are not available, message IEA120A is displayed requiring operator action. See below snippet:

| IEA101A SPECIFY SYSTEM PARAMETERS FOR RELEASE 03.8 .VS2    
| r 0,clpa                                                   
| IEA120A DEVICE 390 VOLID NOT READ. REPLY 'CONT' OR 'WAIT'  

            
 r 0,cont   
            





Operator intervention is required!

If some form of operation automation is in use, modify accordingly.

If IPL is to continue and Shared device not needed for IPL, use (r 0,CONT) to continue with IPL.  Afterwards, when shared device is available, manually attach device, vary device online, and mount device.

Tip: Ensure Shared DASD server is available to prevent any manual intervention.

Observed Limitations under MVS 3.8J

When using Hercules DASD device sharing, the device IO management is overseen by Hercules to handle dataset contention using a form of enqueue/deque mechanism to prevent dataset corruption. This includes VTOC updates.

That said, catalog updates are local to the acting MVS system.  Meaning, if MVS System A creates datasetA, datasetA is committed to shared DASD including VTOC update and cataloged on MVS System A!

MVS System B is unaware of datasetA via its catalog, but can access datasetA as an uncatalogued dataset using a VOLSER.

When accessing a dataset residing on the Shared device, always use the VOLSER parameter via JCL, TSO ALLOCATES, command/api requests or retrieval screens (e.g. option 3.4).

However, all datasets on the DASD shared device can be listed using option 3.4 if the query includes VOLSER.  If a dataset name is used without VOLSE parameter, only those datasets cataloged on the current MVS system will be listed.

Referring the the below 3.4 DSLIST screen, datasets are UNCATALOGED (denoted by the caret symbol next to the VOLSER) on the inquiring system.  But, all datasets on device DSHR00 are accessible.

LARRY01.SHARED.PDS can be accessed by DSN (does not require a VOLSER).  However, the other two DSNs require VOLSER to access.

 DSHR00=3390-02 CU=3990-C2 ------  RFE DSLIST  ---------------------- Row 1 of 4
 Command ===>                                                  Scroll ===> CSR  
 S DATA-SET-NAME------------- VOLUME ALTRK USTRK ORG FRMT % XT LRECL BLKSZ REFDT
 ' LARRY01.SHARED.PDS         DSHR00    75     3 PO  FB   4  1    80  3120 25118
 ' LARRY01.SYS2.CMDLIB.BK0225 DSHR00^  300    59 PO  U   19  1       19069 23177
 ' LARRY01.SYS2.CMDLIB.SHR    DSHR00^  300   107 PO  U   35  1       19069 23323
   **END**    TOTALS:     675 TRKS ALLOC       169 TRKS USED       3 EXTENTS    
                FREE:   16019 TRKS INCLUDING  1067 CYLINDERS       2 EXTENTS    
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                      7036K FREE

Closing

Enjoy your shared DASD device on your personal ‘HERCPLEX’.

Please use the comment box below or the contact us link on the menu bar to communicate any suggestions, improvements, corrections or issues.

Thanks,
Larry Belmontes

Next Step

Declare user catalog on shared DASD device and connect user catalog to each MVS system master catalog hopefully maintaining integrity across MVS systems while ‘seeing’ all datasets on shared DASD device without VOLSER qualification.

This is a thought at this point.  My concern is the risk of data corruption to user and/or master catalogs!

More to come.

If you find a different solution or already have a solution to facilitate sharing of catalogs across MVS 3.8J systems, please post your solution to share across the community!

 

 

Tagged ,

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image

This site uses Akismet to reduce spam. Learn how your comment data is processed.