View previous topic :: View next topic
|
Author |
Message |
sha
New User
Joined: 18 Feb 2004 Posts: 6
|
|
|
|
Dear indian people,
Can I use the string Rs as my currency Sign in Cobol |
|
Back to top |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
Hello Sha,
I don't think you can use "Rs" in a PICTURE clause. It will give compile error. But by using small trick you can do this.
Code: |
01 I PIC 9(08) VALUE 100.
01 J.
05 J01 PIC X(02) VALUE 'Rs'.
05 J02 PIC 9(06).
PROCEDURE DIVISION.
MOVE I TO J02
DISPLAY J.
|
J will display Rs000100.
You can code 'Z' appropriately to suppress leading zeroes. |
|
Back to top |
|
|
mcmillan
Site Admin
Joined: 18 May 2003 Posts: 1210 Location: India
|
|
|
|
Dear,
In VS COBOL II you can't use "RS" as currency sign symbol. But In IBM COBOL you can use 'RS" as your currency sign.
For example you can define like:
Code: |
CURRENCY SIGN IS 'RS' WITH PICTURE SYMBOL '$' |
While displaying 1500 in $9999 Pictured item, it shows as:
|
|
Back to top |
|
|
|