[Info-vax] DCL output no line feed
jbriggs444
jbriggs444 at gmail.com
Fri Jan 22 15:24:42 EST 2010
On Jan 22, 9:14 am, koeh... at eisner.nospam.encompasserve.org (Bob
Koehler) wrote:
> In article <bMZ5n.60417$Db2.50204 at edtnps83>, "Jerry Alan Braga" <jerry.br... at hotmail.com> writes:
>
> > Is the any way in and DCL command procedure to output to the screen without
> > advancing to the next line?
>
> READ/PROMPT may be exactly what you're looking for, but beware of
> reading a symbol substitution.
>
> You can come close by using a WRITE, including the ANSI cursor control
> to return the cursor to the previous line (I've done that). You'll
> probably have to know the exact length of the line you're writing,
> and if you do this at the bottom of the screen you'll probably end
> up with a blank line there.
>
> Or you can write a simple program that you run from the DCL script.
>
> There is also INQUIRE, but beware of reading a symbol.
Surely with $ READ /PROMPT in an environment where you're actually
interested in generating
output rather than retrieving input you'll be dropping the resulting
input on the floor rather than carelessly using it with apostrophe
substitution..
As far as I know, it's safe to use constructs such as:
$ IF input .eqs. "blah"
$ IF f$extract(0,1,input) eqs. "'"
$ WRITE SYS$OUTPUT "this is input ", input
But if you try
$ If 'input .eqs. "blah"
$ If F$extract(0,1,"''input'") .eqs. "'"
$ WRITE SYS$OUTPUT "this is input ''input'"
then you could be in trouble. Apostrophe substitution can lead to
expression evalation which, in turn, can have various side effects
such as turning on command verification or overwriting DCL symbols.
Your code may not be tolerant of a redefinition of "IF"
[The rendition of back to back apostrophes may be difficult to
recognize]
I seem to recall some trickery with $ CONVERT and some terminal FDL
attributes, but always ended up using READ SYS$COMMAND in my own
code. As I think more, it may be the case that terminal FDL settings
have no effect when CONVERT's output is to a PPF
More information about the Info-vax
mailing list