null in fast export

Database
N/A

null in fast export

Hi can anybody help me with this : to handle null during fast export.
My fast export script is working fine, but when it has a record with a column value null I am getting that row as a blank line in the output txt file. The code is:

.LOGTABLE table_log;
.LOGON DBC/userid, password;
.BEGIN EXPORT SESSIONS 8;
SELECT cast(
trim(cast(col_1 as decimal(18,0)))||'|'||
trim(cast(col _2 as char(2)))||'|'||
.......
trim(cast(col_n as decimal(7,2)))
as char(150))
FROM DBC.Tablename;
.EXPORT MODE RECORD FORMAT TEXT OUTFILE path/*.txt;
.END EXPORT;
.LOGOFF;
Any help is very much appreciated .Thanks in advance