From: Mark D Powell <markp7832@my-deja.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Help!! How to remove new line Character from spooled output??
Date: Tue, 12 Dec 2000 15:21:00 GMT
Organization: Deja.com - Before you buy.
Lines: 56
Message-ID: <915fol$g36$1@nnrp1.deja.com>
References: <915bvq$cp0$1@nnrp1.deja.com>
NNTP-Posting-Host: 199.228.142.8
X-Article-Creation-Date: Tue Dec 12 15:21:00 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
X-Http-Proxy: 1.0 x58.deja.com:80 (Squid/1.1.22) for client 199.228.142.8
X-MyDeja-Info: XMYDJUIDmarkp7832


In article <915bvq$cp0$1@nnrp1.deja.com>,
  Head_Cheese_mmmm <head_cheese_mmmm@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
>
Under UNIX the spool file is a text file.  All text file lines end in a
Newline character!  It is my understanding that the newline is
required.  Under DOS each line of a text file ends in a newline,
carriage return.  I think what you need to do is change the processing
program to handle the newline, such as using gets to read the input
line in C.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.

