MICRO FOCUS Animator V2
From the Start Menu, selectAnimator Version 2 Window
Edit+Execute:<newfile> Window
--------------------------------------------------------------------------------
Instructions for Compiling and Executing Sample Code
Lab Exercise:
Follow the steps to get to the Animator Edit+Execute screen for a new file.
Type the SAMPLE code discussed in class.
Save the file on your diskette.
Continue to follow the steps to check (compile) your program.
Before you can execute your program, you must create the data on your diskette "A:\infile1.txt".
If the check step produces errors, correct the syntax errors and check again.
When you receive the message 'STOP RUN encountered with RETURN-CODE = H'00000000' , your program executed successfully.
Be sure to save the final version of your program.
After you have compiled and executed your program, verify that you have files with the following extensions on your diskette:
File Extension Meaning
.CBL COBOL source code. Used for input to the Checker(compiler).
.INT
Short for 'intermediate code', a compact binary code which is produced by the Checker (compiler), and which can be executed..LST or no extension
.IDY
An Animator information file, produced by the Checker (compiler) and used by the Animator.
Lab Exercise
1.Create the input file infile1.txt on your diskette and save as
"A:\infile1.txt"
The data is:
WALT BECHTEL
40750
NELSON KERBEL 35800
MARGOT HUMMER 42550
2.Follow the steps to get to the Animator Edit+Execute screen for a new file.
3.Type the following code:
IDENTIFICATION DIVISION.
PROGRAM-ID. EXAMPLE.
AUTHOR. YOUR NAME.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO "A:\infile1.txt"
ORGANIZATION IS LINE SEQUENTIAL.
SELECT OUTPUT-FILE ASSIGN TO "CON"
ORGANIZATION IS LINE SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-REC PIC X(50).
FD OUTPUT-FILE.
01 OUTPUT-REC PIC X(50).
WORKING-STORAGE SECTION.
01 ARE-THERE-MORE-RECORDS PIC XXX VALUE 'YES'.
PROCEDURE DIVISION.
100-MAIN-MODULE.
OPEN INPUT INPUT-FILE
OUTPUT OUTPUT-FILE
PERFORM UNTIL ARE-THERE-MORE-RECORDS = 'NO '
READ INPUT-FILE
AT END MOVE
'NO ' TO ARE-THERE-MORE-RECORDS
NOT AT END
PERFORM 200-PROCESS-RECORD
END-READ
END-PERFORM
CLOSE INPUT-FILE OUTPUT-FILE
STOP RUN.
200-PROCESS-RECORD.
MOVE INPUT-REC TO OUTPUT-REC
WRITE OUTPUT-REC.
4.Save the file on your diskette.
5.Continue to follow the steps to check(compile) and run(execute) your program.
6.If the check step produces errors, correct the syntax errors and check again.
7.When you receive the message 'STOP RUN encountered with RETURN-CODE = H'00000000' , your program executed successfully.
8.Be sure to save the final version of your program.
9.In the DePaul labs, for the output to print, you must completely exit the Micro Focus software.
10.After you have compiled and executed your program, verify that you have files with the following extensions on your diskette:
File Extension Meaning
.CBL COBOL source code. Used for input to the Checker(compiler).
.INT Short for 'intermediate code', a compact binary code which is produced by the
Checker (compiler), and which can be executed.
.LST (or no extension) Compiled source listing produced by the Checker (compiler) when
the LIST file option is selected.
.IDY An Animator information file, produced by the Checker (compiler), used by the Animator.