Xref: utzoo bit.listserv.novell:8559 comp.sys.novell:414 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!milton!ogicse!pdxgate!parsely!percy!qiclab!techbook!kenh From: kenh@techbook.com (Ken Haynes) Newsgroups: bit.listserv.novell,comp.sys.novell Subject: Re: Can't get IF..THEN..ELSE to work in login script Message-ID: <1991Jan25.183641.19038@techbook.com> Date: 25 Jan 91 18:36:41 GMT References: <28114.279d8fb3@kuhub.cc.ukans.edu> Organization: TECHbooks of Beaverton Oregon - Public Access Unix Lines: 41 In article <28114.279d8fb3@kuhub.cc.ukans.edu> mcginnis@kuhub.cc.ukans.edu writes: >We have not had any luck with getting IF ... THEN ... ELSE >statements to execute without error in login scripts. We have >tried upper and lower case for the commands. The IF statements >work fine. The else statments always return an error. Any >line with an else statment fails to parse > > >We have been trying the example on page 298, appendix A of >Novell 386 Installation manual. > >Here are some examples of what we have tried: > >IF DAY_OF_WEEK="Wednesday" THEN WRITE "Wed" ELSE WRITE "Else statement" > >IF DAY_OF_WEEK="Wednesday" THEN WRITE "Wed" >ELSE WRITE "ELSE STATMENT" > >IF DAY_OF_WEEK="Wednesday" THEN >WRITE "Wed" ELSE WRITE "ELSE STATMENT" > >plus other combinations. > >What are we doing wrong? Try using the BEGIN construct with your IF constructs. IF THEN BEGIN statement statement END The BEGIN must appear on the same line as the IF and the THEN. Ken -- ****************************************************************************** Network Support Services: Ken Haynes, Certified Netware Engineer