Thread: COBOL

Definitions

Started by mxhernandez01 • user1 replies2 viewsLast activity 2 weeks ago
Post #1
0 votes
mxhernandez01
Reputation
0
Posts: 2
Joined: Apr 20, 2026, 6:53 PM
Posted: May 1, 2026, 8:50 PM

DATA DIVISION.
FILE SECTION.
FD EMPLOYEE-FILE.(FD is File Description. Does EMPLOYEE-FILE emcompass all the 01 and 05 variables?)
01 EMPLOYEE-RECORD.
05 EMP-ID PIC 9(5).
05 EMP-NAME PIC X(30).
05 EMP-SALARY PIC 9(7)V99.

WORKING-STORAGE SECTION.
01 WS-VARIABLES.
05 WS-TOTAL-SALARY PIC 9(9)V99 VALUE ZERO. (Do you have to specify a VALUE at first, and must it be ZERO?)
05 WS-COUNTER PIC 9(3) VALUE ZERO.
05 WS-EOF PIC X VALUE 'N'.
05 FILE-STATUS-CODE PIC X(2).

You must be signed in to reply to this thread