01 var1 pic s9(9)v99.
01 var2 pic x(30).
procedure division.
move 12345.99 to var1.
move12345.99 to var2.
display var1.
display var2.
what is the output?

Answers were Sorted based on User's Feedback



01 var1 pic s9(9)v99. 01 var2 pic x(30). procedure division. move 12345.99 to var1. move12345...

Answer / kingshuk

var1:0000123459I

If we move 12345.99 to var2 it will give a compilation error.
It should be move '12345.99' to var2.Then

var2:12345.99

Is This Answer Correct ?    16 Yes 4 No

01 var1 pic s9(9)v99. 01 var2 pic x(30). procedure division. move 12345.99 to var1. move12345...

Answer / john benito

Will abend.
Pic clause is not allowed in 01 level.

Is This Answer Correct ?    3 Yes 28 No

Post New Answer

More COBOL Interview Questions

What is the default value of DISP for temp datasets

5 Answers   IBM,


What is the usage of comp fields in cobol?

0 Answers  


What is the file organization clause ?

2 Answers  


i have a file which contains records like 10,30,90,50,20,40,80,60,70 i want to display these records in reverse order like 70,60,80,40,20,50,90,30,10 please give me the cobol code (do not sort the records)

3 Answers   Cap Gemini, Mind Tree,


what is amode(24), amode(31), rmode(24) and rmode(any)?

0 Answers  






What kind of error is trapped by on size error option?

0 Answers  


can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dynamic array?

3 Answers   IBM, Satyam,


level number 77 is used to define a)group data b)elementary data c)redefine d)none

8 Answers   TCS,


I know my query will return more than one row but I don't want cursor what should I do?

1 Answers  


Write a program to concert an Indexed file into Sequential file?

1 Answers   Covansys,


what is the default print format? in cobol

3 Answers   HSBC,


what do you mean by copybook? and what is the difference between the copybook which we are using in working storage and procedure division.

3 Answers   HCL, TCS,


Categories