01 a pic 9(3) value is 123
01 b pic 9(6)
move a to b
wht will be the value ? and
01 a pic x(6) value is abc
01 b pic x(3)
move a to b
wht will be the value ?
Answers were Sorted based on User's Feedback
Answer / arthi
1.
000123
2.
abc
Ravi, I guess you didnt mean the '-' as a minus sign in front of 000123, and abc. your answer is not clear enough.
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / kiran
Result
000123
abc
no "-" sign will come bcoze we didnt give like this
01 a pic s9(3) value is 123
01 b pic s9(6)
move a to b
wht will be the value ? and
01 a pic x(6) value is abc
01 b pic x(3)
move a to b
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ravi
Answer to first question is -000123
and answer to second question is -abc
| Is This Answer Correct ? | 6 Yes | 4 No |
Answer / pradip
1.
000123
2.
abc---
Well arthi, here - stands for blank space, correct me if am
wrong
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / praveen
Arati was correct. if you move x(6) varibale to x(3) there
will not be any blank spaces.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / cj
Numeric items are moved right to left (before the decimal
point) and left to right (after the decimal point) from
source item to the destination item.
So the answer for the first move=> Variable b will have
value 000123 in it. (In the question value 123 should be
within quotes)
Alphanumeric (as well as alphabetic) items are moved left to
right from source item to destination item.
So the answer for the second move=> Variable b will have abc
stored in it. (In the question value abc should be within
quotes)
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / chowdary
after executing this program output will be
b value is 000123
and
b value is abc
there is no blanks after abc in b, because we have taken
its length as 3 in pic clause.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is an explicit scope terminator?
What is report-item?
Write down the divisions of cobol program?
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB
wht is packed decimal in cobol
How to recover a deleted source physical file from library?
How many maximum number of procedures can we write in one COBOL program?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)
Can we access the a[0] in the array ?
What is file status 92?
how to code in cobol while using variable block file?