Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Subject: How to edit a binary file ?

Original Message
Name: Magnus G
Date: January 22, 2003 at 12:30:59 Pacific
Subject: How to edit a binary file ?
OS: OpenVMS 6.2
CPU/Ram: Vax 4000-90 with 80 MB
Comment:
Hi,
I would like to edit a binary file, it is a HPGL plot file extension *.hpp that I would like to add (append) some esc. codes and text to ? How can I do that and still keeping the file format for printing ? In the editor (EDT in this case) I will lose the record length... My brain is lost in space... Any idea someone...?

Best Regards, Magnus



Report Offensive Message For Removal

Response Number 1
Name: Magnus G
Date: January 24, 2003 at 14:25:53 Pacific
Subject: How to edit a binary file ?
Reply: (edit)
Hi again,

Please is there anyone who could give me a hint... or tell me to be more specific in my question maybe ?
I am trying with the old EDT editor but so far no luck, I have FORTRAN 77 installed on this computer if someone can give me an idea using that...
My thoughts so far is to find a way how change the fixed lenght of the HPGL/2 file to be able to edit it and maybe then add the change I want to make and then convert it back to original format for printing...

Best Regards,
Magnus


Report Offensive Follow Up For Removal

Response Number 2
Name: ME
Date: January 25, 2003 at 19:18:06 Pacific
Subject: How to edit a binary file ?
Reply: (edit)
I'm not sure if I understand your problem. Maybe you could post a "DIR /FULL" of the unedited and edited file?

Have you tried to edit it with TPU ? When you do a 'set keypad edt' as first editor command, it will be like edt.

Have you tried to convert it with a FDL of the unedited file ? so :
$ ANALYZE /RMS /FDL myfile.hpp
$ EDT myfile.hpp
*EXIT
$ CONVERT /FDL=myfile.fdl myfile.hpp newfile.hpp

Have you looked at the SET FILE /ATTRIBUTE command ?


Report Offensive Follow Up For Removal

Response Number 3
Name: Magnus G
Date: January 27, 2003 at 14:12:42 Pacific
Subject: How to edit a binary file ?
Reply: (edit)
I have after received some corrupted files in the HPGL format, but that is an other story... finally got a solution.

The HPGL file is with fixed length 512 byte records and file organization is sequential (using DIR/FULL). I can not use edit, that is still a question? Records are too big and will be truncated to 255 characters but my first goal was to append some strings and that is achieved.

Thank You ME for giving me the good advice to use convert.

With CONVERT/APPEND/PAD="NULL" append_file old_hpgl.hpp - where the append_file is my stuff for adding some lines just containing some text and esc codes (using EDT) to the old file and fill it with null characters, the result is ok! That means it is printable and looks perfect.

I will "dig" some more to see if I can in some way also convert it for direct editing?
Using the suggestions You gave me ME, thanks again!


Report Offensive Follow Up For Removal

Response Number 4
Name: ME
Date: January 29, 2003 at 11:49:30 Pacific
Subject: How to edit a binary file ?
Reply: (edit)
EDT only supports files with a maximum record length of 255. So unless you write a program that chops the records in half, it is unusuable.
TPU supports files with a much longer record length (4096 ?). So that may be an option to edit them direct. If you set the keypad to EDT it will look quite similar (although slower) like EDT :

$ EDITX /TPU myfile.hpp

Then hit the top right key at the numeric keypad (PF4/the minus), and type : SET KEYPAD EDT


Report Offensive Follow Up For Removal

Response Number 5
Name: BiHappy
Date: January 30, 2003 at 03:33:56 Pacific
Subject: How to edit a binary file ?
Reply: (edit)
Hello Magnus,

What you could try is the following,
First save the File Definition of the file with

ANALY/RMS YOURFILE.HPP /FDL
This creates a YOURFILE.FDL
Now edit the file with your favorite editor ;-)) and save it.
Then

CONVERT /FDL=YOURFILE.FDL YOURFILE.HPP YOURNEWFILE.HPP
This should restore the file definitions to the orginal file.....

Hope this will work,
Goodluck,
Jo


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: How to edit a binary file ?

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software



Version Tracker Pro
Keep your software current and secure, effortlessly

Click Here for a Free Scan

Driver Agent
Automatically find the latest drivers for your computer.
Click Here for a Free Scan



The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC