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
 

 

Move a variable of a pic clause to dif pic clause

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

New User


Joined: 22 Feb 2005
Posts: 10
Location: Chennai

PostPosted: Wed Nov 08, 2006 1:07 pm    Post subject: Move a variable of a pic clause to dif pic clause
Reply with quote

I want to comapare x & y of different pic clauses.

x pic 99v9(6) & y pic s9v9(8)comp-3.

If I want to move y value to x without any truncation - ...I don't want to change the x's pic clause...

Need a suggestion
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Nov 08, 2006 2:02 pm    Post subject:
Reply with quote

Hi There,

U dont want to change pic claue of x & u want the value without truncation
how can it possible?
Back to top
View user's profile Send private message
vijay_bn79

New User


Joined: 20 Nov 2006
Posts: 48
Location: Hyderabad

PostPosted: Fri Nov 24, 2006 5:31 pm    Post subject: Re: move a variable of a pic clause to variable of dif pic c
Reply with quote

x pic 99v9(6) & y pic s9v9(8)comp-3.

MOVE VALUES FROM Y TO X LIKE


I mean 1 interger and 6 decimal

Y = 2.666666
if you move Y to X then
X will have the value 02.666666


pls correct me if i am wrong
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Fri Nov 24, 2006 5:52 pm    Post subject:
Reply with quote

Hi Siva

It is not possible to do the move operation you specified without truncation.Anyway you will lose precision by 2 decimal points.

Thanks
Arun
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Fri Nov 24, 2006 5:58 pm    Post subject:
Reply with quote

You could reduce the degree of truncation by multiplying y by 10 giving x.....only the least significant digit would be lost....
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm


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