Re: cobol embedded sql source example




"Serge Lacombe" <serge.lacombe@xxxxxxxxxxxx> schreef in bericht
news:cKmdnSCeW8FeBsXZnZ2dnUVZ_smdnZ2d@xxxxxxxxxxxxxxx
Hi,

I need to obtain the list of elements (name of column,type..) of an Oracle
table.

Can it be done in a cobol embedded sql program?

If yes, a source dode example would be appreciated.

Thanks.


The sql statement you could use:

select * from all_tab_columns
where table_name = 'insertherethetableyouwanttosee'

(replace the * by the columnames of the table all_tab_columns you want to
see)

Declare your hostvariables:
<http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96109/pco05sql.htm>

Opening a cursor, loop through cursor, and close it, should be trivial:
<http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96109/pco05sql.htm#817>

You surely can find examples of cursors that use other tables.



.



Relevant Pages

  • cobol embedded sql source example
    ... I need to obtain the list of elements of an Oracle ... Can it be done in a cobol embedded sql program? ... a source dode example would be appreciated. ...
    (comp.lang.cobol)
  • Re: cobol embedded sql source example
    ... I need to obtain the list of elements of an Oracle ... Can it be done in a cobol embedded sql program? ... Lists the column definitions for the specified table, view or synonym, ... Represents the schema where the object resides. ...
    (comp.lang.cobol)