View previous topic :: View next topic
|
Author |
Message |
ramcse
New User
Joined: 29 Mar 2008 Posts: 3 Location: Bangalore
|
|
|
|
What will happen when we try to move a value to following numeric edited symbol....
Working storage section.
01 x pic 0z(3).
procedure division.
move 0001 to x.
display x.
Tell me the output for this..
this is the question asked in a interview..... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The idea of the interview questions forum is for you to post your solution looking for guidance and corrections where appropriate. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
What will happen when we try to move a value to following numeric edited symbol.... |
So, how did you answer the interviewer?
Do not be concerned about being correct or incorrect - we don't keep score and answers receive neither prize nor penalty
d |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I don't think your picture clause is valid. Care to double check it? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Oops -- I stand corrected (by myself!). After I RTFMd, I discovered that 0 is a legitimate editing character. 30 years of COBOL programming and I've never used it! |
|
Back to top |
|
|
ramcse
New User
Joined: 29 Mar 2008 Posts: 3 Location: Bangalore
|
|
|
|
i replied zero suppression will not take place.... is it correct |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
I tested the PICTURE and got
|
|
Back to top |
|
|
ramcse
New User
Joined: 29 Mar 2008 Posts: 3 Location: Bangalore
|
|
|
|
i got it now.... Very thanks to all.... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
i got it now.... Very thanks to all.... |
You're welcome
I am puzzled why such a question would be in an interview. . .
d |
|
Back to top |
|
|
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Quote: |
I am puzzled why such a question would be in an interview |
I think such kind of questions do not make or break a selection during the interview. These questions are just thrown to assess how deeply the candidate knows about the subject he is dealing with. Also some of the interviewers have a tendency to keep on asking more and more complex questions until the candidate is stuck. |
|
Back to top |
|
|
|