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

Formated output in cobol as -$45.00


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

New User


Joined: 07 Mar 2006
Posts: 16

PostPosted: Wed May 02, 2007 2:33 am
Reply with quote

Hi

I want to get the amount field in output file in the following format:

Code:

$222,234,356.00
   -$456,567.00
   -$333,567.00


I tried to achieve this using

Code:
-$$$,$$$,$99.99 

but it gives the following result for the smal value -45.00:

Code:
-        $45.00


The space comes between '$' sign and '-' sign.

Is there any way to get the value as
Code:
-$45.00
?


PS: I dont want get the output as
Code:
 $45.00-

Regards,
Nitin
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed May 02, 2007 3:07 am
Reply with quote

From what I read (which I'm sure you did too), I looks like you are only allowed one floating insertion character, unless somebody comes up with an alternative, you may have to edit the edited field and shift in the minus......
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 02, 2007 3:28 am
Reply with quote

Hello,

If someone insists on the format you've posetd, i believe it is a job for lines of code rather than a simple PICture. . .

This is the first time i've seen a requirement that the minus sign and the $ had to be shown as -$ in the output. It might be worth the effort to get a buy-in from whatever manager/user on one of the standard output formats.
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
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top