CSCI 320 Business Programming in COBOL Spring 2008

Week

Material to be covered

Lab & Homework Assignments

#1

1/24

- Syllabus
- Chapter 1

MS 2003 Version
Old Notes    

Lab 1 - Turn in the source listing and output tonight or I can come around and grade it.

copy this to the LAB1 directory on the VAX

copy SAMPLE.COB USR1:[dtucker.cobol.spring2011.lab1] lASTnAME_LAB1.COB

 

Download Putty Here

Syntax Guide

Decent page of VMS commands

Another VMS commands page

To log in:


login using your username and the initial password is
set to first initial of fist name+012111+first initial of last name.

 

IP address for the new alpha is: 147.64.32.12  -> use this for the IP address in putty or any telnet

 

#2

1/31

Chapter 2
 

Examples in class.#8 on Page 61.
#4,5,6 page 100

Chapter 3

- We'll do some examples for creating file sections & making the record structure

Homework Assignment: Review Questions I & II at the end of the chapter 1 - turn in Monday (you do not have to do these)


Lab 2 - Do number #7 p. 61.  (Interactive Program to determine total cost of item)


Assignment 1 Problem # 3 Page 133.  In this problem you read in from one file and create 2  new files.  The data can be found on your student disk, ch0403.dat.  Due Feb 7th,   Turn into ASSIGNMENT1 directory.
Data Set

Please Read the Grading Criteria

#3

2/7

 

Chapter 4

 

Discuss a little on program design, do a simple diagrams for the 3rd lab.

Hierarchy Chart -> http://cnx.org/content/m18682/latest/

 

Chapter 5 -> We're going to skip this chapter.  It's about program design which by now you should know well.
 



- If time, go over another interactive program.

Extra -> Class Notes

 

Video on how to turn in your homework:

http://dtucker.cs.edinboro.edu/CSCI320/COPYFILECOBOL/copyfilecobol.htm 

Lab 3 -> Design Lab, making hierarchy charts & pseudo code

Screen shot of my command file SET.COM

That's a zero in "NLA0"

This script displays the directory, shows who's logged on then sets the CLS command so I can use it to clear the screen using "CLS" at any time for this log in session.  You would just open an editor, type this in, save as something with the .COM extension (SET.COM) then you run it by putting the '@' symbol in front of it like:

$ @SET.COM

#4

2/14

Chapter 6 -> Moving Data, Printing, Displaying Output.

 

Monday we will start on the screen lab


 

Assignment 2 - Number 1 page 297, plus add an option to print a report similar to the one in Figure 7.4 (next page).  Your program will  ask if the user wants to print a report, create a file or quit.  Obviously the report won't be exactly like the one in 7.4 but do print out all the info that is in the out-salary file in a nice, neat and orderly fashion.

Data File

Due: February 21st


Let's do this lab today after we cover the notes.
Lab 4: Playing with screen features

#5

2/21

Today:

  • Let's continue with the screen features lab
  • I'd like to look at your labs so far also
  • Chapter 7 - Computing in COBOL

Exam 1 - Chapters 1 - 7 ->  Open book

Assignment 3: Number 3 page 432.

Data can be found at: http://dtucker.cs.edinboro.edu/csci320/data

copy lastname_assign1.COB USR1:[dtucker.cobol.spring2011.ASSIGN3]

DON'T FORGET TO 'SET PROTECTION' SO I CAN SEE IT!
   ->   
$SET PROTECTION=(W:REWD) USR1:[DTUCKER.COBOL.SPRING2011.ASSIGN3]LASTNAME_ASSIGN1.COB

Link for Date Function

DUE:3/21

 

Lab 5 ->  An FTP example, I believe most of you have FTP'd already, if not you can try this method.  Used the dos FTP.

#6

2/28

  • Go Over Exam

  • Chapter 8 - Decision, IF and EVALUATE statements
Lab 6

# 9 page 341 - Let's incorporate lab 5 by using FTP for this exercise and editing in Notepad.  So try using FTP to get the following files and see if it will work in this directory.

Both starter files can be copied from the LAB6 directory in our Spring2011 folder under LAB6.COB and LAB6.DAT.

These have .txt extensions but hopefully we won't need these.

 

3/7/2011 we are on Spring Break

#7

3/14

Cover Chapter 9
Other Ch-9 Notes

Continue on last week's lab

Read the notes in the source code and finish the program, this is problem #10 page 382 where you ask the user for a statement and number of times and it prints it x number of times to a file.  You can have it print to the screen also.

When done copy your result back to my LAB6 directory:

#8

3/21

Chapter 10
Other Ch 10 notes

Sample procedure division of single control break (Problem 2 in Ch 10)

Assignment 4

Number 5, Page 554 & 555

TRANS-INVENTORY Data

WH-TABLE data

Due: 4/18

Save to :    USR1:[DTUCKER.COBOL.SPRING2011.ASSIGN4]

#9

3/28

Chapter 11

Chapter 12

 

Lab 7:

