Re: USER in ace reports
Posted in 1994
} } In article <3c2ltq$9vb@emory.mathcs.emory.edu>, } J. B. Taylor <JBTaylor@lanmail.rmc.com> wrote: } >In an ace report I have two select statements joined by a UNION and the } >results going into a temp table. I would like to use a variable name for } >the temp table being used in order to avoid problems with other users } >attempting to use the same report. What I would like to do is use the } >user name as part of the temp table name. } > } >How can I get this accomplished??? } } [Sorry if this has been answered before - my newsfeed is having serious } delays.] } } Under OnLine 5.03, I-SQL 4.12, trying to use a variable as the temp table name } in ACE causes a syntax error. (The report in question is below.) } } I'd guess that your alternatives are to use 4GL or ESQL/<insert your } favorite language here> - I use ESQL/C. These are more flexible } multi-purpose languages, and they both allow you to create an SQL } statement at runtime and have it executed (dynamic SQL), where ACE only } allows static SQL. (Of course, you lose the report-formatting } capabilities of ACE if you do this. There Ain't No Such Thing As A Free } Lunch [tm]. 8^) } } Sorry, I don't think you can pull that off. } } George [ deleted ] Long, long ago, when I used to write ACE reports, I use the following in the ACE program : OUTPUT report to pipe "cat > $RPTNAME" END You have to defined an export environment variable RPTNAME before starting the program. This can be derived from the user name eg RPTNAME=${LOGNAME}.$$ At the end of the program use a more $RPTNAME or less $RPTNAME I've left ACE alone for sometime - 4GL's are better.