Subject: VAX file utility

From: phjj at ruchem.ru.ac.za
Date: Tue, 24 Nov 1992 13:36:34 GMT

Before our recent disasterous disk crash I used to have a utility that
converted 512 byte block files to 2880 byte record files.  I seem to
remember it was a fdl script.  Please e-mail me where I can recover
this utility.
Thanks
Justin

---

From: hanisch at stsci.edu (Bob Hanisch, ST ScI)
Date: Tue, 24 Nov 1992 16:13:05 GMT

Here's a copy of the VMS command file that reblocks files to 2880 byte
records.  

$!----------------------------------------------------------------------
$!   FIXFITS filename
$!   FIXFITS CONVERTs a file to the desired AIPSFITS disk format
$!----------------------------------------------------------------------
$ create/fdl=sys$input: temp.dat
RECORD
       CARRIAGE_CONTROL        NONE
       SIZE                    2880
       FORMAT                  FIXED
$!                                      now convert - old fails some
$! convert/append 'P1' TEMP.DAT
$!                                      now convert - new method
$ copy 'P1' TEMP.DAT/overlay
$ rename temp.dat 'P1'
$!                                      clean up
$ purge 'P1'
$!

---
Robert J. Hanisch                       Tel. (410)338-4910   Fax. (410)338-5090
Space Telescope Science Institute       NSI: hanisch at stsci.edu [130.167.1.2]
3700 San Martin Drive                   DECNet: STSCIC::HANISCH [6549::] 
Baltimore, MD  21218  USA               Bitnet: hanisch at stsci

---

From: carl at SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Date: 27 Nov 1992 21:15:38 GMT

In article <1992Nov24.161305.29948 at stsci.edu>, hanisch at stsci.edu (Bob Hanisch, ST ScI) writes:
=Here's a copy of the VMS command file that reblocks files to 2880 byte
=records.  
=
=$!----------------------------------------------------------------------
=$!   FIXFITS filename
=$!   FIXFITS CONVERTs a file to the desired AIPSFITS disk format
=$!----------------------------------------------------------------------
=$ create/fdl=sys$input: temp.dat
=RECORD
=       CARRIAGE_CONTROL        NONE
=       SIZE                    2880
=       FORMAT                  FIXED
=$!                                      now convert - old fails some
=$! convert/append 'P1' TEMP.DAT
=$!                                      now convert - new method
=$ copy 'P1' TEMP.DAT/overlay
=$ rename temp.dat 'P1'
=$!                                      clean up
=$ purge 'P1'
=$!

A cleaner way to do it under version 5 VMS is:

$	IF P1 .EQS. "" THEN -
$		READ/PROMPT="Input file: " SYS$COMMAND P1
$	IF P2 .EQS. "" THEN -
$		READ/PROMPT="Output file: " SYS$COMMAND P2
$	EXCHANGE/NETWORK/FDL=SYS$INPUT: 'P1' 'P2'
RECORD
	FORMAT			FIXED
	SIZE			2880
	CARRIAGE_CONTROL	NONE
$	EXIT
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL at SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.