LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (August 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 14 Aug 2004 14:07:28 -0400
Reply-To:     Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:      Re: Running code at exit
Content-Type: text/plain

Not that it helps Steve who's running 8.2, but it's worth noting that SAS 9 offers a TERMSTMT system option where you can specify one or more SAS statements to be automatically executed when the SAS session ends.

The documentation does contain the following warning: "TERMSTMT= is fully supported in batch mode. In interactive modes, TERMSTMT= is executed only when you submit the ENDSAS statement from an editor window to terminate the SAS session."

Mike Rhoads Westat RhoadsM1@Westat.com

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Richard A. DeVenezia Sent: Friday, August 13, 2004 2:25 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Running code at exit

Steve wrote: > I'm developing a system in Frame using SAS v8.02. I have included > some short cuts for the user to exit the system at various points > without returning to the main menu. Most of the short cuts involved > are just issuing the 'END' command from a pmenu. I need to be able to > run a procedure before the user exits from the system. I would like to > be able to trigger this procedure anytime the system closes > reguardless of where or how the user is closing it. The procedure > involves having access to a table and a global variable that exist > within the system. Is it possible to do this? My other option would be > to force the user to return to the main menu and then running the > procedure as part of pressing an 'Exit' command button. > > Thanks in advance > > Steve

You can put a submit continue block in the frames TERM: section. Make the pmenus Exit choice be two commands, END followed by ENDSAS.

-- Richard A. DeVenezia Done being productive? Try SAS Tetris. http://www.devenezia.com/downloads/sas/af?topic=27


Back to: Top of message | Previous page | Main SAS-L page