Write the code to count the sum of n natural numbers.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More COBOL Interview Questions

how will u find out 3rd week's 2nd day using occurs ?

3 Answers   L&T,


can i use multiple when statements in search & search all ? justify ur answer?

2 Answers  


Suppose i have a variable with s9(18)v99 comp3 . what is the size of variable . If s9(18) comp3 is 10 bytes . There should be some difference between two allocations ? Thanks krishna chaitanya

2 Answers   CSC,


what happens if we wont give timestamp in precompilation process ?

4 Answers   Covansys,


Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?

4 Answers  






) how do u code after getting data?

0 Answers   IBM,


what is the difference between Plan & package

3 Answers   IBM,


what is the coding difference between COBOL and CICS.

8 Answers   Cap Gemini,


What is the output generated by the following code? 01 GRP-I. 05 SUBFLD1 PIC XX VALUE "AB". 05 FILTER PIC X(6) VALUE SPACES. 01 GRP-2 REDEFINED GRP-1. 05 SUB-FLD2 PIC XX. 05 SUB-FLD3 PIC XX. 05 FILTER PIC X(4). IF SUB-FLD1 NOT = SPACES DISPLAY "SUBFLD1" MOVE "ABBCCD" TO GRP-1 IF SUB-FLD3 = SPACES DISPLAY "SPACES" ELSE DISPLAY "SUBFLD3" DISPLAY "END" ELSE DISPLAY "SPACES" DISPLAY "END". (a) SUBFLD1 SUBFLD3 END (b) SPACES END (c) SUBFLD1 END (d) SUBFLD1 SPACES

7 Answers   TCS,


what is the advantage of using redefines instead of delaring the variables ?

5 Answers   HCL,


how to code in cobol while using variable block file?

1 Answers  


I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?

5 Answers   RBS,


Categories