Kbase 19626: AS/400 Euro (€) Display Problems from a Progress Client
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  28/05/2002 |
|
Status: Unverified
GOAL:
Possible workaround for customers experiencing problems when trying to display the European currency symbol (?) on a Progress client when the symbol is stored in a DB2/400 database.
FACT(s) (Environment):
OS/400 V4R3
Progress/400 DataServer
Progress 8.x
Progress/400 DataServer version 8.0C60
CAUSE:
The difficulty stems from incorrect mapping between the differing code
pages used on the AS/400 and the Progress client. For example, a Progress client using a codepage of ISO8859-1 will display a Euro currency symbol from an AS/400 using IBM037 as (¤).
FIX:
You can correct the problem by editing and recompiling the convmap conversion tables. Follow these steps:
1) Connect to the DataServer from the client in order to obtain the code page information of both the AS/400 DataServer and the Progress client session stream.
a) From the Progress User Interface Builder or AppBuilder, read the session information from Data Administration/Utilities/Information (DataBase code page and session stream).
b) Check the dlc/prolang/convmap/weuroebc.dat (for Progress Version 8) or dlc/prolang/convmap/weurocnv.dat (for Progress Version 9) and ensure there is a conversion table for conversions between the AS/400 code page and the Progress client code page.
If there is no available conversion table, you can create one for the purpose. See the section "Using Character Sets and Code Pages" in the "Progress Internationalization Guide."
2) Execute the following code as a Native 4GL Client on the AS/400:
DEFINE VARIABLE i AS INTEGER.
OUTPUT TO "codepage.txt".
DO i = 30 TO 255:
DISPLAY i AT 1 FORMAT "99999"
CHR(i) AT 20 FORMAT "XXXX" WITH FRAME a DOWN.
DOWN WITH FRAME a.
END.
OUTPUT CLOSE.
From the AS/400 command line execute the procedure as:
STRPROCLI STRPROC(procedure.p)
3) The codepage.txt file should display the European currency symbol that is seen on the AS/400 and its corresponding value within the code page.
4) Edit the dlc/prolang/convmap/weuroebc.dat (for Version 8) or dlc/prolang/convmap/weurocnv.dat (for Progress Version 9), changing the conversion table identified in Step 1. The position used to display the European currency symbol on the client must correspond to the value used by the AS/400 code page.
It is important to understand that positions need to change according to the direction that the conversion tables convert data. Two examples of conversion directions are from ISO8859-1 to IBM037 (client to AS/400) and from IBM297 to ISO8859-1 (AS/400 to client).
NOTE: As conversion tables are being changed, it is possible that data could be lost. For this reason it is recommended that you have a valid database backup, and you use "proutil convchar charscan" on a Progress version of the database.
This will ensure that the values being changed are not stored in the database and therefore will not risk corruption.
a) In dlc/prolang/convmap/weuroebc.dat (Progress version 8) there is a table which converts Iso8859-1 to IBM037 (client to AS/400)i.e.:
# This contains the data needed to convert from # iso8859-1 to ibm037
CONVERT
SOURCE-NAME "ISO8859-1"
TARGET-NAME "IBM037"
TYPE "1"
/*000-015*/ 000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015
/*016-031*/ 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031
/*032-047*/ 064 090 127 123 091 108 080 125 077 093 092 078 107 096 075 097
/*048-063*/ 240 241 242 243 244 245 246 247 248 249 122 094 076 126 110 111
/*064-079*/ 124 193 194 195 196 197 198 199 200 201 209 210 211 212 213 214
/*080-095*/ 215 216 217 226 227 228 229 230 231 232 233 186 224 187 176 109
/*096-111*/ 121 129 130 131 132 133 134 135 136 137 145 146 147 148 149 150
/*112-127*/ 151 152 153 162 163 164 165 166 167 168 169 192 079 208 161 032
/*128-143*/ 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048
/*144-159*/ 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 255
/*160-175*/ 065 170 074 177 159 178 106 181 189 180 154 138 095 202 175 188
/*176-191*/ 144 143 234 250 190 160 182 179 157 218 155 139 183 184 185 171
/*192-207*/ 100 101 098 102 099 103 158 104 116 113 114 115 120 117 118 119
/*208-223*/ 172 105 237 238 235 239 236 191 128 253 254 251 252 173 174 089
/*224-239*/ 068 069 066 070 067 071 156 072 084 081 082 083 088 085 .086 087
/*240-255*/ 140 073 205 206 203 207 204 225 112 221 222 219 220 141 142 223
ENDTABLE
ENDCONVERT
If the value obtained at Step 3 is 159, then position 128 (the ISO8859-1 value for the European currency symbol) in the table should have a value of 159.
The value currently stored at this position (033) should be moved to the position where 159 currently resides, i.e. table position 164.
b) There is a table in dlc/prolang/convmap/weuroebc.dat that converts IBM297 to Iso8859-1 (AS/400 to client), i.e.:
# Convert from IBM297 (EBCDIC France)
# to ISO8859-1 (default Progress internal)
CONVERT
SOURCE-NAME "IBM297"
TARGET-NAME "ISO8859-1"
TYPE "1"
/*000-015*/ 000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015
/*016-031*/ 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031
/*032-047*/ 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
/*048-063*/ 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
/*064-079*/ 032 160 226 228 064 225 227 229 092 241 176 046 060 040 043 033
/*080-095*/ 038 123 234 235 125 237 238 239 236 223 167 036 042 041 059 094
/*096-111*/ 045 047 194 196 192 193 195 197 199 209 249 044 037 095 062 063
/*112-127*/ 248 201 202 203 200 205 206 207 204 181 058 163 224 039 061 034
/*128-143*/ 216 097 098 099 100 101 102 103 104 105 171 187 240 253 254 177
/*144-159*/ 091 106 107 108 109 110 111 112 113 114 170 186 230 184 198 164
/*160-175*/ 096 168 115 116 117 118 119 120 121 122 161 191 208 221 222 174
/*176-191*/ 162 035 165 183 169 093 182 188 189 190 172 124 175 126 180 215
/*192-207*/ 233 065 066 067 068 069 070 071 072 073 173 244 246 242 243 245
/*208-223*/ 232 074 075 076 077 078 079 080 081 082 185 251 252 166 250 255
/*224-239*/ 231 247 083 084 085 086 087 088 089 090 178 212 214 210 211 213
/*240-255*/ 048 049 050 051 052 053 054 055 056 057 179 219 220 217 218 159
ENDTABLE
ENDCONVERT
If the value obtained at step 3 is 159, then position 159 should correspond to the Iso8859-1 value for the European currency symbol 128. You should change this value to 128 and move the value currently stored there (164) to the position where 128 currently resides (033).
5) Recompile the convmap.dat file using the proutil utility (See Solution 16242).
6) Start the Progress client session using the Conversion Map Startup parameter (-convmap) if necessary and display the European currency symbol on the client.
This should now be correct.
.