i am using below query to generate the fixed length txt file. this sql is being called from shell script.
This is supposed to be a fixed record file with the below definitions. There must be 2 byte filler after the CAT_ID AND each line should have total of 270 bytes.
1) i am not getting 270 byte file for one record.
2) 3rd col doesn't have 2 byte length as it is null.
set linesize 1000;
set newpage 0;
SET PAGESIZE 0;
SET ECHO OFF;
SET FEEDBACK OFF;
SET HEADING OFF;
SET VERIFY OFF;
whenever sqlerror exit failure;
whenever oserror exit failure;
alter session enable parallel dml;
SELECT DISTINCT rpad(EMAIL_ADDR,255),rpad(CAT_ID,13),rpad(' ',3) filler