<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Mark,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You are right.  This may already take care of what I am doing!  One thing I do is read the BACKUP /BLOCKSIZE from the save set file and stuff that into the HDR2/EOF2 label.  What I have with are save sets that were written to disk, so the block size is 32256.
  That is still within the limits of the byte count registers on the hardware, and the Block Length and Record Length fields in the ANSI HDR2 label.  I will compare the built-in SIMH ANSI support with my ANSI conversion using my mag tape analyzer program on
 my SIMH VAX and let you know if I find anything squirrel.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I did first try to find what tape formats SIMH supported.  I did not see the ANSI option.  There were four options in the instructions I found, as I recall.  That was news to me.  (I like the 7-track support!)  I find it difficult to locate documentation and
 instructions for SIMH.  Like, what are the command line options?  ./vax -h doesn't work.  I'll work harder to learn where everything is now that it is on GitHub.</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">Larry Baker</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">US Geological Survey</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">650-329-5608</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">baker@usgs.gov</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><br>
</p>
</div>
</div>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Mark Pizzolato <Mark@infocomm.com><br>
<b>Sent:</b> Thursday, May 7, 2020 6:55 AM<br>
<b>To:</b> Baker, Lawrence M <baker@usgs.gov>; simh@trailing-edge.com <simh@trailing-edge.com><br>
<b>Subject:</b> [EXTERNAL] RE: OpenVMS time conversion routines</font>
<div> </div>
</div>
<div lang="EN-US">
<div class="x_WordSection1">
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Hi Larry,</span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Maybe you don’t need to do what you’re trying to do.</span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">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.</span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">sim> ATTACH TS0 -FB ANSI-VMS 8192 your-data-file{*}{,otherfiles…}</span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">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. </span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">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</span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<p class="x_MsoListParagraph" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt 0.5in; font-size: 12pt; font-family: "Times New Roman", serif;text-indent:-.25in">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"><span style="">-<span style="font:7.0pt "Times New Roman"">         
</span></span></span><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D">Mark</span></p>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D"> </span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif"> Simh [mailto:simh-bounces@trailing-edge.com]
<b>On Behalf Of </b>Baker, Lawrence M<br>
<b>Sent:</b> Wednesday, May 6, 2020 10:28 PM<br>
<b>To:</b> simh@trailing-edge.com<br>
<b>Subject:</b> [Simh] OpenVMS time conversion routines</span></p>
</div>
</div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
 </p>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">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?</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">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.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">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 <span style="background:white">
NFS file server</span> 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.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">Thank you in advance for your help.</span></p>
</div>
<div>
<p class="x_MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
</div>
<div>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper">
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">Larry Baker</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">US Geological Survey</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">650-329-5608</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black">baker@usgs.gov</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman", serif;">
<span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>