Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Truncation Problem when moving s(9) Comp-3 to s(11) Comp-3

Status
Not open for further replies.

cozbie

Programmer
Apr 8, 2006
1
GB
Hi There,

I'm new to COBOL and was hoping someone could help me with the truncation problem I am having.

I am trying to move :

WW-BALANCE PIC S9(9) COMP-3

to

TOTAL-OUTSTANDING-BAL PIC S9(11) COMP-3

However when use the move statement I appear to be losing the last two digits of WW-BALANCE.

Why is this happening and can someone point out how to fix it?

Many Thanks,

cozbie
 
As you've stated the problem, the move is from one whole number (no fractional piece) to another whole number. You WILL NOT lose any digits in such a move. You must have stated your problem incorrectly or are looking at the wrong fields for some reason. Perhaps the sending field is really defined S9(7)V99?

Regards,

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top