Downloading a COBOL program from CIS12 site! Please use speaker notes for additional information!

20
Downloading a COBOL program from CIS12 site! Please use speaker notes for additional information!

Transcript of Downloading a COBOL program from CIS12 site! Please use speaker notes for additional information!

Downloading a COBOL program from CIS12 site!

Please use speaker notes for additional information!

xsample1.html This is the program to view and download following the download instructions.sample1.cbl This is the program in .cbl formatc12first.dat This is the data file for sample1 and sample2.

Sample1 - xsample1.htmlSample1 - xsample1.html

If you click on xsample1.html, this is what you will see.

Sample1 - sample1.cblSample1 - sample1.cbl

This is sample1.cbl. Note that there is no visible line structure.

Save as...Save as...

xsample1.html

Save as...Save as...

Open xsample1.html in notepadOpen xsample1.html in notepad

xsample1.htmlxsample1.html

Eliminate the html and then same as xsample1.cbl

xsample1.cblxsample1.cbl

MicroFocus COBOLMicroFocus COBOL

File

Open for edit

results in the Open screen shown

Open in editorOpen in editor

In editorIn editor

After compileAfter compile

Successful compileSuccessful compile

File optionsFile optionsFile/Close will close the source code after the compile.

File/Open for execution will open the executable object code so the program can be run.

Note that I changed to output from PRINTER to “A:\SAMPOUT.DAT so that I could capture the output on floppy disk to bring to this slide show. I did this prior to the compile so that the change would be reflected in the object code.

Object codeObject code

When you open for execution, the object code programs which have a .int extension appear.

Execution...Execution...Xsample1.int is now open for execution and the cursor is positioned at the first executable instruction in the procedure division.

To execute the program, the programmer goes to Compile/Run and selects Run. At that point the program will be executed.

The STOP RUN message above indicates successful completion.

OutputOutput

Output from xsample1.int. The file is called sampout.dat.

Downloading data fileDownloading data file

Sample1.cblSample1.cbl

Program still runs with the music notes at the end of the line.

Sample1.cblSample1.cbl

Here I changed from PRINTER to OUT2.DAT. Notice that I deleted the music note when I changed the line.

Note that the STOP RUN message also appears here after successful execution.