IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

RS as my Currency Sign


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sha

New User


Joined: 18 Feb 2004
Posts: 6

PostPosted: Thu Feb 19, 2004 4:59 pm
Reply with quote

Dear indian people,

Can I use the string Rs as my currency Sign in Cobol
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 150
Location: Tokyo, Japan

PostPosted: Fri Feb 20, 2004 7:47 am
Reply with quote

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
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1207
Location: India

PostPosted: Fri Feb 20, 2004 9:58 am
Reply with quote

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:

Code:
RS1500
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts Typing the CENT sign ยข on mainframe,... All Other Mainframe Topics 2
No new posts Identify who, from where, sign on CIC... CICS 1
No new posts Subtract the ZD fields to provide neg... DFSORT/ICETOOL 4
Search our Forums:

Back to Top