> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Jim McAlpine
> Sent: Friday, April 03, 2009 12:10 PM
> To: [email protected]
> Subject: COBOL and European edit masks
>
> We have a large application with thousands of COBOL programs many of
which
> have edit masks UK/USA style ie with comma separators and decimal
> points like so - 999,999,999.99. We need to alter the picture clauses
so
> they cause the numeric edited items to appear in European format ie
with
> the
> "," and "." transposed like so - 999.999.999,99. Is there any way to
> accomplish this automagically in COBOL. We are trying not to have to
find
> and edit every edit mask in every program which would be a very large
and
> onerous undertaking.
>
> Any ideas very much welcomed.
Jim,
The programs still have to be changed, but the change is common for all
of them. You have to add a SPECIAL-NAMES paragraph in the CONFIGURATION
SECTION of the ENVIRONMENT DIVISION, like this:
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
DECIMAL POINT IS COMMA.
None of your PICTURE clauses has to change at all, this will
automatically interchange all the commas and periods at compile time.
Obviously a program compiled with this clause will *ONLY* produce
European-style edited numbers. Your US/UK and European programs will
need to be separate from each other.
AFAIK there is no run-time option to do this, only compile-time.
HTH
Peter
This message and any attachments are intended only for the use of the addressee
and
may contain information that is privileged and confidential. If the reader of
the
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html