Hey,
I startet learning cobol and get some problems withhin. To get in touch with the new language i wanted to run a sourcecode from the internet just to get a plan how cobol works. Now to the problem i got the code from a simple tictactoe game copied into the acubench but it doesnt work there are so many errors. did anyone of you could send me a working sourcecode from tictactoe for acubench.
01 GameOver PIC X VALUE 'F'.
01 Form1-SF-HANDLE usage handle.
screen section.
01 Form1, HELP-ID 1.
03 Form1-PB-OK, Push-Button,
COL 24.00, LINE 42.00, LINES 2.00 CELLS, SIZE 8.00 CELLS,
HELP-ID 2, ID IS 1, SELF-ACT, OK-BUTTON,
TITLE "OK".
03 Form1-PB-CANCEL, Push-Button,
COL 34.00, LINE 42.00, LINES 2.00 CELLS, SIZE 8.00 CELLS,
HELP-ID 3, ID IS 2, SELF-ACT, CANCEL-BUTTON,
TITLE "Cancel".
03 Form1-Pb-1, Push-Button,
COL 5.00, LINE 4.00, LINES 10.00 CELLS, SIZE 14.00 CELLS,
EXCEPTION-VALUE 1, ID IS 3, SELF-ACT,
TITLE "1".
03 Form1-Pb-1a, Push-Button,
COL 20.50, LINE 4.00, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 2, ID IS 4, SELF-ACT,
TITLE "2".
03 Form1-Pb-1b, Push-Button,
COL 36.00, LINE 4.00, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 3, ID IS 5, SELF-ACT,
TITLE "3".
03 Form1-Pb-1c, Push-Button,
COL 5.00, LINE 15.50, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 4, ID IS 6, SELF-ACT,
TITLE "4".
03 Form1-Pb-1d, Push-Button,
COL 20.50, LINE 15.50, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 5, ID IS 7, SELF-ACT,
TITLE "5".
03 Form1-Pb-1e, Push-Button,
COL 36.00, LINE 15.50, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 6, ID IS 8, SELF-ACT,
TITLE "6".
03 Form1-Pb-1f, Push-Button,
COL 5.00, LINE 27.00, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 7, ID IS 9, SELF-ACT,
TITLE "7".
03 Form1-Pb-1g, Push-Button,
COL 20.50, LINE 27.00, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 8, ID IS 10, SELF-ACT,
TITLE "8".
03 Form1-Pb-1h, Push-Button,
COL 36.00, LINE 27.00, LINES 10.00 CELLS,
SIZE 14.00 CELLS,
EXCEPTION-VALUE 9, ID IS 11, SELF-ACT,
TITLE "9".
PROCEDURE DIVISION.
DisplayBoard.
DISPLAY Standard GRAPHICAL WINDOW
LINES 48.00, SIZE 64.00, CELL HEIGHT 10,
CELL WIDTH 10, AUTO-MINIMIZE, COLOR IS 65793,
TITLE "Tic Tac Toe", TITLE-BAR, NO WRAP,
HANDLE IS Form1-SF-HANDLE .
display form1.
now you have to change your accept to accept form1 and handle exceptions
Hey,
I startet learning cobol and get some problems withhin. To get in touch with the new language i wanted to run a sourcecode from the internet just to get a plan how cobol works. Now to the problem i got the code from a simple tictactoe game copied into the acubench but it doesnt work there are so many errors. did anyone of you could send me a working sourcecode from tictactoe for acubench.
thanks you but i really dont get it this is my first screen
*{Bench}prg-comment
* Program1.cbl
* Program1.cbl is generated from C:\\TicTacToe\\Program1.Psf
*{Bench}end
IDENTIFICATION DIVISION.
*{Bench}prgid
PROGRAM-ID. Program1.
DATE-WRITTEN. Mittwoch, 9. April 2014 12:44:45.
REMARKS.
*{Bench}end
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
*{Bench}activex-def
*{Bench}end
*{Bench}decimal-point
DECIMAL-POINT IS COMMA.
*{Bench}end
INPUT-OUTPUT SECTION.
FILE-CONTROL.
*{Bench}file-control
*{Bench}end
DATA DIVISION.
FILE SECTION.
*{Bench}file
*{Bench}end
WORKING-STORAGE SECTION.
*{Bench}acu-def
COPY "acugui.def".
COPY "acucobol.def".
COPY "crtvars.def".
COPY "fonts.def".
COPY "showmsg.def".
*{Bench}end
*{Bench}copy-working
COPY "Program1.wrk".
*{Bench}end
LINKAGE SECTION.
*{Bench}linkage
*{Bench}end
SCREEN SECTION.
*{Bench}copy-screen
COPY "Program1.scr".
*{Bench}end
*{Bench}linkpara
PROCEDURE DIVISION.
*{Bench}end
*{Bench}declarative
*{Bench}end
Acu-Main-Logic.
*{Bench}entry-befprg
* Before-Program
*{Bench}end
PERFORM Acu-Initial-Routine
* run main screen
*{Bench}run-mainscr
PERFORM Acu-Spielabfragr-Routine
*{Bench}end
PERFORM Acu-Exit-Rtn
.
*{Bench}copy-procedure
COPY "showmsg.cpy".
COPY "Program1.prd".
COPY "Program1.evt".
*{Bench}end
REPORT-COMPOSER SECTION.
my first problem is to call the first subroutine which contains the second screecn with the blank board
IDENTIFICATION DIVISION.
*{Bench}prgid
PROGRAM-ID. spieler-vs-spieler.
DATE-WRITTEN. Mittwoch, 9. April 2014 12:48:03.
REMARKS.
*{Bench}end
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
*{Bench}activex-def
*{Bench}end
*{Bench}decimal-point
DECIMAL-POINT IS COMMA.
*{Bench}end
INPUT-OUTPUT SECTION.
FILE-CONTROL.
*{Bench}file-control
*{Bench}end
DATA DIVISION.
FILE SECTION.
*{Bench}file
*{Bench}end
WORKING-STORAGE SECTION.
*{Bench}acu-def
COPY "acugui.def".
COPY "acucobol.def".
COPY "crtvars.def".
COPY "fonts.def".
COPY "showmsg.def".
*{Bench}end
*{Bench}copy-working
COPY "spieler-vs-spieler.wrk".
*{Bench}end
LINKAGE SECTION.
*{Bench}linkage
*{Bench}end
SCREEN SECTION.
*{Bench}copy-screen
COPY "spieler-vs-spieler.scr".
*{Bench}end
*{Bench}linkpara
PROCEDURE DIVISION.
*{Bench}end
*{Bench}declarative
*{Bench}end
Acu-Main-Logic.
*{Bench}entry-befprg
* Before-Program
*{Bench}end
PERFORM Acu-Initial-Routine
* run main screen
*{Bench}run-mainscr
PERFORM Acu-Spieler-vsSpieler-Routine
*{Bench}end
PERFORM Acu-Exit-Rtn
.
*{Bench}copy-procedure
COPY "showmsg.cpy".
COPY "spieler-vs-spieler.prd".
COPY "spieler-vs-spieler.evt".
*{Bench}end
REPORT-COMPOSER SECTION.
later there should be the code for the game but so far i just want that after the click on button SpielervsSpieler should open the subroutin and the window.
could you please tell me how i know that i have to fix the button handler but i dont know where. this are the clb after layouting the screen in the screen modus. do i have to change the clb or which file do i have to change