01rec1.
05 a pic 999v99 value 123.12
05 b pic 99v9 value 45.9

02 rec2.
05 x pic 999v99
05 y pic 99v99
05 z pic x(3) value 'abc'

if rec1 is moved to rec2 then what is the value of rec2?

Answers were Sorted based on User's Feedback



01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999..

Answer / sweety

rec2 will be

123124590

Is This Answer Correct ?    7 Yes 3 No

01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999..

Answer / praveen

REC2 will just contain 12312459 , the code was tested

Is This Answer Correct ?    2 Yes 1 No

01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999..

Answer / mahesh satya

123124590abc

Is This Answer Correct ?    1 Yes 1 No

01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999..

Answer / santhosh vayathuri

REC 2 WILL BE

123124591231

Is This Answer Correct ?    1 Yes 2 No

01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999..

Answer / kingmanish

Valur of REC2 would be

12312459abc

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More COBOL Interview Questions

what is internal sort and external sort ? which is preferable ?

2 Answers   TCS,


what happens when a copybook variables are declared using include statement ?

3 Answers   IBM,


Why occurs can not be used in 01 level ?

2 Answers   TCS,


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

4 Answers   Accenture,


I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different ways to update this column thru COBOL-DB2 program?

5 Answers  






What should be the sorting order for SEARCH ALL?

5 Answers  


If my program receives input feed from program in other system.. if the receiving field size is less than the sending field.. what abend will be happening.

1 Answers   HCL,


how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


have in 100 records in a flat file i want to move records like 1,3,5,7,9,11,.. to Output file1 and 2,4,6,8,10,12,14 .. records moved to Output file2..Pls Provide real time answer..

5 Answers   TCS,


How to open and see copy book ?

3 Answers  


What are the differences between COBOL and COBOL II?

1 Answers   CSC,


how will you define vsam file in select clause?

3 Answers   Patni,


Categories