Hello!
Brand new to cobol. Trying to make a simple program. Get no compiler errors but "answer" shows nothing when i press the calculate button "mybutton".
Dont have any books yet, so im kind a lost here...
Can anyone help?
Thanks,
cobman
Source:
03 PK-S-NUMBER1 PIC 9(3).
03 PK-S-NUMBER2 PIC 9(3).
03 PK-S-ANSWER PIC 9(10).
50 MYBUTTON VALUE 66.
WHEN MYBUTTON
COMPUTE PK-S-ANSWER = PK-SNUMBER1 + PK-S-NUMBER2.
DISPLAY PK-S-ANSWER.
EXIT.
Screen:
05 PK-H-NUMBER1, ENTRY-FIELD, RIGHT
COL 20 LINE 19,50 LINES 1 SIZE 6
ID IS 31 BEFORE PROCEDURE IS VIS-KOMMENTAR
3-D, ENABLED 1 VALUE PK-S-NUMBER1.
05 PK-H-NUMBER2, ENTRY-FIELD, RIGHT
COL 20 LINE 21,50 LINES 1 SIZE 6
ID IS 32 BEFORE PROCEDURE IS VIS-KOMMENTAR
3-D, ENABLED 1 VALUE PK-S-NUMBER2.
05 PK-H-ANSWER, ENTRY-FIELD, RIGHT
COL 20 LINE 19,50 LINES 1 SIZE 6
3-D, ENABLED 0, ID IS 33, VALUE PK-S-ANSWER.
03 PK-H-PUSH-MYBUTTON PUSH-BUTTON “calculate”
COL 28 LINE 29,50 LINES 19 SIZE 17
ID IS 35 ENABLED = 1 SELF-ACT
TERMINATION-VALUE = MYBUTTON.
Brand new to cobol. Trying to make a simple program. Get no compiler errors but "answer" shows nothing when i press the calculate button "mybutton".
Dont have any books yet, so im kind a lost here...
Can anyone help?
Thanks,
cobman
Source:
03 PK-S-NUMBER1 PIC 9(3).
03 PK-S-NUMBER2 PIC 9(3).
03 PK-S-ANSWER PIC 9(10).
50 MYBUTTON VALUE 66.
WHEN MYBUTTON
COMPUTE PK-S-ANSWER = PK-SNUMBER1 + PK-S-NUMBER2.
DISPLAY PK-S-ANSWER.
EXIT.
Screen:
05 PK-H-NUMBER1, ENTRY-FIELD, RIGHT
COL 20 LINE 19,50 LINES 1 SIZE 6
ID IS 31 BEFORE PROCEDURE IS VIS-KOMMENTAR
3-D, ENABLED 1 VALUE PK-S-NUMBER1.
05 PK-H-NUMBER2, ENTRY-FIELD, RIGHT
COL 20 LINE 21,50 LINES 1 SIZE 6
ID IS 32 BEFORE PROCEDURE IS VIS-KOMMENTAR
3-D, ENABLED 1 VALUE PK-S-NUMBER2.
05 PK-H-ANSWER, ENTRY-FIELD, RIGHT
COL 20 LINE 19,50 LINES 1 SIZE 6
3-D, ENABLED 0, ID IS 33, VALUE PK-S-ANSWER.
03 PK-H-PUSH-MYBUTTON PUSH-BUTTON “calculate”
COL 28 LINE 29,50 LINES 19 SIZE 17
ID IS 35 ENABLED = 1 SELF-ACT
TERMINATION-VALUE = MYBUTTON.