ASCII(0) not working correctly on Informix Dynamic 4GL 3.00.UC1 and Four J's compiler 3.00.1n
Posted in 2000
I think there is an error with the instruction "ASCII(0)" on REPORT's on
the latest versions of Informix Dynamic 4GL (version 3.00.UC1) and the
Four J's compiler (version 3.00.1n). Here is the source file I used to
detect the error.
NOTE:
- The error DOES NOT occur on:
- Informix 4GL-RDS 7.20.UE2
- Four J's compiler 2.10.4c2
- Informix Dynamic 4GL 2.10.UC2
Here is the source file (ascii0.4gl):
-- begin: ascii0.4gl --
main
start report my_report to "ascii0.txt"
output to report my_report()
finish report my_report
end main
report my_report()
output
right margin 0
left margin 0
bottom margin 0
top margin 0
page length 1
format
on every row
print ascii(5),
ascii(4),
ascii(0),
ascii(3),
ascii(2);
end report
-- end: ascii0.4gl --
Note: I tried to replace "ascii(0)" by '\\0', but the result is the same.
Additional notes:
Platform: SCO OpenServer 5.0.5
Products installed:
SCO OpenServer Development System (ver 5.1.1A)
4J's compiler 3.00.1n
Informix Dynamic 4GL 3.00.UC1
Informix 4GL-RDS 7.20.UE2
Informix SE 7.23.UC13
Informix Dynamic Server 7.31.UC2-1
Informix Client SDK 2.30.UC1-1 (download from
http://www.intraware.com/informix)
$ uname -x | grep Rel
Release = 3.2v5.0.5
$ cc -VSCO UNIX Development System Release 5.1.1A 27Jul98
--> This is the Four j's compiler 3.00.1n ...
$ fglrun -VFour j's Universal Runner Version 3.00.1n
Built Dec 14 1999 21:30:49
(c) 1989-1998 Four J's Development Tools
Language support library: GLS (INFORMIX-ESQL Version 9.21.UC1)
Database front end : INFORMIX-ESQL VERSION 9.14(a)
--> This is Informix Dynamic 4GL 3.00.UC1
$ fglrun -VINFORMIX Dynamic 4GL Runner Version 3.00.1g
Built Aug 19 1999 16:39:01
(c) 1989-1998 Four J's Development Tools
Language support library: GLS (INFORMIX-ESQL Version 9.21.UC1)
Database front end : INFORMIX-ESQL VERSION 9.14(a)
$ fglpc -VINFORMIX-4GL Version 7.20.UE2
Pcode Version 720
$ esql -V
INFORMIX-ESQL Version 9.21.UC1
$ cat $INFORMIXDIR/*-crINFORMIX LIBASF LIBRARY Version 9.21.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX ODBC LIBRARY Version 3.30.0000.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX C++ API 2.61.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX-Client SDK Version 2.30.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX LIBDMI LIBRARY Version 2.11.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX EMBEDDED SQL for C Version 9.21.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX LIBGEN LIBRARY Version 9.21.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX LIBGLS LIBRARY Version 3.10.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX-4GL Rapid Development System Version 7.20.UE2
Copyright (C) 1984-1996 Informix Software, Inc.
Informix Dynamic Server Version 7.31.UC2
Copyright (C) 1986-1999 Informix Software, Inc.
INFORMIX LIBOS LIBRARY Version 9.21.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
INFORMIX-SE Version 7.23.UC13
Copyright (C) 1984-1998 Informix Software, Inc.
INFORMIX LIBSQL LIBRARY Version 9.21.UC1
Copyright (C) 1991-1999 Informix Software, Inc.
File generated by Informix 4GL-RDS 7.20.UE2 (correct):
-----------------------------------------------------
$ hd ascii0.txt
0000 05 04 00 03 02 0a ......0006
$ od -c ascii0.txt
0000000 005 004 \\0 003 002 \\n0000006
File generated by Informix Dynamic 4GL 3.00.UC1 and
Four J's compiler 3.00.1n (incorrect):
---------------------------------------------------
$ hd ascii0.txt
0000 05 04 5c 30 78 30 03 02 0a ..\\0x0...0009
$ od -c ascii0.txt
0000000 005 004 \\ 0 x 0 003 002 \\n0000011
Does anybody know a solution to this problem?
Is there another way to print ASCII(0) inside a report?
Thanks in advance
Vitorino Ribeiro
SINFIC - Sistemas de Informa''o Industriais e Consultoria, S.A.
http://www.sinfic.pt
sinfic@esoterica.pt