SQLite Forum

Proposed tiny change for SQLite on IBM z/OS
Login
With the IBM XL C compiler used to compile SQLite on IBM z/OS mainframe systems, the default C locale is supported by code page IBM-1047. 

In this code page the code point 0x15 is valid and represents the newline character. 

In its aiClass[] array, sqlite3.c marks code point 0x15 as invalid (0x28 - CC_ILLEGAL). This causes SQLite on z/OS to reject valid multi line SQL statements. 

I would like to propose the below tiny change, only affecting the EBCDIC implementation, which marks code point 0x15 as valid (CC_SPACE - 0x07) and fixes the problem. The diff is against v3.35.2.

--- sqlite3.c.original	2021-03-18 19:27:49.040156985 +0100
+++ sqlite3.c	2021-03-18 19:27:41.876206726 +0100
@@ -162308,7 +162308,7 @@
 #ifdef SQLITE_EBCDIC
 /*         x0  x1  x2  x3  x4  x5  x6  x7  x8  x9  xa  xb  xc  xd  xe  xf */
 /* 0x */   29, 28, 28, 28, 28,  7, 28, 28, 28, 28, 28, 28,  7,  7, 28, 28,
-/* 1x */   28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+/* 1x */   28, 28, 28, 28, 28,  7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
 /* 2x */   28, 28, 28, 28, 28,  7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
 /* 3x */   28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
 /* 4x */    7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 26, 12, 17, 20, 10,

Thank you,
mario