I'll be looking up the TT2$M_EDIT call, because I suspect you can many other
things with it I really like doing,

But this is working for tonight and my eyes are insisting on closing...
another day tomorrow!

-Paul

> -----Original Message-----
> From: Richard Maher [mailto:maher_rj@hotspamnotmail.com]
> Sent: Tuesday, July 24, 2007 11:01 PM
> To: Info-VAX@Mvb.Saic.Com
> Subject: Re: Dynamically set VMS "environment" settings from a program?
>
> Hi Paul,
>
> This from page 193: -
>
> TT2$M_EDIT Terminal edit. This characteristic is set by the SET
> TERMINAL
> command for all terminals that support ANSI-defined advanced
> editing functions. These functions include the ability to insert or
> delete a line and the ability to insert or delete characters in an
> existing line. Terminals with this characteristic are a superset of
> TT2$M_DECCRT. Appendix Clists the valid escape sequences for
> terminals with the TT2$M_EDIT characteristic.
>
> You $assign a channel to the terminal then call $qio io$_setmode to
> toggle
> it and then $dassgn before exit to be neat.
>
> I can't swear that the above works (and I'd do it for you if I wasn't
> trying
> to prove a buffer overrun stack-corrupter with Multinet's
> io$_acpcontrol
> inetacp$c_trans inetacp_func$c_gethostbyaddr ) but it sounds about
> right.
>
> > Ah Ian - you are a genius. DO_COMMAND does the job, but it terminates

> the
>
> > CALL "LIB$SPAWN"
> > USING BY DESCRIPTOR WS-USER-COMMAND

>
> If you're happy with that then great, but mate it's not the Sufi way!
> (Well
> not the VMS way anyway :-)
>
> Cheers Richard Maher
>
> PS: Was it AOS/VS that used to spawn a process to do everything?
>
> "Paul Raulerson" wrote in message
> news:004501c7ce6d$5a469240$0ed3b6c0$@com...
> >
> >
> > > -----Original Message-----
> > > From: ian.s.burgess@gmail.com [mailto:ian.s.burgess@gmail.com]
> > > Sent: Tuesday, July 24, 2007 9:41 PM
> > > To: Info-VAX@Mvb.Saic.Com
> > > Subject: Re: Dynamically set VMS "environment" settings from a

> program?
> > >
> > > On Jul 25, 12:12 pm, "Paul Raulerson" wrote:
> > > > Ah HAH! I have at last figured out something that will be

> elementary
> > > to you
> > > > folks, but has annoyed the living daylights out of me for a week

> now.
> > >
> > > >
> > > > Take a typical (green screen) program, it puts up a header at the

> top
> > > of the
> > > > screen, body text, a function key line and a message line at the
> > > bottom.
> > > > Okay, this is more IBM that perhaps VMS green screen programs are
> > > normally
> > > > setup to be, but hey- I have not SEEN any VMS green screen

> programs
> > > other
> > > > than the editors, and *they* can use function keys!
> > > >
> > > > I even figured out how to get into "USER-MODE" and stay there,

> but
> > > for the
> > > > life of me, function keys insist on doing weird and strange

> things -
> > > like
> > > > causing an interrupt when I hit F6 for example.
> > > >
> > > > But I finally found the magic incantation that takes care of

> *that*
> > > > problem... one need only perform a set term/NOLINE_EDITING and

> voila!
> > > The
> > > > doggone function keys work as expected. (From Putty, with VT400

> keys
> > > set,
> > > > and using /DEVICE_TYPE=VT400_SERIES in the set term command...)
> > > >
> > > > Problem is, it actually does turn off terminal editing, and I

> *LIKE*
> > > > terminal editing! So I would like to dynamically turn this

> feature
> > > OFF when
> > > > a program starts, and then turn it back ON when the program

> exits.
> > > >
> > > > How might I go about doing this? In particular from COBOL?
> > > >
> > > > Thanks
> > > > -Paul
> > > >
> > > > P.S. It is okay to refer me to the correct manual; I have

> searched
> > > all
> > > > through the COBOL manuals and I suspect I did not recognize what

> I am
> > > > looking for. -Paul
> > >
> > > Paul,
> > >
> > > Calling LIB$DO_COMMAND from Cobol seems like an easy option.
> > >
> > > Ian

> >
> >
> > Ah Ian - you are a genius. DO_COMMAND does the job, but it terminates

> the
> > cotton picking executable that calls it.
> > However, LIB$SPAWN works just great to do the same thing, with the

> advantage
> > I don't have to clean up on the way out - the setting appears to be

> held
> > only through execution of the main program.
> >
> > Thanks
> > -Paul
> >
> > In the most simple form, the call is:
> > 77 WS-USER-COMMAND PIC X(127) VALUE SPACES.
> > ..
> > ..
> > ..
> > CALL "LIB$SPAWN"
> > USING BY DESCRIPTOR WS-USER-COMMAND
> >
> >

>