[Simh] OpenVMS time conversion routines

Mark Pizzolato Mark at infocomm.com
Thu May 7 09:55:38 EDT 2020


Hi Larry,

Maybe you don't need to do what you're trying to do.

The latest SIMH tape support can let you attach the file in question and have it look to VMS like an ANSI labeled tape to the simulated system.

sim> ATTACH TS0 -FB ANSI-VMS 8192 your-data-file{*}{,otherfiles...}

>From VMS's point of view, the tape will be labeled 'simh', but that doesn't matter too much.  The resulting tape will have the blocking factor specified which defaults to 2048 if you don't use the -B switch.  This will work just fine for files which reasonably were contained on tapes (10's of MB to a couple of hundred MB), but you will run out of memory with arbitrarily large input data since the ansi-tape that is created lives in memory while it is attached.

The dates in the ANSI labels reflect the dates that the host file system had on the tape.  You should be able to find date conversion that is used in sim_tape.c


-          Mark

From: Simh [mailto:simh-bounces at trailing-edge.com] On Behalf Of Baker, Lawrence M
Sent: Wednesday, May 6, 2020 10:28 PM
To: simh at trailing-edge.com
Subject: [Simh] OpenVMS time conversion routines

Does anyone know of any portable OpenVMS 64-bit time conversion routines written in C?  I.e., that do not depend on 64-bit data types so they run on 32-bit machines?  Maybe in the SIMH GitHub?  Out there in the Interland?

I am writing a simtools converter that combines on-disk OpenVMS Backup save sets into a SIMH .tap image of an OpenVMS Backup ANSI tape volume.  I want to use the date the backup was done from the Backup save set header for the ANSI HDR1 Creation Date.

You might ask why?  Lately I have had to restore Backup save sets stored on our NFS file server to SIMH VAXes over a DECnet/DAP-to-NFS gateway I built a number of years ago.  (I wrote to this group about it in a thread about RSTS/E 10.1-L and Paper tape on January 6, 2016.)  It takes about 2 days to restore an ~8GB disk image backup from the NFS server, though the gateway running on an SheevaPlug ARM SoC, to the SIMH VAX running on my desktop iMac.  I am working from home at the moment, of course.  I have become good friends with GNU screen because of SSH inactivity disconnects and VPN failures.  When I tried to restore a 75GB disk, expecting it to take 10-14 days, our "friendly" IT security monsters rebooted my iMac on me after 4 days.  Grrr.  I want to try breaking the NFS file server transfer step from the SIMH VAX restore operation.  OpenVMS is not so easy as RSX was to read /FOREIGN disk drives as files.  I could not figure out a way to just MOUNT a Backup save set as a SIMH disk image and get that to work.  I was able to use Mark's tar2mt converter and, using the proper OpenVMS MOUNT /RECORDSIZE and /BLOCKSIZE qualfiers, was able to read a Backup save set from an unlabeled tape image.  Labeled tapes are easier to use then unlabeled tapes, since the file names and file formats are on the tape with the file data.  I know how to write ANSI tape labels, so I have taken it upon myself as a challenge to write a converter.  I think this is the last piece I need for what I want it to do.  I'll certainly announce it when it is done.

Thank you in advance for your help.


Larry Baker

US Geological Survey

650-329-5608

baker at usgs.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20200507/2c9427ab/attachment-0001.html>


More information about the Simh mailing list