Setting the timezone by patching the system with RAMROD and *OBJUTIL

D6.0A uses the US Eastern Standard timezone by default. In this post we will look at how to set the timezone to something different, which will lead us on to how to patch the system using the RAMROD and OBJUTIL utilities.

The TABLES assembly

As MTS was run on a small number of mainframes, the timezone is set inside the resident code of the system rather than by a command. The relevant code is TABLES; you can see the source assembly code in UMPS:UMTABLES#SA

   359              SET   YEAR=87,TIMEZONE=EST

which references a macro in copy:tables*sal

  1500              MACRO
  1501              TIMEZONE &Z
  1517     .L4      AIF   ('&Z' NE 'EST' AND '&Z' NE 'CDT').L5
  1519              AGO   .OUT

Normally you would change the code, assemble it and reboot. But this requires the ASMH assembler, which is a licensed IBM product that cannot be distributed with MTS. The alternative, which we will look at here, is to patch the object code with the desired value.


An overview of the steps we will take


RAMROD is used to keep track of a set of object decks and combine these into a file suitable for IPL. ‘Decks’ refers to the older practice of using a deck of punched cards to boot the system; on MTS thankfully this is done using files stored on disk.

A set of object decks is combined into a system. You can see the systems currently defined, and the current system, with the list systems and list current commands in RAMROD. RAMROD can be run as the MTS user as follows; RAMROD commands are given at the ~ prompt:

# $run mts:ramrod
 Using file "RMRD:ROD"
~ list systems
 D6.0A-AN172 created from AN152 23:05:42 01-17-12
 AN152 created from AN062 23:29:05 01-15-12
 AN062 created from AN052 01:13:12 01-06-12
 AN052 created from D6.0SYS.600/MP 19:49:40 01-05-84
~ list current 
 D6.0A-AN172 created from AN152 23:05:42 01-17-12
 Patch the timezone name and timezone offset in TABLES to be EST
 and GMT minus 5 rather than EDT and GMT minus 4. (jco)

So we can see the current system is D6.0A-AN172, the comment made when creating the system (which was to set the timezone to EST) and the history of previous systems.

You can see a list of decks that make up the system with list decknames; a snippet is below:

 SEG0.NCA (SEP17-81)
 TABLES.MP (AN172) patched

TABLES.MP is the deck we want. We can see a list of the patches already applied in the below:

~ list sys cur deck patches
 TABLES.MP (AN172) patched changed
 REP  004088  0400030001,00000240,00000030,000002A0,00000180 Rearrange OPERDEVS 01:26:36 01-06-12 MTS.
 REP  000180  01F1F0F5F2 CON1 IS A 1052 01:26:51 01-06-12 MTS.
 REP  003F8A  04,FED4 Make the timezone offset -300 (GMT minus 300 minutes or 5 hours)
 REP  003F8C  04,C5E2E340 Make the timezone name "EST"

What we want to do is extract the TABLES.MP deck to a file, so we can edit it outside the system using *OBJUTIL. Use the copy command to do this; let’s store this to the temporary file -tables:

~ copy current -tables

Exit RAMROD for now with stop.


*OBJUTIL is used to edit a deck. Pass the file to be edited as unit 0:

# $run *objutil 0=-tables
 OBJUTIL VERSION(PR137) 08:22:26 10-21-14

*OBJUTIL accepts commands at the * prompt. First, let’s get a listing of the values in the deck using the map command:

* map

  Symbol Type Esid Address Length AF

   Module: TABLES    Size = 0041C8
  TABLES   SD 0001 000000 003E0E     $HSPMNDV LD      0040FC 0004
  TIMEZONE LD      003F8A 0004       TIMZONTB LD      003F94 0004

The timezone is encoded as a half-word (16 bit) offset in minutes from GMT followed by a 8 character string giving the timezone name. We can use the display command to see the current values, using the type and length modifiers:

* display@type=h timezone
  TIMEZONE  'H'  -300
* display@type=c@len=8 timezone+2
  TIMEZONE+2  'C'  "EST     "

We’ve confirmed the current setting is GMT minus five hours, name “EST” padded with blanks. Let’s now set it to the value we want; I’m going to use plain GMT which is zero offset but you could use any positive or negative value. Use the modify command with the @repgen modifier to create a REP card to set each part of the value

* modify@repgen timezone H'0'
  TIMEZONE WAS 'H'  -300 NOW 'H'  +0
  Enter comment for REP card:
? Set timezone to GMT

* modify@repgen timezone+2 C'GMT     '
  TIMEZONE+2 WAS 'C'  "EST     " NOW 'C'  "GMT     "
  Enter comment for REP card:
? Set timezone name to GMT

A REP cards means we are adding a line to change the object file rather than changing the existing contents of the file. Note that it prompts for a comment after each change; terminate this with a blank line.

To be sure, we can now display the new values;

* display@type=h timezone
  TIMEZONE  'H'  +0
* display@type=c@len=8 timezone+2
  TIMEZONE+2  'C'  "GMT     "

Use stop to get out of *OBJUTIL.

