Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

The maximum number of dimensions that an array can have in COBOL-85 is ?

11 Answers  


COMP-3 field occupy ?

8 Answers  


study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 VALUE 2.5 01 D PIC 99 VALUE 3 COMPUTE A ROUNDED B C = A+B*C/D ON SIZE ERROR PERFORM PRINT-ERROR the comments of A.B.C after execution of the above statement are a.A=10 B=0 C=10 b.A=10 B=9.9 C=9.9 c.A=10 B=0 C=9.9 d.A=10 B=6 C=10

4 Answers   TCS,


What are the divisions in a cobol program? Which one is the mandatory division among them?

1 Answers  


Can we change the password using ALTER? anyone tried and changed?

0 Answers   IBM,


if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.

1 Answers   IBM,


How do define Dymanic array in cobol how do u define single demensional arry and multidymensional arry in ur cobol.

4 Answers   Cap Gemini,


how we separate the cobol cics statements from cobol&cics programming?

1 Answers   Valtech,


if you code move high-values to variable,can you move it into numeric variable or alphanumeric variable?

1 Answers   Patni,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?

6 Answers   Xansa,


What is EIBCALEN? Why it is used?

9 Answers   ADP,


can we redefine 77 level item is it possible

4 Answers   HCL,


Categories