Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fujitsu 5 plus SQL CREATE statement. 1

Status
Not open for further replies.

joeih

MIS
Jul 14, 2003
14
US
Hi,

I'm trying to create a SQL table or file in Fujitsu Ver 5.

EXEC SQL
CREATE TABLE etc
END-EXEC.

The compiler is returning
JMN2633I-S 33 SQL STATEMENT IS INVALID. ODBC-7600E NOT EXECUTABLE SQL STATEMENT.

I believe it is saying that the CREATE is not available.

Has anyone used the CREATE statement? If so please post a copy of it. Is the CREATE statement the best way to create a new Data Base?

Thanks in advance

JIH
 
You have SQL (DDL) syntax problems, not cobol.
Read your RDBMS manual.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the response.

Usually I'll get a 37000 with a syntax error at runtime. This is a compiler error.

Fujitsu doesn't give much in SQL documentation.


Thanks,

JIH
 
I talked about the database manual(s), not the cobol one.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Fujitsu does not allow for certain SQL Statements on its ESQL modules. CREATE TABLE is one of them.

Please try the code in faq209-5475. It should work with V5.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Thanks Frederico for your response.
Do you know of other commands that are not allowed?

I'll try your recomendation.

Thanks

JIH
 
Well....
According to Fujitsu there are a few of them.
Dont have the list now.


You can either use ADO as I mentioned, or you can try and use Dynamic SQL instead. This last should allow for most of the ones Fujitsu does not allow directly.
(PREPARE/EXECUTE).
[Example]
:
01 STMVAR PIC X(100).
:
MOVE "create table t1 (var1 char(10))" TO STMVAR
EXEC SQL
PREPARE STMIDT FROM :STMVAR
END-EXEC.
EXEC SQL
EXECUTE STMIDT
END-EXEC.

For more information see COBOL User's Guide, Chapter 19, section "Using
Dynamic SQL".

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Frederico,

The above example worked!

I'm trying to relate all of the SQL commands to COBOL.
(READ, WRITE, DELETE etc. I was doing OK untill I ran into the SQL CREATE command. I'll try to post a simple example program with all of the COBOL I-O vs SQL commands when I'm done. It will have the Fujitsu flavor.

Again, thanks for your help.


JIH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top