Skip to content

Cobol program unexpectedly throws '.' expected error #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
a2937 opened this issue Mar 31, 2025 · 0 comments
Open

Cobol program unexpectedly throws '.' expected error #8

a2937 opened this issue Mar 31, 2025 · 0 comments

Comments

@a2937
Copy link

a2937 commented Mar 31, 2025

Hi there. There's an issue with your interpreter. The follow program gives an NodeJS error.

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.

DATA DIVISION.
   WORKING-STORAGE SECTION.
   01 WS-NUM1 PIC S9(3)V9(2).
   01 WS-NUM2 PIC PPP999.
   01 WS-NUM3 PIC S9(3)V9(2) VALUE -123.45.
   01 WS-NAME PIC A(6) VALUE 'ABCDEF'.
   01 WS-ID PIC X(5) VALUE 'A121$'.

PROCEDURE DIVISION.
   DISPLAY "WS-NUM1 : "WS-NUM1.
   DISPLAY "WS-NUM2 : "WS-NUM2.
   DISPLAY "WS-NUM3 : "WS-NUM3.
   DISPLAY "WS-NAME : "WS-NAME.
   DISPLAY "WS-ID : "WS-ID.
STOP RUN.

And here is the error message.

F:\Cobol Practice\node_modules\.pnpm\[email protected]\node_modules\cobolscript\lib\cobolscript.js:1633
                throw "expected '.'";
                ^
expected '.'

Program from: https://www.tutorialspoint.com/cobol/cobol_data_types.htm

@a2937 a2937 changed the title Cobol program unexpectedly throws Cobol program unexpectedly throws '.' expected error Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant