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
 
Moving Alphanumeric to COMP-3

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

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Wed Mar 26, 2008 7:38 pm    Post subject: Moving Alphanumeric to COMP-3
Reply with quote

Hi,

I have two variables with following definition

Code:
01 WS-COMP3                  PIC 9(006) COMP-3.           
01 WS-ALPHA                  PIC X(006) VALUE SPACES. 


The following code is working without any issues.

Code:
 MOVE WS-ALPHA TO WS-COMP3


icon_eek.gif

Could some body please explain this behaviour. I'm using COBOL for OS/390 & VM RELEASE 2.2 PP 5648-A25.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Mar 26, 2008 7:41 pm    Post subject:
Reply with quote

if this is not part of the 'NOT ALLOWED QUESTIONS' it should be.

Abin, this topic was thoroughly trashed last couple of weeks. Same topic. look at the mainframe cobol threads for the last few weeks.
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 Mar 26, 2008 11:42 pm    Post subject:
Reply with quote

Hello,

As Dick B mentioned, this topic has been beaten to death recently (as well as in the past).

The following is a bit of a heads-up on posting style:

Quote:
The following code is working without any issues.
Does this simply mean that there is no abend? What have you done to verify that it "works"? Posting the actual verification results for this type of question is more useful than saying "it works".

Quote:
Could some body please explain this behaviour.
If it is working, what behaviour needs an explanation?

The way you present your question quite often determines how many replies are posted and how useful they are.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Mar 26, 2008 11:51 pm    Post subject:
Reply with quote

Hi,

As suggested, the problem in question already has many threads. A similar thread I would like to share, just liked the discussion went there, have a look..

http://www.ibmmainframes.com/viewtopic.php?t=27550&postdays=0&postorder=asc&start=15
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Thu Mar 27, 2008 8:50 am    Post subject:
Reply with quote

Hi All,

Thanks for the comments and sorry for not serachig the past post. When somebody showed me that you can actually move alpha values into a comp-3, i practically went mad.

Quote:
Does this simply mean that there is no abend? What have you done to verify that it "works"? Posting the actual verification results for this type of question is more useful than saying "it works".

What I meant by it is working fine is it is not abending. this made me crazy and when I saw that when alpha is moved to comp-3 and comp-3 is getting some numeric value i bacame more mad icon_mad.gif . Now I know the reason. And I'm reading simillar posts.

Thanks for the help icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Mar 27, 2008 12:52 pm    Post subject:
Reply with quote

Hi,

Not to worry..BTW
abin wrote:
i practically went mad.
how are you now.. icon_smile.gif
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Thu Mar 27, 2008 12:56 pm    Post subject:
Reply with quote

Hi Anuj,

Now I'm relieved icon_cool.gif
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 Moving UDB database to Db2 on z/OS Keith Hooley DB2 4 Wed Sep 27, 2017 12:38 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Moving a PD to PD spoorni DFSORT/ICETOOL 8 Fri Oct 07, 2016 9:52 pm

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