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

Issues in moving Signed Field to an edited field


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

New User


Joined: 31 Mar 2006
Posts: 2

PostPosted: Wed Apr 04, 2007 12:49 pm
Reply with quote

I have a situation where I need to move a variable of s9(7)v99 with a value +240000032 to ZZZZZZZ.99- in MFCOBOL. When I perform this the data in the report is displayed as 243<000.32, but actually I want it 2430000.32

Can any one advise how to overcome this issue?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Apr 04, 2007 1:17 pm
Reply with quote

Please paste actual code with variable descriptions.
Back to top
View user's profile Send private message
skkumaran

New User


Joined: 31 Mar 2006
Posts: 2

PostPosted: Wed Apr 04, 2007 1:24 pm
Reply with quote

01 CURRENT-VARS.
05 CURRENT-SIT-TAX PICTURE S9(7)V99 VALUE +0.
01 P-VARS.
05 P-SIT-TAX PICTURE ZZZZZZZ.99-.

MOVE CURRENT-SIT-TAX TO P-SIT-TAX.
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 Apr 04, 2007 9:50 pm
Reply with quote

Hello,

Please re-post your your input and expected values. This "with a value +240000032 " would never return "I want it 2430000.32 " by simply moving it.

Try adding another Z to your edit picture.

When you say MFCOBOL, is this mainframe COBOL or MicroFocus COBOL?
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Wed Apr 04, 2007 9:53 pm
Reply with quote

Hmm. I plugged your field definitions and data into MFE COBOL and got good results. If I try to overflow the field, that is moving +240000000.34 to CURRENT-SIT-TAX, the high order digits are truncated and the display is only the '.34' because the leading zeroes are suppressed. I wonder how you got the '<' in your field.

Is it possible that you have something else going on? icon_confused.gif
Back to top
View user's profile Send private message
divya_maddi

New User


Joined: 03 Nov 2005
Posts: 33

PostPosted: Mon Apr 09, 2007 5:49 pm
Reply with quote

try replacing all the z's with -'s(hyphens i mean
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Apr 09, 2007 5:53 pm
Reply with quote

divya_maddi wrote:
try replacing all the z's with -'s(hyphens i mean
Why?
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Issues with VIEW DATASET Command CLIST & REXX 2
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top