Skip to main content

with openEsql assistant it is possible to convert SQL Pictures clauses in Cobol Syntax.

SQL_Name nchar(40) not null --> SQL-Name     pic x(40).

Is the reverse way also possible?

Who know from a tool that haven this functionality?

for one data record, this can be done manually, but by more than 100 file-records, this may be helpfull

Thanks

 

with openEsql assistant it is possible to convert SQL Pictures clauses in Cobol Syntax.

SQL_Name nchar(40) not null --> SQL-Name     pic x(40).

Is the reverse way also possible?

Who know from a tool that haven this functionality?

for one data record, this can be done manually, but by more than 100 file-records, this may be helpfull

Thanks

 

This must be a new Feature in visual Cobol 5.1:
- creating Sql table syntax from Cobol fd file
Example:
FD COBFILE.
01 COBFILE-RECORD.
03 COBFILE-TEST PIC X(40).
03 COBFILE-DATE PIC 9(08).
03 COBFILE-ZAHL PIC 9(08)V9(02).
03 COBFILE-ZAHL1 PIC 19(08)V9(02).
03 COBFILE-IND PIC 9(01) OCCURS 10.
will give
cobfile_text nchar(40) not null,
cobfile_date date not null,
cobfile_zahl numeric(8,2) not null,
cobfile_zahl1 decimal(8,2) not null,
cobfile_ind1 numeric(1) not null,
cobfile_ind2 numeric(1) not null,
cobfile_ind3 numeric(1) not null,
cobfile_ind4 numeric(1) not null,
cobfile_ind5 numeric(1) not null,
cobfile_ind6 numeric(1) not null,
cobfile_ind7 numeric(1) not null,
cobfile_ind8 numeric(1) not null,
cobfile_ind9 numeric(1) not null,
cobfile_ind10 numeric(1) not null.
In the other direction, there will be done with openEsql assistant.
I will write a little Cobol program doing this for my new Project, may be that Manual correction will be necessary.