Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MVS Cobol Report Writer and currency sing

Status
Not open for further replies.

hero69

Technical User
May 20, 2003
9
CH
Hi to all

I had wrote a Cobol program with Cobol's report writer and I will change the currency sign $ to 'sFr' how can I do that? I use MVS Cobol 3.2 and Repoert Writer 1.4.11.

I tried:
IDENTIFICATION DIVISION.
PROGRAM-ID. COB0119.
AUTHOR. Jean-Pierre Sager
DATE-WRITTEN. 21. Juli 2003.

ENVIRONMENT DIVISION.

CONFIGURATION SECTION.
Special-Names.
* Currency Sign is X'9F' with Picture Symbol '$'.
Currency Sign is 'sFR ' with Picture Symbol '$'.
...
...
...
01 BESTELL-LINE TYPE DE.
03 LINE + 2.
05 COL 2 PIC X(34) SOURCE Artikel.
05 COL 39 PIC Z(9)9 SOURCE Lager-Menge.
05 COL 51 PIC Z(7)9.99 SOURCE Preis-pro-stk.
05 COL 65 PIC Z(9)9 SOURCE Best-Menge.
* 05 COL 80 PIC 9(4) SOURCE Filiale.
05 COL RIGHT 83 VALUE 'Bern ' WHEN Filiale = 1
VALUE 'Zürich ' WHEN Filiale = 2
VALUE 'Basel ' WHEN Filiale = 3
VALUE 'Genf ' WHEN Filiale = 4
VALUE 'Luzern ' WHEN Filiale = 153
VALUE 'Baden ' WHEN Filiale = 274.
05 COL 88 PIC 9(10) SOURCE Best-Nr.
05 ORD-VAL COL 101 PIC $(7)9.99 SOURCE
Best-Menge * Preis-pro-stk.
* 05 COL + 13 VALUE 'sFr.'.
03 LINE PRESENT WHEN Best-Menge > Lager-Menge.
05 COL 2 VALUE '==> Keine Artikel mehr am Lager <=='.
01 TYPE CF.
03 LINE + 3.
05 COL 2 VALUE 'TOTALS: DEPOT'.
05 COL 101 PIC $(7)9.99 SUM OF ORD-VAL.
* 05 COL 115 VALUE 'sFr.'.
03 LINE.
05 COL 103 VALUE '========='.

But I get always a error or wrong values. Has some one any idee how I can solve that problem?

Regards,

 
Hi,

There seems to be a problem with Currency Sign in the Report Writer when it is longer than one character.

Please could you send a short e-mail message to support@spc-systems.com, so we can reply with an &quot;APAR&quot; number and plan to fix this problem. There's no need to repeat the details - we have them.

In the meantime, here's a &quot;work around&quot; that works very well. It may look a bit odd, but trust me this does the job!


Step 1: Wherever you have the currency sign change the COL to COL RIGHT. For example:
COL 101 PIC $(7)9.99 becomes
COL RIGHT 114 PIC $(7)9.99 (allowing for the 4-character currency sign)
(This is quite a good change anyway, as it's sometimes easier to look at the right-hand side of a column of figures.)

Step 2: Just before the REPORT SECTION line, insert the following:
*temporary replace: can be removed when problem with multi-character currency signs fixed
REPLACE ==$(7)9.99== BY =='sFr '<9(6)>9.99==.
(You will need more than one replacement if you use more than one picture of this type.)

That's all! Let me know how it goes!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top