Practice with Validation (mini lab/assignment)
Let's work on #1 page 468 with a few modifications.  Make a simple program that validates user entered data according to the chart and requirements listed in a - d.  Instead of an error listing let's have it immediately respond to the user that the data is invalid.  So it will ask the user one question at a time and immediately tell you if it's valid.  See if you can make it so if the user doesn't put in leading zeros to any of the numeric fields that it does so for you.

Copy it up to USR1:[DTUCKER.COBOL.SPRING2011.LAB7]

Due 4/4

Some Stuff on Accept Statement

#10

4/4

Chapter 13

 

#11

4/11

Chapter 14

Lab 8

 

 Write a program that sorts the following data

CH14Lab.txt

According to the EMPLOYEE-NO which is the 1st 5 characters of the data. 
1.  Have it print the unsorted list
2. Then have it print the sorted list
3. Use the built in COBOL sort feature
4. Format for the data is found on page 643 Figure 14.7

#12

4/18

Review for the exam

Continue with Lab

 

Start on Chapter 15

Monday April 18th - Exam 2 - Chapters 8 - 14

Write a program:

  • IF & EVALUATE
  • Looping
  • Control Break
  • Validation (with error messages)
  • Array Processing
  • Reading from a File
  • Sort
  • Merge

 

#13

4/25

Edit Chapter 14's lab and add functionality to insert a record then re-print the list sorted.

Save the new list to your directory.

I'm not worried about how the output looks for this one.

One last assignment:

Assignmnet #5;   Page 736 #4 - Using a CALL statement to another file, also this one is user interactive instead of accessing files.

When you link it will look something like this:

$ LINK MAINPART, SUBPROGRAM

Then you will RUN MAINPART

Copy to USR1:[DTUCKER.COBOL.SPRING2011.ASSIGN5]

 

Due 5/2

#14

5/2

 

 

Advanced Topics:
Chapter 16

Chapter 17 & discuss the Final

Examples of Calling another program Caller, Callee

Chapter 17

Final Exam - Friday May 6th @ 6:00, yes that's right Friday May 6th at 6:00.

 

Assignments:
 

Assignment #

Due Date

Description

Copy to directory

1

2/7

Problem # 3 Page 133

Turn in to:

USR1:[DTUCKER.COBOL.SPRING2011.ASSIGNMENT1] directory

dtucker.cobol.spring2011.ASSIGNMENT1]

2

2/21

Number 1 page 297, plus add an option to print a report similar to the one in Figure 7.4 (next page).  Your program will  ask if the user wants to print a report, create a file or quit.  Obviously the report won't be exactly like the one in 7.4 but do print out all the info that is in the out-salary file in a nice, neat and orderly fashion

dtucker.cobol.spring2011.ASSIGNMENT2]

3

3/21

Number 3 page 432

dtucker.cobol.spring2011.ASSIGNMENT3]

4

4/18

Number 5, Page 554 & 555

dtucker.cobol.spring2011.ASSIGNMENT4]

5

5/2

Page 736 #4 - Using a CALL statement to another file, also this one is user interactive instead of accessing files.

dtucker.cobol.spring2011.ASSIGNMENT5]

 

Lab Exercises:

Lab#

Due Date

Description

Copy to directory

1

1/31

http://dtucker.cs.edinboro.edu/CSCI320/lab1.htm

dtucker.cobol.spring2011.lab1]

2

2/7

Do number #7 p. 61.

dtucker.cobol.spring2011.lab2]

3

2/14

http://dtucker.cs.edinboro.edu/CSCI320/lab5.htm

dtucker.cobol.spring2011.lab3]

4

2/21

http://dtucker.cs.edinboro.edu/CSCI320/ScreenLab.htm

dtucker.cobol.spring2011.lab4]

5

2/28

http://dtucker.cs.edinboro.edu/CSCI320/FTP_Lab.htm

dtucker.cobol.spring2011.lab5]

6

3/14

# 9 page 341 - Let's incorporate lab 5 by using FTP for this exercise and editing in Notepad.  So try using FTP to get the following files and see if it will work in this directory.Both starter files can be copied from the LAB6 directory in our Spring2011 folder under LAB6.COB and LAB6.DAT.These have .txt extensions but hopefully we won't need these.

dtucker.cobol.spring2011.lab6]

7

4/4

Practice with Validation (mini lab/assignment)
Let's work on #1 page 468 with a few modifications.  Make a simple program that validates user entered data according to the chart and requirements listed in a - d.  Instead of an error listing let's have it immediately respond to the user that the data is invalid.  So it will ask the user one question at a time and immediately tell you if it's valid.  See if you can make it so if the user doesn't put in leading zeros to any of the numeric fields that it does so for you.

Copy it up to USR1:[DTUCKER.COBOL.SPRING2011.LABCH11]

dtucker.cobol.spring2011.lab7]

8

4/18

 Write a program that sorts the following data

CH14Lab.txt

According to the EMPLOYEE-NO which is the 1st 5 characters of the data. 
1.  Have it print the unsorted list
2. Then have it print the sorted list
3. Use the built in COBOL sort feature
4. Format for the data is found on page 643 Figure 14.7

dtucker.cobol.spring2011.lab8]

 

Exams

 

There will be three (3) major exams. 
Exam 1 2/21
Exam 2 4/18
Exam 3 5/6 (Final Exam)