The first time I got in touch with Cobol today, the lecturer was an English speaker. It was really hard to take the course. Alas .... the English is not good. There are two books in China that feel okay, the simple guide of COBOL and the programming language design of COBOL (TAN haoqiang)
The following is the first program and a hello program. The tool is
First open programming-staff, file --> New the editor area appears, file --> New write your program, save and close, return to programming-staff and select wincob under the Tools menu --> source file --> OK. The MSG prompt is displayed. Statistics: highest severity code = I, Program unit = 1.
Indicates correct compilation
Next, choose Tools menu in programming-staff, winlink --> link file input box input file such as: C:/cobolsource/PROG-2.OBJ here in the target input box will appear the same file path, at this time, I changed the cobolsource to cobolload. If I didn't change it, the operation was unemployed and the cobolload folder should be created first. click OK to open a new window and close other Windows except the staff window.
Next step. tools --> winexec --> in the command line box, enter your link-based file name. For example, if my file is C:/cobolload/PROG-2.EXE --> click OK, when a new window appears, select the items you want in the List table. I am currently using @ iconname = cob85exe. I am not quite clear about other items. I cannot use the lecturer's language. --> OK run
Save the file name as prog1
@ Options main
Identification Division.
Program-id. prog1
Author. Jeff
Environment Division.
Configuration section.
Source-computer. IBM-PC.
Object-computer. IBM-PC.
Input-output section.
File-control.
Select in-file assign "input. txt"
Organization line sequential.
Data Division.
FILE Section.
FD in-file.
01 In-record picture X (80 ).
Procedure division.
Open input in-file.
Read in-file.
Display in-record.
Close in-file.
Stop run.
The file name saved by the hello program is "hello ".
@ Options main
Identification Division.
Program-ID hello.
Author. LiuYa
Environment Division.
Data Division.
Procedure division.
Display "Hello COBOL ".
Stop run.