What settings to stop last field with right padding being trimmed

Hi

I’ve been trying to create a fixed file that happens to have trailing spaces. I’ve done this succesfully in older versions of TOAD but have recently upgraded to v12 and something behind the scenes is auto trimming my file? The only portion that is trimmed is the last field, and only the right side, if a lpad is done the row length is as expected (548) in the case below. If I run the same script in SQL Plus I get the expected output making me believe the issue is in TOAD’s spool behaviour… Below is a example of my scenario, I’ve tried various SET commands, along with the TOAD options but can’t seem to find the right switch to stop the padding from being trimmed.

Thanks,

Ian

set heading off
set feedback off
set termout off
set linesize 548
set pagesize 0
set echo off
set trimspool off

spool &output_path\wit10.txt

Select
‘0005000452’ ||
rpad(‘Institute Name’,100) ||
‘11’ ||
rpad(‘21 Somewhere Road’,50) ||
rpad(’ ‘,50) ||
rpad(‘Kansas’,50) ||
‘4512’ ||
‘02’ ||
rpad(‘Adam Teller’,60) ||
rpad(‘2581 9153’,20) ||
rpad(’ ',20) ||
rpad(‘adam.teller@toad.com’,80) ||
rpad(‘Toad 12’,20) ||
rpad(‘adam.teller@toad.com’,80)
from dual

why do you use “set linesize 548”?

Damir,

I am creating a fixed length file and that is the linesize for each row for this particular table. If you add the field lengths listed they sum to 548.