HP3000-L Archives

May 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Woods <[log in to unmask]>
Reply To:
Date:
Wed, 15 May 2002 11:30:38 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
Robert Mills wrote:
> As I told somebody else yesterday: "We have a Cobol program on our
3000 that creates a 252 byte record fixed ascii file. Each record
contains a variable number of characters but is always terminated by a
single-quote. The remainder of the record, up to the 252 byte limit, is
filled with spaces. I then 'tobyte -at' the file to give me a
bytestream, in the HFS domain, with all of the trailing spaces removed.
If I do an 'fcopy;char;hex' to the screen I see that each logical record
in the bytestream file is still being treated as a physical record. I
need to find some way to remove the 'record terminator' that is
preventing fcopy from displaying the whole file as a single record.".
>
> Whatever tobyte is adding at the end of each 'logical' record is what
I need to strip out of the file.

I think that you want to do the TOBYTE with -t (to strip trailing
spaces) but *without* the -a (which says it's an ASCII file... which
implicitly means to insert LF after each record).  Unlike FROMBYTE's -b
option (which means "binary file" and causes FROMBYTE to ignore embedded
LFs and just fill each FB record), TOBYTE doesn't seem to have a way to
specify "binary mode" except (I suspect, but have *not* confirmed) other
than leaving off the -a option.

It wouldn't surprise me if TOBYTE forces -a handling (thereby inserting
the LFs you don't want) if the original file is a FA (or VA or UA) so
you may need to make the original a FB (fixed binary; even if all your
"binary data" is printable ASCII) but I'd try the TOBYTE without the -a
option first to see if it works.

> FTP, transfer type byte-stream, is used to push the file to the remote
system (no info available as to what it is).

I've never (TTBOMR) used FTP's byte-stream transfer type but it might be
doing some of the same "helpful" record format mangling.  If the
suggestions above don't work you might try using the binary transfer
type.
--
Jeff Woods
[log in to unmask]
[log in to unmask]
Quintessential School Systems

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2