USE ARG tables, string1, string2
rc = 0
SELECT SUBSTR(tables,1,1)
WHEN 'D' THEN
string1 = db2_unicode()
WHEN 'A' THEN
string1 = ansi_code()
WHEN 'E' THEN
string1 = ebcdic_code()
OTHERWISE
rc = 1
END
SELECT SUBSTR(tables,2,1)
WHEN 'D' THEN
string2 = db2_unicode()
WHEN 'A' THEN
string2 = ansi_code()
WHEN 'E' THEN
string2 = ebcdic_code()
OTHERWISE
rc = 1
END
IF LENGTH(string1) <> LENGTH(string2) THEN
rc = 1
RETURN rc
db2_unicode:
y = ''
y = y || "2FC223C0C1C324C7D1F62C255F3E3FF85CCACBC8CDCECFCCE93A"x
y = y || "A0E27BE0E1E37DE7F1A72E3C282B212660EAEBE8EDEEEFECDFA4"x
y = y || "91169394959604989990"x
y = y || "31323334353680"x
y = y || "06888B81178A89050783848C0A1A2A9A"x
y = y || '01'x
RETURN y
ansi_code:
y = ''
y = y || "6162636465666768696A6B6C6D6E6F707172737475767778797A"x
y = y || "4142434445464748494A4B4C4D4E4F505152535455565758595A"x
y = y || "31323334353637383930"x
y = y || "E5E4F6C5C4D620"x
y = y || "2E282B21262A292D2F23242C253F5C3A"x
y = y || '01'x
RETURN y
ebcdic_code:
y = ''
y = y || "818283848586878889919293949596979899A2A3A4A5A6A7A8A9"x
y = y || "C1C2C3C4C5C6C7C8C9D1D2D3D4D5D6D7D8D9E2E3E4E5E6E7E8E9"x
y = y || "F1F2F3F4F5F6F7F8F9F0"x
y = y || "4743CC6763EC40"x
y = y || "4B4D4E5A505C5D60617B5B6B6C6FE07A"x
y = y || '01'x
RETURN y
|