New Jersey Institute of Technology (NJIT)
Computer and Information Science Department (CIS)
CIS365-001:
File Structures and Management, Fall 1999
Professor: Michael
Bieber
To do this tutorial, refer to the instructions on the handout "Installing, Editing, Compiling, ... Fujitsu COBOL"
Do each of the seven parts on this tutorial. Each teaches a skill you will need to know when the programs get more complex.
Type in, compile (with the compile options), link (with the link options) and execute (using the WINSVD debugger) the program "calc1.cob" (without the line numbers). If you have any syntax errors, then return to the editor to fix them. Start WINSVD. (Because this program does not use files, you do not have any additional execution parameters for the "Environment Variables Information" window - just click on OK.) You should see the first line of your procedure division highlighted in yellow. Use the go option in the debugger. Ensure you get the appropriate output displayed in the Console window.
Now look at how the program actually executes. Please do each of these steps!
Type in the program "calc2.cob" (without the line numbers). Compile using the compile options. Fix the syntax errors in the program in the editor. Re-compile with the compile options, link with the link options, and then start WINSVD. (Because this program does not use files, you do not have any additional execution parameters for the "Environment Variables Information" window.) You should see the first line of your procedure division highlighted in yellow. Use the go option in the debugger. Ensure you get the appropriate output displayed in the Console window.
Now look at how the program actually executes. Please do each of these steps!
Use a Web browser to display and save the following program: http://www.cis.njit.edu/~bieber/outgoing/makepay.cob. Save it to your own hard drive, compile, link and execute (using the debugger). When executing you have to add a parameter for the output file: "OUT=payments.dat" (without quotation marks) where payments.dat will be the name of the output file this program creates.
Run the program using the go option in the debugger. Ensure you get the appropriate output displayed in the Console window. Note that for all aphanumeric input (PIC X variables) you must enter enough blank spaces to pad it the length of the variable. This includes the "no " that ends your program.
Now look at how the program actually executes. Please do each of these steps!
View your output file using the Fujitsu File Utilities. Note that you have to give a record length of 35 - 2 greater than the actual length.
This page: http://www.cis.njit.edu/~bieber/CIS365F99/tutorial.html