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

Picture with Comma?


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
alabama

New User


Joined: 27 Aug 2008
Posts: 5
Location: Munich

PostPosted: Thu Oct 09, 2008 2:23 pm
Reply with quote

I have a DEC FIX(13,2) variable and must be copy in a Picture Variable.

with PIC'9999999999999' lost the two Comma position.
but PIC=DECFIX*100 is not allowed.

How do i declare the Picture Variable with comma?


Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Oct 09, 2008 4:48 pm
Reply with quote

From the Language Reference manual link that can be found on this page:
Quote:
15.3.3.1 Insertion and decimal point characters


The point, comma, or slash can be used in conjunction with the V to cause insertion of the point (or comma or slash) in the position that delimits the end of the integer portion in and the beginning of the fractional portion of a fixed-point (or floating-point) number, as might be desired in printing, since the V does not cause printing of a point. The point must immediately precede or immediately follow the V. If the point precedes the V, it is inserted only if an unsuppressed digit appears to the left of the V, even if all fractional digits are significant. If the point immediately follows the V, it is suppressed if all digits to the right of the V are suppressed, but it appears if there are any unsuppressed fractional digits (along with any intervening zeros).

The following example shows decimal conventions that are used in different countries.


declare A picture 'Z,ZZZ,ZZZV.99',
B picture 'Z.ZZZ.ZZZV,99',
C picture 'ZBZZZBZZZV,99';
A,B,C = 1234;
Back to top
View user's profile Send private message
alabama

New User


Joined: 27 Aug 2008
Posts: 5
Location: Munich

PostPosted: Thu Oct 09, 2008 5:13 pm
Reply with quote

Thank you!
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Add Comma to each record until find t... DFSORT/ICETOOL 6
No new posts Removing Extra Spaces in a comma sepa... DFSORT/ICETOOL 3
No new posts Sortcard to put comma after particula... DFSORT/ICETOOL 21
No new posts Reformatting the input with leading z... DFSORT/ICETOOL 3
No new posts Add comma to end of the record DFSORT/ICETOOL 2
Search our Forums:

Back to Top