Re: Text file conversion problem (Stream to Runoff)
- From: gerry77@xxxxxxxxxxxxxxxx
- Date: Thu, 17 Jun 2010 07:26:54 GMT
On Thu, 17 Jun 2010 00:41:11 GMT, VAXman- @SendSpamHere.ORG wrote:
vms$ mc teco32
teco prompts with *, and then you type:
erinfile$ewoutfile$ex$$
[...]
There's something slightly bizarre about suggesting TECO (dating back
at least as far as the PDP-8 era) in 2010, but just because it's not
trendy any more doesn't mean it can't still occasionally be useful.
$ EDIT/TECO filename.ext
*ex$$
$
Shorter and simpler.
Thanks for your help. The TECO approach was quite interesting and was close
to what I needed, but unfortunately wasn't enough. In the end the solution
was much simpler than expected: I started fiddling with DCL and produced the
following piece of code. It's a quick'n'dirty hack but does the trick.
I had just to be careful about two points: before running my DCL thing I had
to change the record format of my input files from Stream_LF to just Stream
(not noticed before), to reflect the actual content of them, then the
procedure has to use CREATE to ensure that the output file is a variable
length one and not a VFC, which is how OPEN creates files. Here it is:
$start:
$ on control_y then goto finish
$ infile = f$parse("''p1'")
$ outfile = f$element(0,";",infile)
$ open/read input 'infile
$ create 'outfile
$ open/append output 'outfile
$ cr[0,7] = %x0d
$ lf[0,7] = %x0a
$loop:
$ read/end=finish input line
$ write output line + cr + lf
$ goto loop
$finish:
$ close input
$ close output
$ exit
This creates the hybrid file structure that even Runoff generates and which
is required by that old .MEM to .PS conversion program. BTW, its name is PS
(not a very clever one, indeed), it's written in VAX Pascal plus some Macro,
and should be in a 1985ish DECUS tape. I've no time at the moment to look it
up, but if you're interested... It's there, somewhere. :-)
Bye,
G.
.
- References:
- Text file conversion problem (Stream to Runoff)
- From: gerry77
- Re: Text file conversion problem (Stream to Runoff)
- From: John Wallace
- Re: Text file conversion problem (Stream to Runoff)
- From: gerry77
- Re: Text file conversion problem (Stream to Runoff)
- From: John Wallace
- Text file conversion problem (Stream to Runoff)
- Prev by Date: Re: new VMSINSTAL message
- Next by Date: Re: how to emulate some anonymous FTP behaviour ?
- Previous by thread: Re: Text file conversion problem (Stream to Runoff)
- Next by thread: Re: Text file conversion problem (Stream to Runoff)
- Index(es):