Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Issues in moving Signed Field to an edited field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Issues in moving Signed Field to an edited field
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: 686
Location: Earth

PostPosted: Wed Apr 04, 2007 1:17 pm    Post subject:
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    Post subject: Re: Issues in moving Signed Field to an edited field
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

Site Director


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

PostPosted: Wed Apr 04, 2007 9:50 pm    Post subject:
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: 153
Location: Seattle, WA

PostPosted: Wed Apr 04, 2007 9:53 pm    Post subject:
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Mon Apr 09, 2007 5:53 pm    Post subject:
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    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 include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us