Kevin --

It appears to be working as expected for me (see below). Could there be an error generated that is being trapped and sent to the GTM> prompt for you? It would help to identify the conditions under which you are seeing the anomalous behavior.

-- Bhaskar

----------------------------------------------
bhaskark ~/demo 1:29pm 1029: cat zsytest.m
zsytest W "Making connection...",!
        zsy "telnet pinole"
        W "Done with connection",!
        Q
bhaskark ~/demo 1:29pm 1030: mumps -run ^zsytest
Making connection...
Trying 10.132.37.32...
Connected to pinole.
Escape character is '^]'.
Red Hat Enterprise Linux WS release 3 (Taroon Update 5)
Kernel 2.4.21-27.0.1.ELsmp on an i686
login: kbhaskar
Password:
Last login: Wed Jun 22 13:28:09 from 10.132.38.92
pinole ~ 1:29pm 1000: exit
logout
Connection closed by foreign host.
Done with connection
bhaskark ~/demo 1:30pm 1031:
----------------------------------------------

Kevin Toppenberg wrote:
I want to make a menu option that allows users to
connect to our legacy medical record system.  It is
accessed via a telnet (we're behind a hardware
firewall, so this unsafe telnet is ok).

I could probably do this in a one-liner, but its not
working properly, and I can't tell why.  Here is the
menu option I created to call my function:


NUMBER: 10055                           NAME: TMG
CONNECT TO MEDIC
  MENU TEXT: Connect to Medic           TYPE: action
  CREATOR: TOPPENBERG,KEVIN S           PACKAGE:
MEDICAL GROUP OF GREENEVILLE
  DELEGABLE: YES                        E ACTION
PRESENT: YES
  ENTRY ACTION: DO TELNET^TMGMEDIC      UPPERCASE MENU
TEXT: CONNECT TO MEDIC


And here is the function:


TELNET
 ;"Purpose: to telnet to medic server (AIX)

 new HookCmd
 set HookCmd="telnet medic"
 zsystem HookCmd

 write !,!,"Done.  Returning to VistA",!
 new temp read "Press Enter to
Continue...",temp:$get(DTIME,3600),!

 quit



When I execute the function, all is fine.  I am taken
to a prompt to log into the other computer.  That all
works fine.  When I leave that computer by logging
off, I then am shown the message "Press Enter to
Continue..". Thus control has returned to my function.
 When I press enter, the function quits.  At that
point, I should be taken back to the menu system.
Instead, I am taken to a GTM prompt.  Big problem.

It looks like somehow the GT.M zsystem command is
changing the call stack, so that the quit doesn't go
back to the menu.  What's going on?

Kevin



____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click <http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click>
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to