🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: mod.computers.vax
Article #4060

RE: SET HOST/LOG output problems

#4060
From: DHASKIN
Date: Fri, 03 Apr 1987 19:31
59 lines
3396 bytes
> I don't know if this has been submitted to the net before, but I've noticed
> pecular occurance when using the SET HOST/LOG sequence to capture output from
C
> programs using the printf statement.  For instance, the following segment of
> code will print one line and a carriage return to the screen:
>
>                printf("The quick brown ");
>                printf("fox jumped over ");
>                printf("the lazy dog.\n");
>
> This results in:
>                   The quick brown fox jumped over the lazy dog.
>
> However, when running the program after doing a SET HOST/LOG, the output
> in the log file contains:
>                            The quick brown
>                            fox jumped over
>                            the lazy dog.
>
> ...even though the output seen on the screen is correct.  Using DEFINE
> SYS$OUTPUT PROG.LOG to capture the output works as expected, writing one line
> to PROG.LOG.
>
> Anyone got any clues?

I've seen it as well, though not in C; a student came with a Macro program
that was doing similar i/o, and the same problem resulted.  Interesting,
though; to prove that it was a language-independent problem I did the same
thing in Pascal:

          write('The quick brown fox');
          write(' jumped over');
          write(' the lazy dog.');

But to my surprise the SETHOST.LOG file here was okay!  I surmise, then,
that it has to do with how your particular language is handling its i/o
at the lower level.

The problem stems from the fact that that you are writing separate records
to the terminal, although you are saying 'hold the carriage returns and
line feeds'.  Unfortunately, they are still separate records and once they
hit that log file RMS keeps that information.

The fix would probably need to be done in RTTDRIVER or RTPAD.  In fact,
while you're there, DEC, why don't you keep it from putting in the annoying
C/R, L/Fs but handle it like a usual test file?  I use SET HOST/DTE a lot
to access DEC's Software Information Network (since there is no file transfer
support) and it is frustrating to have to strip them out (although admittedly
I've got TPU doing it for me now).

Anyone have any further suggestions?

% Denis W. Haskin                             Manager, Technical Services %
% ----------------------------------------------------------------------- %
% DHASKIN@CLARKU.BITNET   Office of Information Systems     (617)793-7193 %
% Clark University               950 Main Street      Worcester MA  01610 %
%                                                                         %
% "Anyone who _moves_ before Most Holy comes back out will spend the rest %
%  of eternity sipping lava through an iron straw."        - Cerebus      %
Technical Details
Message-ID: <8704040341.AA08699@ucbvax.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ucla-cs!ames!ucbcad!ucbvax!CLARKU.BITNET!DHASKIN

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ucla-cs!ames!ucbcad!ucbvax!CLARKU.BITNET!DHASKIN
From: DHASKIN@CLARKU.BITNET.UUCP
Newsgroups: mod.computers.vax
Subject: RE: SET HOST/LOG output problems
Message-ID: <8704040341.AA08699@ucbvax.Berkeley.EDU>
Date: Fri, 3-Apr-87 14:31:00 EST
Article-I.D.: ucbvax.8704040341.AA08699
Posted: Fri Apr  3 14:31:00 1987
Date-Received: Sun, 5-Apr-87 08:26:24 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 59
Approved: info-vax@sri-kl.arpa