Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
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    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

sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
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: 1202
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IGZ0040S An invalid separate sign was... kishpra COBOL Programming 13 Sun Aug 02, 2015 2:41 am
No new posts How to modify the value using the sig... Vinay Pushpala PL/I & Assembler 3 Fri Feb 13, 2015 2:10 pm
No new posts SUM FIELDS of ZONED DECIMAL as DISPLA... mrgnndhmk JCL & VSAM 1 Mon Aug 11, 2014 9:16 pm
No new posts Moving sign bit from X variable to 9 seahawk789 COBOL Programming 10 Mon Aug 11, 2014 2:45 am
No new posts Move SIGN NUM to UNSIGN NUM warning m... xpower COBOL Programming 2 Tue Apr 15, 2014 7:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us