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
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm


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