Operating System - HP-UX
1748080 Members
5344 Online
108758 Solutions
New Discussion юеВ

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

 
Robert Larino
New Member

HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

Hello,

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.


Sincerely,

Robert Larino
Advanced Testing Technologies, Inc.
LarinoR@attinet.com
9 REPLIES 9
OldSchool
Honored Contributor

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

Not familiar w/ the product, but this might get you somewhere
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.
Jeff Schussele
Honored Contributor

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

Hi Robert,

You might also try the strings command which allows one to see any strings of text in a binary file.
man strings
for more details.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Robert Larino
New Member

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

Thanks for the replies so far, unfortunately the rmb program is an X window program so when I tried using the script command it logged a bunch of X windows data which just looks like a bunch of gibberish text (and I don't seem to see any of the code that was in the main area of the rmb window. (I am using the Windows XP program Reflection X in order to connect to the HPUX machine) the rmb (HP BASIC) doesn't work on a standard terminal so in order to be able to see anything I have to use an X window server to connect to the HPUX machine.

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!


Sincerely,

Robert Larino
OldSchool
Honored Contributor

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

sorry about that, didn't realize is was X. I don't suppose that their is a "print to file" option in the rmb window (that would be too easy)
Robert Larino
New Member

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

Nope, there's no option within the rmb program itself... however, silly me... I thought I had tried copying text out of the Reflections X window to a text file on my Windows XP machine previously (and unsuccessfully).

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.


Sincerely,

Robert Larino
George Mitchell
Advisor

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

We still use RMB on HPUX or SRM extensively here in my shop.
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.
Robert Larino
New Member

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

Thank you George!

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!


Sincerely,

Robert Larino
herb01
Occasional Collector

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

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.

grazv
Occasional Visitor

Re: HFSLIF Rocky Mountain Basic file conversion to readable ASCII?

type: configure ascii OFF

then save "<name>.txt and you will be able to read in any editor. in case of ON the file will be saved in HP LIF file format which is not compatible to moste editors