2 Replies Latest reply on Oct 17, 2013 5:37 PM by emss

    How to suppress unintended output string before header output...

    emss

      I am getting the following character string at top of output and need to know how to suppress this annoyance.

       

      LOW_DATE_1 ---------- 2013/09/01 HIGH_DATE_ ---------- 2013/09/30 

      Run Parms: Org - 135
      Low Date - 2013/09/01
      High Date - 2013/09/30

       

       

      Proper output should be:

       

      Run Parms: Org - 135

      Low Date - 2013/09/01
      High Date - 2013/09/30
      MY COMPANY
      Run Date: 17-OCT-13
      General Ledger Segments


      Here are the relevant code statements....obviously....something is missing or incorrect.

       

      set markup html off spool off ;

      set echo off;

      set trimspool on;

      clear columns;

      clear breaks;

      clear buffer;

      clear COMPUTES;

      set HEADING ON ;

      set PAGESIZE 50000 ; 

      set LINESIZE 500 ;

      set FEEDBACK Off ;

      Set VERIFY Off ;

      set TERMOUT OFF;

      set newpage 0;

      -- Variable Definitions Section.

      UnDefine Org_id

      Define Org_id = '&1'

      UnDefine Low_date

      Define Low_date = '&2'

      UnDefine High_date

      Define High_date = '&3'

      --Convert Dates to user-friendly formats.

      Column Low_Date_10_COL New_value Low_Date_10

      Select substr( '&Low_Date', 1, 10) as low_date_10_COL from dual;

      Column High_Date_10_COL New_value High_Date_10

      Select substr( '&High_Date', 1, 10) as High_Date_10_COL from dual;

      set feed off markup html on spool on ;

      TTITLE -

      Left 'Run Parms: Org - ' &Org_id  -

      Skip 1 -

      Col 12 'Low Date - ' &Low_Date_10  -

      Skip 1 -

      Col 12 'High Date - ' &High_Date_10 -

      Skip 1 -

      Center 'MY COMPANY' -

      Skip 1 -

      Left 'Run Date: ' _DATE  -

      Center 'General Ledger Segments'  -

        • 1. Re: How to suppress unintended output string before header output...
          DK2010

          Hi,

           

          You can try

           

          set markup html off spool off ;

          set echo off;

          set trimspool on;

          clear columns;

          clear breaks;

          clear buffer;

          clear COMPUTES;

          set HEADING ON ;

          set PAGESIZE 50000 ;

          set LINESIZE 500 ;

          set FEEDBACK Off ;

          Set VERIFY Off ;

          set TERMOUT OFF;

          set newpage 0;

          -- Variable Definitions Section.

          UnDefine Org_id

          Define Org_id = '&1'

          UnDefine Low_date

          Define Low_date = '&2'

          UnDefine High_date

          Define High_date = '&3'

          /*

          --Convert Dates to user-friendly formats.

          Column Low_Date_10_COL New_value Low_Date_10

          Select substr( '&Low_Date', 1, 10) as low_date_10_COL from dual;

          Column High_Date_10_COL New_value High_Date_10

          Select substr( '&High_Date', 1, 10) as High_Date_10_COL from dual;

          */

          set feed off markup html on spool on ;

          TTITLE -

          Left 'Run Parms: Org - ' &Org_id  -

          Skip 1 -

          Col 12 'Low Date - ' &Low_date  -

          Skip 1 -

          Col 12 'High Date - ' &High_date -

          Skip 1 -

          Center 'MY COMPANY' -

          Skip 1 -

          Left 'Run Date: ' _DATE  -

          Center 'General Ledger Segments'  -


          HTH

          • 2. Re: How to suppress unintended output string before header output...
            emss

            I've progressed....Column command has a noprint option which eliminates the display of the string of data, but not the special characters.

             

              Column Low_Date_10_COL New_value Low_Date_10 noprint

              Select substr( '&Low_Date', 1, 10) as Low_Date_10_COL from dual;

             

            Timing in the use of other commands changed and removed some of the "white noise", but I still get a wierd special character followed by an outlined empty cell. (hard to explain). I'm guessing this is as good as it will get with SQL*Plus, but really hoping I am wrong.

             

            Revised code as follows:

              set echo OFF;

              spool off;

              set markup html off spool off ;

              set trimspool on;

              clear columns;

              clear breaks;

              clear buffer;

              clear COMPUTES;

              set HEADING ON ;

              set PAGESIZE 50000 ; 

              set LINESIZE 500 ;

              set FEEDBACK Off ;

              set VERIFY Off ;

              set TERMOUT OFF;

              set newpage 0; 

            -- Variable Definitions Section.

              UnDefine Org_id

              Define Org_id = '&1'

              UnDefine Low_date

              Define Low_date = '&2'

              UnDefine High_date

              Define High_date = '&3'

            --Convert Dates to user-friendly formats.

              Column Low_Date_10_COL New_value Low_Date_10 noprint

              Select substr( '&Low_Date', 1, 10) as Low_Date_10_COL from dual;

              Column High_Date_10_COL New_value High_Date_10 noprint

              Select substr( '&High_Date', 1, 10) as High_Date_10_COL from dual;

              set feed off markup html on spool on ;

            TTITLE -

              Left 'Run Parms: Org - ' &Org_id  -

              Skip 1 -

              Col 12 'Low Date - ' &Low_Date_10  -

              Skip 1 -

              Col 12 'High Date - ' &High_Date_10 -

              Skip 1 -

              Center 'MY COMPANY' -

              Skip 1 -

              Left 'Run Date: ' _DATE  -

              Center 'General Ledger Segments'  -

              Skip 2-