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

example for sub strings ? and refernce modifications whit output pls

0 Answers   College School Exams Tests, IBM,


What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?

2 Answers  


How many maximum number of procedures can we write in one COBOL program?

6 Answers  


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

4 Answers   EDS,


Why would you use find and get rather than to obtain?

0 Answers  






how do u indetify files succesfully executed or not ?

4 Answers   TCS,


What is the difference between next sentence and continue in cobol programing language?

0 Answers  


I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non-duplicate that will be move to valid file.thank you

1 Answers  


Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?

7 Answers  


what is sync clause?

2 Answers   DELL,


how to access the file from prodution from changeman tool and to submit a file to production

1 Answers   IBM,


I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?

6 Answers   IBM,


Categories