Re: Help!! How to remove new line Character from spooled output??

From: Head_Cheese_mmmm <head_cheese_mmmm_at_my-deja.com>
Date: Tue, 12 Dec 2000 15:11:51 GMT
Message-ID: <915f7i$fip$1_at_nnrp1.deja.com>


David,
Thanks for the offer but, I was trying to avoid that. I guess I am going to have to recode the UNIX processes. I was trying to use Oracle as a quick workaround to feed some older etaunix processes.

Thanks for the help,

Kevin

In article <915cm9$daf$1_at_nnrp1.deja.com>,   David Fitzjarrell <oratune_at_aol.com> wrote:
> In our last gripping episode Head_Cheese_mmmm <head_cheese_mmmm_at_my-
> deja.com> wrote:
> > I am having a hell of a time getting SQL+ to drop the new line
> > Character from my spool file. I can't see the Character in vi but it
 is
> > there because my script output is 8k but the file size is 9k. The
> > script I have written is simple it just calculates the last EOM from
> > dual and writes that to a spool file. Several days later a UNIX
 batch
> > file wakes up to read tha date and process the EOM Data, the problem
 is
> > that it expects 8k not 9k. Here is the script:
> >
> > SET TRIMS ON
> > SET PAGESIZE 0
> > SET EMBEDDED OFF
> > SET HEADS OFF
> > SET NEWP NONE
> > SET HEADING OFF
> > SET ECHO OFF
> > SET FEEDBACK OFF
> > SET LIN 8
> > SET SPACE 0
> > SET RECSEP OFF
> >
> > SPOOL $DATA_DIR/sysctl.asc
> > SELECT TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-1)),'YYYYMMDD') FROM
 DUAL
> > /
> > SPOOL OFF
> >
> > EXIT
> >
> > How do I get rid of the 1k new line Character?????
> >
> > What I don't understand is the "SET PAGESIZE 0" should "supress all
> > headings, pagebreaks,titles,the initial blank line,and other
 formatting
> > information ." according to the SQL+ manaual. The O/S is Sun 2.6 and
> > the Oracle is 8.01 if it matters.....
> >
> > TIA
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> You'll not rid yourself of the newline character through any 'magic'
> from SQL*Plus. What I don't understand is that your UNIX script does
> not want the inherent newline character. I have written a number of
> UNIX scripts to process batch runs and this has never been a problem.
> If you truly having difficulty processing the output from your query
> through your UNIX script I will be more than happy to help you sort
> that out. Either post the script or email me a copy at
> davidf_at_bcgsystems.com and I'll help you fix it to accept your current
> spool file.
>
> --
> David Fitzjarrell
> Oracle Certified DBA
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Dec 12 2000 - 16:11:51 CET

Original text of this message