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
 
Move from Comp3 variable to Edited Variable

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

New User


Joined: 28 Aug 2006
Posts: 54
Location: Madrid

PostPosted: Thu Aug 10, 2017 4:20 pm    Post subject: Move from Comp3 variable to Edited Variable
Reply with quote

Hi,

In Cobol pgm we are moving the data from DB2 table (using Embedded SQL) to Edited Variable. Below is the variable definition

Source S9(15)V9(2) Comp-3 - Value 5858.00
Target -9(15).9(2)

But Target display as 58.58.

Please could you let me know where it went wrong?
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Thu Aug 10, 2017 4:30 pm    Post subject:
Reply with quote

You didn't read the manual. This is a question an expert would never ask!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8200
Location: East Dubuque, Illinois, USA

PostPosted: Thu Aug 10, 2017 4:50 pm    Post subject: Reply to: Move from Comp3 variable to Edited Variable
Reply with quote

A PIC S9(15)V9(2) COMP-3 will NEVER, unless you do something with REDEFINES, have a value of 5858.00 as you posted. It may have a value of 5858 or 585800 (leading zeros ignored) but it will not have 5858.00 since the decimal point is only implied in the PICTURE and will not be part of the value. So either you are editing what the computer tells you or you are lying to us.

Post a DISPLAY of the COMP-3 variable (using the Code tag) so we can see which it is.

And this is definitely not an expert's questions -- perhaps you should be posting in Beginners and Students Forum instead?
Back to top
View user's profile Send private message
sreekusr
Warnings : 1

New User


Joined: 28 Aug 2006
Posts: 54
Location: Madrid

PostPosted: Thu Aug 10, 2017 4:51 pm    Post subject: Reply to: Move from Comp3 variable to Edited Variable
Reply with quote

Hi,

Not to offend anyone - I thought this was a forum I could get an immediate reply as I always got in past. Anyways never mind.
Back to top
View user's profile Send private message
sreekusr
Warnings : 1

New User


Joined: 28 Aug 2006
Posts: 54
Location: Madrid

PostPosted: Thu Aug 10, 2017 4:53 pm    Post subject: Reply to: Move from Comp3 variable to Edited Variable
Reply with quote

Thanks a lot for the reply, Robert Sample.
please note - the above comment was not meant to you.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Thu Aug 10, 2017 5:21 pm    Post subject: Re: Reply to: Move from Comp3 variable to Edited Variable
Reply with quote

sreekusr wrote:
Not to offend anyone - I thought this was a forum I could get an immediate reply as I always got in past.

Which is as about as offensive as you can get...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Thu Aug 10, 2017 5:43 pm    Post subject: Reply to: Move from Comp3 variable to Edited Variable
Reply with quote

what could You expect from somebody who claims as
Quote:
Mainframe skills : Making friends,Music anf going out


icon_cool.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8200
Location: East Dubuque, Illinois, USA

PostPosted: Thu Aug 10, 2017 5:54 pm    Post subject:
Reply with quote

A forum like this is not a place to expect immediate replies. Responding is voluntary on this, and most, fora -- meaning people respond when they have the time, and the knowledge of the topic; it is entirely normal for hours to days to pass before a response.
Back to top
View user's profile Send private message
sreekusr
Warnings : 1

New User


Joined: 28 Aug 2006
Posts: 54
Location: Madrid

PostPosted: Thu Aug 10, 2017 5:59 pm    Post subject: Reply to: Move from Comp3 variable to Edited Variable
Reply with quote

Thanks all for the response!! I think I am having a bad at office ..Sorry for the trouble caused.... I think I should have been more mature in asking questions, in fact I should gone through my basics before putting here, my bad. Apologies.

Regarding the Issue - it seems the coder has did some mistake of editing it before passing to target which screwed things up..
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 can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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