Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!cbnewsc!santol From: santol@cbnewsc.ATT.COM (shawn.r.antol) Newsgroups: comp.sys.ibm.pc Subject: Re: Clipper - DOS variable help needed. Summary: Here is one way to do it... Keywords: Clipper, DOS Message-ID: <12877@cbnewsc.ATT.COM> Date: 16 Jan 90 22:38:18 GMT References: Organization: AT&T Bell Laboratories Lines: 46 In article , ssdesai@elbereth.rutgers.edu (Sunil S. Desai) writes: > I have Funcky and NetLib clipper libraries. Funcky does not have any > functions to access DOS variables. NetLib has a Whoami function that > can return the user's login name but I am trying to avoid extra overhead > of linking NetLib library for just one function. One way I have accessed the USER ID is to have the autoexec.bat file pass the station ID to the Clipper EXEcutable file. This is what your main.prg file would look like before compiling: Parameters user_id clear if type("user_id") = "U" user_id = "Un-Known" endif @ 10,10 say "Welcome " + user_id quit The autoexec.bat would look something like this: path c:\;c:\dos split ; set DOS error level to the station ID if errorlevel 1 goto serv1 if errorlevel 2 goto serv2 : : if errorlevel x goto servx :serv1 main TERM1 goto exit :serv2 main TERM2 goto exit . . . :exit Shawn R. Antol AT&T Bell Labs Naperville, IL. 708-979-5622 Reply to: att!ihlpb!santol