IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Moving Alphanumeric to COMP-3


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 6966
Location: porcelain throne

PostPosted: Wed Mar 26, 2008 7:41 pm
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 26, 2008 11:42 pm
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

Superior Member


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

PostPosted: Wed Mar 26, 2008 11:51 pm
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..

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
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

Superior Member


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

PostPosted: Thu Mar 27, 2008 12:52 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
Search our Forums:

Back to Top