|
From: | Stefan Lechner |
Subject: | [open-cobol-list] Firebird 1.5 gpre problems |
Date: | Tue Jun 1 07:51:12 2004 |
Hi,
I spent the weekend to figure out if I can use the
firebird preprocessor with open-cobol.
for first I did some changes to the gpre to get I
work with the -free option of open cobol.
The changed files (gpre.cpp, cob.cpp) are attached,
but to clarify it's just a hack, at the moment the preprocessed code works I'll
try to add a option for open-cobol.
Now I've some problems with the definitions
inserted by the gpre.
Source file is test.ecob preprocessed
test.ecob.cbl.
the prepared SQL Statement is coded into a record
filled with it's bynary representation.
EXEC SQL
SELECT name,atype INTO :NAME,:ATYPE FROM test; END-EXEC. generates:
* **** GDS Preprocessor
Definitions ****
01 ISC-1.
03 ISC-1-1 PIC XXXX USAGE COMP-X VALUE IS 262661. 03 ISC-1-2 PIC XXXX USAGE COMP-X VALUE IS 458755. 03 ISC-1-3 PIC XXXX USAGE COMP-X VALUE IS 234893838. 03 ISC-1-4 PIC XXXX USAGE COMP-X VALUE IS 117571587. 03 ISC-1-5 PIC XXXX USAGE COMP-X VALUE IS 1241596799. 03 ISC-1-6 PIC XXXX USAGE COMP-X VALUE IS 1397052420. 03 ISC-1-7 PIC XXXX USAGE COMP-X VALUE IS 251592788. 03 ISC-1-8 PIC XXXX USAGE COMP-X VALUE IS 352387584. 03 ISC-1-9 PIC XXXX USAGE COMP-X VALUE IS 65544. 03 ISC-1-10 PIC XXXX USAGE COMP-X VALUE IS 1638400. 03 ISC-1-11 PIC XXXX USAGE COMP-X VALUE IS 385941504. 03 ISC-1-12 PIC XXXX USAGE COMP-X VALUE IS 1095631872. 03 ISC-1-13 PIC XXXX USAGE COMP-X VALUE IS 1656141. 03 ISC-1-14 PIC XXXX USAGE COMP-X VALUE IS 385941505. 03 ISC-1-15 PIC XXXX USAGE COMP-X VALUE IS 1413547264. 03 ISC-1-16 PIC XXXX USAGE COMP-X VALUE IS 423972953. 03 ISC-1-17 PIC XXXX USAGE COMP-X VALUE IS 4278190592. 03 ISC-1-18 PIC XXXX USAGE COMP-X VALUE IS 352387086. 03 ISC-1-19 PIC XXXX USAGE COMP-X VALUE IS 8. 03 ISC-1-20 PIC XXXX USAGE COMP-X VALUE IS 1638400. 03 ISC-1-21 PIC XXXX USAGE COMP-X VALUE IS 4294901760. 03 ISC-1-22 PIC XXXX USAGE COMP-X VALUE IS 76. * * FORMATTED REQUEST BLR FOR ISC-1 = * blr_version5, * blr_begin, * blr_message, 0, 3,0, * blr_short, 0, * blr_text, 50,0, * blr_text, 3,0, * blr_begin, * blr_for, * blr_singular, * blr_rse, 1, * blr_relation, 4, 'T','E','S','T', 0, * blr_end, * blr_send, 0, * blr_begin, * blr_assignment, * blr_literal, blr_long, 0, 1,0,0,0, * blr_parameter, 0, 0,0, * blr_assignment, * blr_field, 0, 4, 'N','A','M','E', * blr_parameter, 0, 1,0, * blr_assignment, * blr_field, 0, 5, 'A','T','Y','P','E', * blr_parameter, 0, 2,0, * blr_end, * blr_send, 0, * blr_assignment, * blr_literal, blr_long, 0, 0,0,0,0, * blr_parameter, 0, 0,0, * blr_end, * blr_end, * blr_eoc * * END OF BLR STRING FOR REQUEST ISC-1 the following line does a warning : value size
exceeds data size.
03 ISC-1-5 PIC XXXX
USAGE COMP-X VALUE IS 1241596799.
now since I'm not (yet) familar with the internal
representation of all cobol datatypes, what's wrong is the generated value to
big or is the enocoding of cobc incorrect ?
Reading the source of grpe I've to assume that MF
would compile this output, but I can't test it with MF.
-------------------------
Second question
in non ANSI mode gpre generates instead of
03 ISC-1-10 PIC XXXX USAGE .....
a
03 ISC_1_10 PIC .....
Open Cobol seems not to accept underlines in
variable names. Are those underlines a MF special feature ?
thanks for any hints.
Stefan
|
cob.cpp
Description: Binary data
gpre.cpp
Description: Binary data
test.ecob.cbl
Description: Binary data
test.ecob
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |