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 from comp-3 to comp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
pankajupadhyay
Warnings : 1

New User


Joined: 04 May 2007
Posts: 13
Location: pune

PostPosted: Tue May 22, 2007 7:18 pm    Post subject: Move from comp-3 to comp
Reply with quote

HI all,
hear i have a confusion plz let me know all about move from different usage clause. Ex--
77 A pic 99999 VALUE 12345

77 B pic s99999 comp-3

77 C pic s99999 comp

77 D pic xxxxx

77 E pic aaaaa

MOVE A TO B
MOVE A TO C
MOVE A TO D
MOVE B TO D
MOVE B TO A
MOVE B TO C
MOVE B TO D
MOVE D TO E
MOVE E TO D
MOVE D TO A


AND HOW CAN DISPLAY THE VALUE OF COMP AND COMP-3
CAN I USE DISPLAY " VALUE OF COMP IS " COMP-3 ,COMP

PLZ HELP ME BCZ THERE IS NO SYSTEM AVAILABLE TO CHECK OUT ALL FOR INTERVIEW
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Tue May 22, 2007 9:04 pm    Post subject:
Reply with quote

The best thing you can do to prepare is to read up on Elementary moves in the manual.
Back to top
View user's profile Send private message
srebba
Warnings : 1

New User


Joined: 26 Apr 2007
Posts: 37
Location: USA

PostPosted: Fri Jun 01, 2007 8:50 pm    Post subject: Re: Move from comp-3 to comp
Reply with quote

See pankajupadhyay

COMP-3 is what? Packed decimal ? is this for internal storage?
to save the storage purpose for numeric?

Find the above "THOUGHTS"

Then u will come to know can we able to display the COMP-3.


ANSWER is Certainly NOT NOT NOT NOT

Thank you
Sree
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 Jun 01, 2007 9:02 pm    Post subject: Re: Move from comp-3 to comp
Reply with quote

srebba wrote:
COMP-3 is what? Packed decimal ? is this for internal storage?
to save the storage purpose for numeric?

Find the above "THOUGHTS"
And your point?
Quote:
Then u will come to know can we able to display the COMP-3.

ANSWER is Certainly NOT NOT NOT NOT
Certainly NOT what?
Back to top
View user's profile Send private message
srebba
Warnings : 1

New User


Joined: 26 Apr 2007
Posts: 37
Location: USA

PostPosted: Fri Jun 01, 2007 11:04 pm    Post subject:
Reply with quote

Pls Think abou the display statment...

U can not display COMP-3 field..
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jun 01, 2007 11:26 pm    Post subject:
Reply with quote

srebba wrote:
Pls Think abou the display statment...

U can not display COMP-3 field..


Please test that statement before you report as a fact! icon_cry.gif
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Sat Jun 02, 2007 1:05 pm    Post subject:
Reply with quote

Quote:
U can not display COMP-3 field



why can't u ?? icon_eek.gif
Back to top
View user's profile Send private message
srebba
Warnings : 1

New User


Joined: 26 Apr 2007
Posts: 37
Location: USA

PostPosted: Sun Jun 03, 2007 12:34 am    Post subject: Re: Move from comp-3 to comp
Reply with quote

I did and I have given the answer

Without my exp. how could i give the answer.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Sun Jun 03, 2007 12:58 am    Post subject: Re: Move from comp-3 to comp
Reply with quote

srebba wrote:
I did and I have given the answer
Yes, you gave an answer, an incorrect one, but an answer never the less....
Quote:
Without my exp. how could i give the answer.
Good point, then without your experience, why did you give an answer?
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: Sun Jun 03, 2007 1:33 am    Post subject:
Reply with quote

Hello,

If you tried this (display comp3-field) and it "would not work" please post your field definition, the procedure division code in question, and the compiler error, run-time abend, or the undesired result you received.

My observation is that very many of us have DISPLAYed comp-3 fields with no problems for a long, long time.

As i mentioned, if you post what you have and what the result was, we can tell you why your attempt has problems.

I will add this - if your comp-3 field was within a group of fields (i.e. a record layout), that will not work as desired because you are not displaying a comp-3 field - that is a pic x(nn) display.
Back to top
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Sun Jun 03, 2007 3:20 am    Post subject: Re: Move from comp-3 to comp
Reply with quote

You are correct..i tried to run this program with the below updates
Code:

MOVE A TO B                           
DISPLAY ' MOVE A TO B --> ' A ' : ' B 
MOVE A TO C                           
DISPLAY ' MOVE A TO C --> ' A ' : ' C 
MOVE A TO D                           
DISPLAY ' MOVE A TO D --> ' A ' : ' D 
MOVE B TO D                           
DISPLAY ' MOVE B TO D --> ' B ' : ' D 
MOVE B TO A                           
DISPLAY ' MOVE B TO A --> ' B ' : ' A 
MOVE B TO C                           
DISPLAY ' MOVE B TO C --> ' B ' : ' C 
MOVE B TO D                           
DISPLAY ' MOVE B TO D --> ' B ' : ' D 
MOVE D TO E                           
DISPLAY ' MOVE D TO E --> ' D ' : ' E 
MOVE E TO D                           
DISPLAY ' MOVE E TO D --> ' E ' : ' D 
MOVE D TO A                           
DISPLAY ' MOVE D TO A --> ' D ' : ' A 


Values of all the variables were displayed, irrespective of their type.

Output
Code:

MOVE A TO B --> 12345 : 12345
MOVE A TO C --> 12345 : 12345
MOVE A TO D --> 12345 : 12345
MOVE B TO D --> 12345 : 12345
MOVE B TO A --> 12345 : 12345
MOVE B TO C --> 12345 : 12345
MOVE B TO D --> 12345 : 12345
MOVE D TO E --> 12345 : 12345
MOVE E TO D --> 12345 : 12345
MOVE D TO A --> 12345 : 12345


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

Global Moderator


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

PostPosted: Sun Jun 03, 2007 3:28 am    Post subject: Re: Move from comp-3 to comp
Reply with quote

Itanium wrote:
You are correct.
Thanks.
Well, thank you back.....
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: Sun Jun 03, 2007 4:10 am    Post subject:
Reply with quote

Hello Itanium,

Thank you for posting your tests and the results.

As you see from some previous replies, you verified what several of us expected would happen.

Hopefully, Sree has learned something new or will post the situation that did not work as desired so we might clarify what happened in that test.
Back to top
View user's profile Send private message
srebba
Warnings : 1

New User


Joined: 26 Apr 2007
Posts: 37
Location: USA

PostPosted: Mon Jun 11, 2007 8:10 pm    Post subject: Re: Move from comp-3 to comp
Reply with quote

Yes Dudes,

Ur right. i have tested, previosuly I had record layout and i tested. at that time it did not work. now i coded separete field and i tested , it worked.

Thanks for arouse
Sree
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: Mon Jun 11, 2007 8:22 pm    Post subject:
Reply with quote

You're welcome.

Thanks for posting your result icon_smile.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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm
No new posts Need information on COBOL MOVE CORRES... subratarec COBOL Programming 10 Tue Jun 28, 2016 10:38 pm


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