OPEN "BAT.FL" TO BAT.FL ....
*
BAT=""
BAT<-1>="C:"
BAT<-1>="cd \...\...\path\to\remote\account"
BAT<-1>="...uv\bin\uv TCL_CMD_TO_RUN"
*
BAT.KEY="REMOTE_"@USERNO:".BAT"
WRITE BAT ON BAT.FL, BAT.KEY
TCL="DOS /c ":DQUOTE("...\PATH\TO\BAT\FILE\":BAT.KEY)
EXECUTE TCL CAPTURING OUTPUT
Where:
"BAT.FL" can be a type19 file "somewhere" on your system.
"..\..\path\to\remote\account" is the physical path to the remote account.
"TCL_CMD_TO_RUN" will be a program, proc, etc. to run on the remote account.
"..uv\bin\uv" is path to the uv.exe program.
This will launch a session, execute the command and return the output to you.
You will need to check the @TTY of the remote account to prevent launching the
2nd session into a menu etc. ("Console")
... david ...
David L. Wasylenko
President, Pick Professionals, Inc
w) 314 558 1482
[email protected]
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Friday, July 27, 2012 10:42 AM
To: [email protected]
Subject: [U2] Running a command in a different account
Greetings!
We have a program that runs in one account, but under certain conditions it is
becoming necessary for that program to execute a command in another account,
and then continue on its merry way doing other things. One fairly simplistic
example might be that the process might find it necessary to create a file in
another account.
We have come up with a number of different ways of accomplishing this, but all
involve a "phantom" LOGTO of some sort -whether it be through working with the
UV.ACCOUNT file, the LOGIN paragraph, or some combination of the above. While
this will do what is necessary, there are timing issues to consider, control
and response issues, error checking, etc. It can be done, but it's not pretty.
Does anyone have a more elegant and efficient way of accomplishing this?
Thanks in advance!
Brian F. Paige
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _
The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material not
intended for Public use.
Any review, retransmission, dissemination or other use of, or taking of any
action in reliance upon, this information by persons or entities other than the
intended recipient is strictly prohibited. If you received this communication
in error, please notify the sender and delete the material from any and all
computers or devices.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users