Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
hsiva2003

New User

Joined: 22 Feb 2005
Posts: 10
Location: Chennai

 Posted: Wed Nov 08, 2006 1:07 pm    Post subject: Move a variable of a pic clause to dif pic clause 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

guptae

Moderator

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

 Posted: Wed Nov 08, 2006 2:02 pm    Post subject: Hi There, U dont want to change pic claue of x & u want the value without truncation how can it possible?
vijay_bn79

New User

Joined: 20 Nov 2006
Posts: 48

 Posted: Fri Nov 24, 2006 5:31 pm    Post subject: Re: move a variable of a pic clause to variable of dif pic c 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
Arun Raj

Moderator

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

 Posted: Fri Nov 24, 2006 5:52 pm    Post subject: 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
William Thompson

Global Moderator

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

 Posted: Fri Nov 24, 2006 5:58 pm    Post subject: You could reduce the degree of truncation by multiplying y by 10 giving x.....only the least significant digit would be lost....
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us