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

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

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

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 / ravi

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

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

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

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

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

Post New Answer



More COBOL Interview Questions

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

0 Answers  


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

2 Answers  


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

4 Answers   Accenture,


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

0 Answers  


can we use reference modification an arry.

1 Answers  






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

0 Answers  


What is the use of intialize verb?

0 Answers  


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.

4 Answers   TCS,


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

0 Answers  


what are the utilities for load and unload the DB2 tables

1 Answers   L&T,


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

3 Answers   TCS,


What is an in-line perform ?

4 Answers   Accenture,






Categories