I have a script that I need to format the output... Instead of semicolon as a delimiter, use a comma. At the end of every line, insert a new line and carriage return. I need a column header andf footer and page number. Here is the script.... Thanks in advance..

Select substr(decryptstr(cc_number,'&enc_key'),1,16), ';',
a.BCCOUNT_STATUS, ';',
substr(decryptstr(b.first_name,'&enc_key'),1,20), ';',
substr(decryptstr(b.last_name,'&enc_key'), 1,20), ';',
a.SYS_CREATION_DATE
from registration_info r, accounts a, addresses b
where r.cy_account_id=a.cy_account_id
and r.fi_id=a.fi_id
and r.CY_USER_ID = a.CY_USER_ID
and r.CY_USER_ID = b.CY_USER_ID
and r.FI_ID = b.FI_ID
and a.ADDRESS_ID = b.ADDRESS_ID
and r.fi_id = '12345.test';