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
 

 

Formated output in cobol as -$45.00

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Formated output in cobol as -$45.00
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: 3158
Location: Tucson AZ

PostPosted: Wed May 02, 2007 3:07 am    Post subject:
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

Site Director


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

PostPosted: Wed May 02, 2007 3:28 am    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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