Re: DBPRINT variable
Posted in 1992
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
If you are trying to set DBPRINT (or any environment variable) in a script called by RUN, the script runs in a subshell and when RUN returns, the subshell and its environment are gone. You could run the 4gl program from a shell which sets DBPRINT, or call the program from something like: DBPRINT="lp -d lp2" prog.4ge but this only gives you the printer choice before running the 4gl. You could probably use a C function which calls putenv(DBPRINT="lp -d lp2") but the simplest thing would be something like: PROMPT "Which printer? " FOR my_lp { verify choice here } LET rep_pipe = "lp -d", my_lp CLIPPED START REPORT rep_name TO PIPE rep_pipe instead of START REPORT TO PRINTER (or OUTPUT REPORT TO PRINTER if done in the report section.) Good luck. -- Paul S. Sawyer - University of New Hampshire CIS - paul@unhtel.unh.edu Telecommunications and Network Services - VOX: +1 603 862 3262 Durham, New Hampshire 03824-3523 - FAX: +1 603 862 2030