10-03-2006 05:29 AM
I have been trying to figure out how to accomplish this task for over a month now to no avail.
I was given some old RMB HP source code (written by the instruments division before they turned into Agilent). The source code was supplied in 2 different archive forms. One form packed using packSRM. As per HP's README file: "Using these files presumes that the target system is an SRM system
connected via an HP 98562A or equivalent DIO card to your HP-UX workstation.
If this is not the case, these files will be corrupt after copying them to
an HFS file system."
Also supplied were some plain old unix shell archive files which I was able to extract using a linux system I have at my disposal. I have extremely limited, remote access to an old HPUX system (with which I have extremely limited experience... I have unix/linux experience, no HPUX experience) so I have been trying to look for a way to parse these files into readable HP BASIC ASCII.
After extracting the files I have numerous directories filled with HFSLIF files with no file extension, each containing a single "WS_FILE" inside of it with an RMB source code module.
I was able to open these source files using the RMB program on the old HPUX system, displaying the source code in a readable manner, however, I can't figure out how to get this text out of the RMB program into some plain text files.
I do not wish to run this code, I only wish to be able to read/search it in some form of hard copy text format (on a PC).
I've also tried opening these exact same files using TransEra HTBASIC 9.0 on a PC, however, it is unable to make any sense of the files.
I've toyed around with the LIFUTIL programs but these have not been helpful because the LIF files exist on the PC's hard drive. I have not been able to create a LIF disk using the PC and LIFUTILs.
If anyone out there has gone through a similar situation and can offer any advice if would be much appreciated.
Advanced Testing Technologies, Inc.
10-03-2006 06:26 AM
as an absolute "brute-force" method:
* login to the hpux system that allows you to view the code
* run the "script" command, should get message "Script started, file is typescript"
* then do whatever it was that allowed you to view the source
* when done viewing all code, exit to command prompt
type "exit", should get message "Script done, file is typescript"
at that point, everything seen on on-screen or typed should be in file "typescript".
Copy that file someplace else and edit as necessary.
As noted, this isn't elegant, but it should get you there.
10-03-2006 06:36 AM
You might also try the strings command which allows one to see any strings of text in a binary file.
for more details.
10-03-2006 08:12 AM
The strings command was also useful, but the HP BASIC source code contained in these HFSLIF files are not simply plain text code... the source code is littered with what look like extended ASCII characters (signifying different HP BASIC keywords and such)
If there was some easy way to parse the text into HP BASIC source as it appears when opening the file using the rmb program on the HPUX machine then I would go right ahead and write a program to do it... it doesn't seem obvious though, I can't find any information about it. I am also curious about this LIF file format because HTBASIC (HP BASIC for Windows) cannot open these files either (there are "LIF ASCII", and "HP LIF ASCII" file options in HTBASIC). Unfortunately I only have the demo version of HTBASIC which is unable to save files, so I am unable to compare the LIF header from these file types to the headers in the HFSLIF files that I was given.
Anyway, thanks for the help so far!
10-04-2006 03:22 AM
10-04-2006 03:46 AM
I just tried it again and it works. Drag the mouse over all of the text on the current screen to select it all then click on the top left icon on the X window (Reflections X)... "Copy Selection...", "Copy to: Clipboard"... and there's the text...
ugh, thanks for all the suggestions though guys.
So this is what I did FYI:
Connect to HP-UX system from a Windows XP machine using Reflections X (or you could probably do the same with a linux machine running X windows, I didn't try this).
Open the HP BASIC source files with RMB (in this case, '/usr/bin/rmb -display blah SOURCEFILE'). Using Reflections X without passing the -display parameter to RMB it would open in a new window and would be unusable for some reason. I don't know enough about this stuff to know why but it would open rmb in the current window and would be usable after passing the -display parameter with anything following it.
Select text then click on the Reflections X icon in the top left part of the title bar. Choose "Copy Selection..." "Copy to: Clipboard". And paste into your favorite text editor on your local machine.
This is still pretty tedious and you have to copy as much text as you can, paste it, then page down and repeat until you get all of the code that you need but it works. If anyone finds an easier way please let me know.
10-04-2006 05:27 AM
The files can be either 'STORED' as a binary or 'SAVED' as ascii. If you only have the binary files the only way to convert them is to get RMB.
You will want to contact www.tamsinc.com.
They still sell RMB and SRM.
10-04-2006 05:51 AM
Unfortunately none of the guys left at my company were familiar with the HP-UX system and I couldn't locate any documentation for the RMB program.
The "SAVE" command in RMB worked perfectly.
Thank you so much!
02-04-2014 10:44 AM
I have RMB source code in saved and stored format on HP Cartridge HP92245L 1/4 " streamer tape and HP Diskettes HP92192A for Diskette Reader 9122D - would like to port the code to my Windows Desktop TransERa HTBasic 10 System. Unfortunately I have no access to an HP workstation with the named peripherals. Do you know of anyone that has access to these workstations and can read the code and make it available in ASCII format for transfer to HTBasic. Your views and comments would be much appreciated.