Link to home
Start Free TrialLog in
Avatar of nightworker
nightworker

asked on

URGENT!!! spool file: how to determine the linesize??

Hey Experts,

I need to spool a file daily,the linesize of the file varies because everyday there are a couple of field have no data. if I set linesize to 350 which is the max size. when I open it in notepad, the text will wrap. I tried set trimspool on. but it doesn' twork. please help!!!!!!!

set echo off;
set heading off;
set pages 50000
set linesize 350
set trimspool on
set feedback off;
spool /home/dwadmin/activity.txt
Avatar of RCorfman
RCorfman

You realize, unless I'm missing something, that even if a column has no data, it is still output on the query in the same position. Given that assumption, It must be a variable size of the last column of data that is causing the problem.

It sounds like you are OK if that line gets trimmed (based on you trying to set trimspool).  I would just trim that last data colum itself.

select col1, col2, col m, substr(colz,1,100)
 from blahblah where blah;

Set the 100 in the above to be whatever an acceptable size is that prevents the wrapping.
ASKER CERTIFIED SOLUTION
Avatar of MikeOM_DBA
MikeOM_DBA
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Even with nowrap checked in notepad, the data will still wrap when it is really long.
Avatar of johnsone
Max for linesize is 32767.  If you have trimspool on, then there should be no issue setting it this high.