1

So, I'm studying Cobol and qhen I try to build my code, I get the following error:

soma.cob:8: Error: Invalid level number 'linkage-section'

the file soma.cob, is that:

IDENTIFICATION DIVISION.
PROGRAM-ID.    SOMA.

data division.
working-storage section.
77 RESPT PIC 9(2) VALUE ZEROS.

linkage-section.
01 CAMP1 PIC 9(2).
01 CAMP2 PIC 9(2).

PROCEDURE DIVISION USING CAMP1 CAMP2.
    COMPUTE RESPT = CAMP1+CAMP2.        
    DISPLAY RESPT.

so, where is the problem ????

Travis Webb
  • 14,688
  • 7
  • 55
  • 109
Alexandre
  • 1,985
  • 5
  • 30
  • 55

1 Answers1

6

Instead of linkage-section., you need to write linkage section..

interjay
  • 107,303
  • 21
  • 270
  • 254
Brian Tiffin
  • 3,978
  • 1
  • 24
  • 34
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – brenjt Jan 28 '13 at 17:14
  • 1
    It does provide an answer. COBOL syntax calls for linkage section. linkage-section is a source code error. And that's exactly where the problem is. Apologies if the wording of the answer sounded terse. – Brian Tiffin Jan 28 '13 at 18:18