Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

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

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

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

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

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

Answer to first question is -000123
and answer to second question is -abc

 Is This Answer Correct ? 6 Yes 4 No

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

1.
000123

2.
abc---

Well arthi, here - stands for blank space, correct me if am
wrong

 Is This Answer Correct ? 3 Yes 2 No

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

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

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

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

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

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

More COBOL Interview Questions

What is the difference between comp and comp-3 usage?

When can the USING phrase be included in the call statement ?

If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??

What is the difference between a binary search and a sequential search what are the pertinent cobol?

can we use reference modification an arry.

How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

What is the use of intialize verb?

Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.

What is the difference between structured cobol programming and object alternativelyiented cobol?

what are the utilities for load and unload the DB2 tables

how to run sub programs using static and dynamic call ...

What is an in-line perform ?

Categories