LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 9 May 2006 12:01:00 -0700
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: GOTO or LEAVE Command
In-Reply-To:  <200605091557.k49BR05f027931@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

pstloui@DOT.STATE.TX.US wrote: >I read a small handfull of L messages concerning GOTO or LEAVE commands and >wonder if anyone has additional thoughts. Back in the old days of DOS batch >file programming, I would set up a user menu with various GOTO commands to >submenus with conditional If statements. This allowed the user to navigate >from one menu option to another. Commands would execute in the background. >Is there a way to effectively utilize the same menu process in SAS? I am >asking because we have some SAS users who want to get a SAS report but >don't want to learn SAS (gasp, I know, but it's true.) I am a little >familiar with Display Manager, but little better than a novice myself. I am >stumped on how to add verification code to bump a user to a standard error >message, or route back to the top of the SAS program to re-display the >menu. Also looking for any good books I can buy, or links to learn about >this. > >I've found some excellent help from many accomplished SAS programmers here, >so I am reaching out again for whatever advice you may offer. > >The basic DOS functionality was as follows: > >:TOP >CALL certain commands > >:MENU > OPTION1 > OPTION2 > OPTION3 >ASK===? > >IF OPTION1 GOTO DATAENTRY >IF OPTION2 GOTO QUERY >IF OPTION3 GOTO REPORTS >IF %USER-RESPONSE NOT 1 OR 2 OR 3 THEN GOTO ERROR > >:DATAENTRY > commands > >:QUERY > commands > >:REPORTS > commands > >:ERROR >ECHO 'ERROR MSG.' >GOTO TOP > >:END >CALL commands to end

Let me suggest that you NOT choose a really horrible coding practice, just because it was what everyone was forced to do in DOS batch files. If DOS batch files required the use of inline assembler code for math, would we still want to do that now? I hope not.

I recommend that you take the apporach suggested by others in this thread. I personally would do it in Perl. There's no reason not to write proper subroutines or objects to handle these tasks, and call them in a normal way.

You can even do that in a SAS data step if you want to (sort of), by using the LINK and RETURN statements.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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