View previous topic :: View next topic
|
Author |
Message |
pankajupadhyay Warnings : 1 New User
Joined: 04 May 2007 Posts: 13 Location: pune
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
The best thing you can do to prepare is to read up on Elementary moves in the manual. |
|
Back to top |
|
|
srebba Warnings : 1 New User
Joined: 26 Apr 2007 Posts: 37 Location: USA
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
srebba Warnings : 1 New User
Joined: 26 Apr 2007 Posts: 37 Location: USA
|
|
|
|
Pls Think abou the display statment...
U can not display COMP-3 field.. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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! |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
Quote: |
U can not display COMP-3 field |
why can't u ?? |
|
Back to top |
|
|
srebba Warnings : 1 New User
Joined: 26 Apr 2007 Posts: 37 Location: USA
|
|
|
|
I did and I have given the answer
Without my exp. how could i give the answer. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Itanium
Active User
Joined: 22 Jan 2006 Posts: 114 Location: India
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Itanium wrote: |
You are correct.
Thanks. |
Well, thank you back..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
srebba Warnings : 1 New User
Joined: 26 Apr 2007 Posts: 37 Location: USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome.
Thanks for posting your result |
|
Back to top |
|
|
|