Re: Linux-SCO portability
Posted in 1999
Hello Scott, I have missed what the original problem was, if you wish to print in multiple environments from 4gl perhaps you should call a shell script (such as SPOOL) to handle the printing. You will need to pass in the file (pathname) to print, you may even pass in other parameters such as copies, printer etc... Create two versions of SPOOL, one for Linux, and a separate shell for SCO. From 4gl use the RUN command to run the shell. Stephen C Manga Quanta Systems Ltd. On Mon, 26 Apr 1999, Scott Holmes wrote: > Thanks for the suggestions, however, I'm still stuck with the environmental > variable approach. Personally, I'd like to go with Art's suggestion. However, > our users need to be able to pick a printer from a list. They may need to do > this several times during the duration of a program. Unless someone has come > up with a way to change environmental variables "on-the-fly", I cna't use it. > I have found that Linux, at least my RH5.2, sets a variable OSTYPE=Linux. > This variable does not exist on my SCO. So, currently I'm trying out code: > if fgl_getenv("OSTYPE") = "Linux" then > ... lpr -P ... > else > ... lp -d ... > end if > > I did try some experimenting with uname but it generally resulted in requiring > some sort of awk script. Awk is not the same on the two systems. And, I find > environmental variables easier to deal with than run-time arguments. So, ... > > Thanks again... > -- > --------------------------------------------------------------------- > Scott Holmes http://www.pacificnet.net/~sholmes > -Run Linux- sholmes@pacificnet.net > > Database Programmer/Analyst Passport 4GL > HTML Composer Informix 4GL, SQL > --------------------------------------------------------------------- > There are more things in heaven and earth, Horatio, > than are dreamt of in your philosophy > --------------------------------------------------------------------- > > > > > >