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
 

 

having a $ sign infront of the amount

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
bidhanlaha

New User


Joined: 07 Mar 2005
Posts: 2
Location: India, Kolkata

PostPosted: Wed Apr 13, 2005 11:17 am    Post subject: having a $ sign infront of the amount
Reply with quote

hi,

I'm getting a file which has the transaction amount in the following format
$-123.50. for that file to read i have a copy book for the transaction amount WS-TRAN-AMNT PIC $9(11)V99.

While reading the value am getting is 000000000



Can anyone please tell me how can i get rid of the problem.
Back to top
View user's profile Send private message

Niteshs

New User


Joined: 24 Mar 2005
Posts: 6

PostPosted: Wed Apr 13, 2005 12:50 pm    Post subject:
Reply with quote

the display you have provided is of 9 digits 000000000 but it is defined as $9(11)V99.

can you provide the full figure here.
Back to top
View user's profile Send private message
bidhanlaha

New User


Joined: 07 Mar 2005
Posts: 2
Location: India, Kolkata

PostPosted: Wed Apr 13, 2005 1:48 pm    Post subject:
Reply with quote

yes niteshs u r right, the display is also 13 digit

my actual problem is how can i read a value from a file having values like $-123.50
Back to top
View user's profile Send private message
Niteshs

New User


Joined: 24 Mar 2005
Posts: 6

PostPosted: Wed Apr 13, 2005 1:59 pm    Post subject:
Reply with quote

Move this to S9(11)V9 and see the results and let us know also
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Apr 17, 2005 10:36 pm    Post subject:
Reply with quote

Hi bidhanlaha,

You're probably long gone now, but a few words to you anyway. This may help others who post ques here.

I find it strange that we lost contact w/you when Niteshs asked you to try someting and let us know how it worked out.

In order to help we need a well defined unambiguous defintion of the problem. For example, you state the field length is 13 bytes, yet you show $-123.50 (7 bytes), as an example of the field contents. Does the field have leading spaces, trailing spaces? Or is it truly 7 bytes? If so, what are the lengths of the field in the other recs in the file? Could we be dealing w/a variable len file?

You also show the copybook field's PIC as $9(11)V99. Generally PICs w/a $ use a period (.) not a V for the decimal point. I ask myself if this is not another error. Who knows? The data provided should be exact copies of the data in question, using cut & paste, not re-typing that can be error prone and carry the prejudices of the author.

The pgming business is a detail oriented pursuit. If you're not willing to operate day to day at this level of detail I'm afraid you won't advance too far in the profession you've chosen.


So, in closing Bidhanlaha, the quality of the help you receive is in direct proportion to the quality of your input.
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Tue Apr 19, 2005 12:47 am    Post subject:
Reply with quote

Well said Jack!
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 How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts How can amount of the Storage Usage b... esduman61 CICS 6 Wed Mar 09, 2016 1:19 pm
No new posts Get rows based on amount entered from... Rohit Umarjikar DB2 10 Thu Feb 25, 2016 9:57 pm
No new posts IGZ0040S An invalid separate sign was... kishpra COBOL Programming 13 Sun Aug 02, 2015 2:41 am


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