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

How to read records in reverse order in flat file? I know we can do it by reading all records into an array.... Then read records in reverse order by using subscript or index but can any body give me the exact code.

5 Answers   TCS,


What are all the divisions of a COBOL program?

0 Answers  


77 I pic 99 value 5 Perorm para-A I times. Para -A. move 10 to I. How many times the para-A will be executed.?

9 Answers   TCS,


The disposition parameter in the jcl is share ( DISP+SHR ) and the program opens file in extend mode what will happen?

6 Answers   Cognizant,


I have a sequential file. How do I access a record in this sequential file randomly in my program ?

8 Answers   CGI, Xansa,






how to change picture class of copy book variable inside program?

2 Answers  


how to convert the recors form vsam file to db2 table tru file aid

0 Answers   TCS,


how do you reference the printer file formats from cobol programs

0 Answers  


if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.

2 Answers   UST,


i WANT ALL ERROR codes IN CICS and DB2

2 Answers  


select TURE Statement(s) aboUt eject statemenet in cobol? a)The eject statememnt must be the only statement on the line b.It causes the program to edit abnormally c. eject statement can be written in either area A or area B d. specifies that the next source statement is to be printed at Top of the next page e.The EJECTstatement has no effect on the compilation of the source program itself

2 Answers  


There is a production file which has millions of records in it.The program that uses it ends up with an SOC7 abend.It is sure that the abend is due to some invalid data in the file.Is there any way to debugg the SOC7 abend with out giving displays? I need the record which is cause for the abend.

8 Answers   Danske, iGate,


Categories