Hipromark
23 de enero de 2017, 21:49
Hola. Estoy iniciándome en COBOL y estoy haciendo ejercicios de un libro "Sams Teach Yourself Cobol". Les solicito su ayuda con unos errores que me salieron.
Tengo instalado en Windows 7 el compilador OpenCobolIDE. Cuando compilo el programa que hice siguiendo las instrucciones del libro, me da estos errores:
PROGRAM-ID header missing.
PROCEDURE DIVISION Header missing.
syntax error, unexpected Exponentiation operator.
Todos en la línea 1 supuestamente, según marca el compilador.
El programa es este:
IDENTIFICATION DIVISION.
PROGRAM-ID.Chapt04a.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Dollar-Amount Pic 9(5)v99 Value 12.99.
01 Item-Description Pic X(10) Value "Gold coins".
SCREEN SECTION.
01 My-Main-Screen Blank Screen,
Auto, Required,
Foreground-Color is 7,
BACKGROUND-COLOR is 1.
03 Line 1 Column 35 Value "Item Entry".
03 Line 3 Column 5 Value "Item Value" Highlight Bell.
03 Line 3 Column 16 Pic $$,$$$.99 From Dollar-Amount.
03 Line 5 Column 5 Value "Item Description" Highlight.
03 Line 5 Column 22 Pic x(10) From Item-Description.
03 Line 6 Column 4 Value "Short Description" Highlight.
03 Line 6 Column 22 Pic x(5) From Item-Description
Justified Right.
PROCEDURE DIVISION.
Chapt04a-Start.
Display My-Main-Screen.
STOP RUN.
END PROGRAM Chapt04a.
Gracias por su ayuda.
Tengo instalado en Windows 7 el compilador OpenCobolIDE. Cuando compilo el programa que hice siguiendo las instrucciones del libro, me da estos errores:
PROGRAM-ID header missing.
PROCEDURE DIVISION Header missing.
syntax error, unexpected Exponentiation operator.
Todos en la línea 1 supuestamente, según marca el compilador.
El programa es este:
IDENTIFICATION DIVISION.
PROGRAM-ID.Chapt04a.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Dollar-Amount Pic 9(5)v99 Value 12.99.
01 Item-Description Pic X(10) Value "Gold coins".
SCREEN SECTION.
01 My-Main-Screen Blank Screen,
Auto, Required,
Foreground-Color is 7,
BACKGROUND-COLOR is 1.
03 Line 1 Column 35 Value "Item Entry".
03 Line 3 Column 5 Value "Item Value" Highlight Bell.
03 Line 3 Column 16 Pic $$,$$$.99 From Dollar-Amount.
03 Line 5 Column 5 Value "Item Description" Highlight.
03 Line 5 Column 22 Pic x(10) From Item-Description.
03 Line 6 Column 4 Value "Short Description" Highlight.
03 Line 6 Column 22 Pic x(5) From Item-Description
Justified Right.
PROCEDURE DIVISION.
Chapt04a-Start.
Display My-Main-Screen.
STOP RUN.
END PROGRAM Chapt04a.
Gracias por su ayuda.