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
 

 

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: 147
Location: Columbia, MO

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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
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 IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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