Back to RAMROD

Run RAMROD again and create a new system from the current system to incorporate your changes:

# $run mts:ramrod
  Using file "RMRD:ROD"
~ create D6.0A-CT214
  ** Fromsystem = "D6.0A-AN172"
  & OK
? ok
  Enter comments:
? 2014-10-21 Modify timezone

The new system name D6.0A-CT214 needs some explanation. The D6.0A is obvious; the CT214 comes from a convention for naming releases that is described in the distribution driver file:

            1.   The name of the system installed is changed to the "model
                 number" of the date it is installed, e.g. "AY108" for May 10,
                 1978. [2nd and 3rd letters of the month name, two digit day
                  of the month and one digit year.]

So this system I am creating was made on October 21, 2014.

Next, replace the TABLES deck with the one you just edited; supply a comment and leave the version code blank:

~ replace from -tables
  Enter comments:
? 2014-10-21 Modify timezone to GMT
  Enter version code:
  ** REPLACE deck "TABLES.MP" from file "-TABLES" :
  & OK
? ok

You can list the patches again, to be sure:

~ list deck patches
 TABLES.MP (OCT21-14) patched changed
 REP  004088  0400030001,00000240,00000030,000002A0,00000180 Rearrange OPERDEVS 01:26:36 01-06-12 MTS.
 REP  000180  01F1F0F5F2 CON1 IS A 1052 01:26:51 01-06-12 MTS.
 REP  003F8A  04,FED4 Make the timezone offset -300 (GMT minus 300 minutes or 5 hours)
 REP  003F8C  04,C5E2E340 Make the timezone name "EST"
 REP  003F8A  04,0000 Set timezone to GMT
 REP  003F8C  04,C7D4E34040404040 Set timezone name to GMT

Finally, use the current command. This will check the system and write to the IPL files:

~ current
 There are 4 IPL files with prefix "*IPL.   "
 Loading system D6.0A-CT214 using the UMLOAD deck it contains.
 LOAD: Resident: 2000-5DFC8 UMLOAD Psect: B0000 Pageable: DD000-191A70 End: 1DCFFF
 Contents of IPL file "*IPL.3":
 AN052 ENTRY=56D18 PSECT=100008 VIRTUAL=B0000...191A70 VIRTUAL_START=100000 UMLOADTV=2000
 COM 18:50 Jan 05 - Replace RSF to fix the halfword date problem.
 ** Write system "D6.0A-CT214" to IPL file "*IPL.3":
 & OK
? ok
 System "D6.0A-CT214" has been written to  IPL file "*IPL.3"
 IPL file stacked has been pushed.
 System "D6.0A-CT214" is now the current system.
 "D6.0A-CT214" : Released.
 System "D6.0A-CT214" has been Frozen.

The moment of truth

Get out of RAMROD with stop and then reboot the system as normal. When it comes up you should get a warning that the timezone has changed, which you can just ok.

 00000   ** UMMPS/XA ** assembled 04/19/88
 00000 CONFIG CPU 0000 online
 00000 CONFIG CPU 0001 online
 00001 INIT Time and date have been set to  14:45:22 on 10-21-14.
 00002 OPERATOR   Started at 14:45:22 on 10-21-14  Model 3090 Serial 000611
 00002 OPERATOR   Using display DS01 & printer CON1 (1052)
 00004 MTS  Timezone "GMT" is different from timezone during last IPL ("EST").
 00004 MTS  If you are sure the time is set correctly, enter "OK" to proceed wit
 00004 MTS   IPL; otherwise re-IPL now.

Later on in the boot sequence you can see the new system:

00004 MTS  Reload at 14:45:56 on 10-21-14.  Model: IBM 3090/FF  Serial: 611
00004 MTS  System: D6.0A-CT214 written at 08:34:51 on TUE OCT 21/14.

And that’s it! The operator’s console will now show the correct time for your timezone, as should the display time command from MTS.

Further information

There’s a summary of this process in the D6.0A FAQ and I also found the conversation between Ron Frederick and Jeff Ogden on the H390-MTS Yahoo list useful to understand the steps required.

Original instructions to new sites on patching the system deck can be found in the D6.0-NOTES.txt file in the distribution archive.

RAMROD has a write-up in file RMRD:RAMROD*PF, with the wonderful introduction:

         Cards were made for salesmen and bridge players and in that
    domain they should have undoubtedly remained. Their passing will
    not be mourned by those enlightened programmers  who  have  seen
    fit to rise above the hardcopy world and to place their faith in
    the wonderous MAGNETIC MEDIUM.

*OBJUTIL is described in Volume 5 of the MTS documentation. You can bypass *OBJUTIL and use the patch command in RAMROD, but *OBJUTIL has much better facilities to enter number and character patches, and to check your work. Using patch you have to find the address of TIMEZONE, the ESDID where it located, and convert the offset and the timezone description (in EBCDIC, not ASCII!) to a sequence of hex characters, eg

  Address Esdid Text <comments> :
? 3F8A 4 0000C7D4E34040404040


comments powered by Disqus