10 Replies Latest reply on Oct 7, 2010 1:44 PM by sourdoughwannab

    Running SQL Plus script in concurrent manager - cannot direct to output

      How can one configure or write a SQL Plus script (which generates a report) that redirects output to a file that is recognized by the concurrent manager and is viewable via the manager. I want to run a SQL Plus script via a concurrent program. Once this concurrent program is run, I want the output viewable when the administrator clicks on the "View Output" button.

      I know I can use SPOOL to direct output from a SQL Plus script to a particular file. However, those file contents are not viewable from concurrent manager - because the concurrent manager does not know the location of the output file. Even so, one would think the output of the SQL Plus script would go to output (i.e. is visible when the user clicks on the "View Output" button). I've tried a variety and permutation of settings: set termout on, etc., etc. but cannot get the output to be viewable in "View Output." At most, it seems to go to "View Log," which is definitely not where I want it. What's interesting, I notice a few statements such as:

      select to_char(sysdate, 'YYYY-MON-DD') current_date from dual;
      select to_char(sysdate, 'YYYYMMDD_HH24MISS') current_date1 from dual;
      select to_char(to_date('&1','yyyy/mm/dd hh24:mi:ss')) begin_date from dual;
      select to_char(to_date('&2','yyyy/mm/dd hh24:mi:ss') - 1) end_date from dual;

      These statements, before the SPOOL statement but after the set termout on statement, do print out to the output (view output). What am I doing wrong or is this even possible?