Problem:
When compiling an application under Net Express, which uses a "Currency" symbol of "£" in the code it works OK, but when compiling it under Server Express 5.0 it displays the following compilation error messages;
130 currency sign is "ð".
*1004-E****************************************************************( 0)*
** Continuation character expected. End of literal assumed.
* 120-S******************** ( 4)*
** Illegal currency symbol
1620 01 w-edit-ret pic ð(3)9.99.
* 230-S*********************************** ( 4)*
** PICTURE string has illegal precedence or illegal character
18626 move w-retail-price to w-edit-ret.
* 29-S************************************* ( 32)*
** Not a data name
18729 move w-edit-ret to w-ppl6-price(w-lbl-count)
* 29-S********************** ( 335)*
** Not a data name
18731 move w-edit-ret to wp-ppl6-price(w-lbl-count)
* 29-S********************** ( 337)*
** Not a data name
* Total Messages: 6
* Unrecoverable : 0 Severe : 5
* Errors : 1 Warnings: 0
* Informational : 0 Flags : 0
* Data: 99662 Code: 0
cob32: error(s) in compilation: op031.cbl
sections copied from source code
000000 environment division.
000000 configuration section.
000000 source-computer. rombus.
000000 object-computer. rombus.
000000 special-names.
000000 currency sign is "£".
000000 input-output section.
working storage area.
000000 01 w-divif pic 9(4).
000000 01 w-edit-ret pic £(3)9.99.
000000 01 desc-sub pic 9(2).
000000 01 desc-sub-st pic 9(2).
Resolution:
On Server Express, one would look at $COBDIR/etc/copbopt, in $COBOPT, and cobol.dir for
checker directives such as currency-sign, nls. Or, you could simply put the following at the top of your program for the $ sign, for example:
$set currency-sign(36) nonls
If nls is a requirement, then on a Unix system try
export LC_MONETARY=C"
This can be found in the docs under compiler directive CURRENCY-SIGN and also there is a section in The PICTURE CLAUSE > currency symbol.
The £ should be 163