Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
RS as my Currency Sign

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
sha

New User


Joined: 18 Feb 2004
Posts: 7

PostPosted: Thu Feb 19, 2004 4:59 pm    Post subject: RS as my Currency Sign
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
References
PostPosted: Thu Feb 19, 2004 4:59 pm    Post subject: Re: RS as my Currency Sign Reply with quote

sandip_datta

EXPERT


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

PostPosted: Fri Feb 20, 2004 7:47 am    Post subject:
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: 872
Location: India

PostPosted: Fri Feb 20, 2004 9:58 am    Post subject: Re
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1