Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> How to create a Cobol flatfile in sqlplus

How to create a Cobol flatfile in sqlplus

From: Manfred Friedrich <mfriedrich_at_excite.com>
Date: 2000/06/24
Message-ID: <3954CAF3.DA5D65C1@excite.com>#1/1

I would like to create a flatfile out of sqlplus from the following table:

SQL> desc mstest

 Name                            Null?    Type
 ------------------------------- -------- ----
 T                                        VARCHAR2(5)
 II                                       NUMBER(7,2)
 I                                        NUMBER(3)

SQL> select * from mstest;

T II I
----- ---------- ----------

M        7000,77         49
K       17000,17         59


The Output which I would like to see is

M 0700077049
K 1700017059

I tried:

SET NEWPAGE 0
SET SPACE 0
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
column i format 000
column ii format 00000v00

and the result is

M     0700077 049
K     1700017 059

There is one extra space before each mumeric value.

How can I avoid this?

TIA. Manfred Received on Sat Jun 24 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US