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 are the situations u have used in ur project for Subcript and Index ? 1.if u use Subscript why not Index,why u choose Subscript only? 2.if u use Index why not Subscript,what abt Displacement?

2 Answers   Cap Gemini,


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


how to convert vsam table into DB2 table?

1 Answers   IBM, Wipro,


In a program, variables are used but no DB2 involved in it. Can you call it as host variables??

4 Answers   EDS,


How can I tell if a module is being called DYNAMICALLY or STATICALLY?

3 Answers   CTS,


What is the difference between PIC 9.99 and 9v99?

7 Answers  


what is Pic 9v99 Indicates?

2 Answers  


I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?

1 Answers  


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

1 Answers  


How do you define a variable of COMP-1? COMP-2?

3 Answers  


how to crack cts interview apps? NOVEMBER 21 2010

2 Answers   CTS,


What is a scope terminator give example?

1 Answers  


Categories