Material to be covered
Lab & Homework
- Chapter 1
MS 2003 Version
Lab 1 - Turn in the source listing and output
tonight or I can come around and grade it.
this to the LAB1 directory on the VAX
then set protection on it:
$SET PROTECTION=(W:REWD) USR1:[DTUCKER.COBOL.SPRING2013.LAB1] LASTNAME.COB
Decent page of VMS commands
VMS commands page
To log in:
IP address for the new alpha is: 220.127.116.11
-> use this for the IP address in putty or any telnet
The username for VMS is the username for their
network/e-mail account, i.e. nc090776
The initial password is: first initial first name +
first initial last name + 012312 - i.e. nc012312
Name of Machine is Balta (don't have to know this
in class.#8 on Page 61.
#4,5,6 page 100
We'll do some examples for creating file sections & making the record
2 - Do number #7 p. 61. (Interactive Program to determine total
cost of item)
Hint for trim leading zeros when running your program:
PIC X(10) **** for your input (accept statement)
SALES_AMT_IN PIC 9999v99 **** for
doing the math
Move into numeric field:
MOVE FUNCTION NUMVAL(INPUT_DATA) TO
SALES_AMT_IN ** This trims leading zeros and takes care of decimal
point from what the user entered.
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.
Please Read the Grading Criteria
a little on program design, do a simple diagrams for the 3rd lab.
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
- If time, go over another interactive program.
Extra -> Class Notes
Lab 3 -> Design Lab, making hierarchy charts
& pseudo code
shot of my command file SET.COM
a zero in "NLA0"
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:
Chapter 6 -> Moving Data, Printing,
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.
do this lab today after we cover the notes.
Lab 4: Playing with screen features
Chapter 7 - Computing in COBOL
Chapter 8 - Decision, IF and EVALUATE
Talk about Exam
1 - Chapters
1 - 7 -> Open book
** PAC Meeting tomorrow **
Assignment 3: Number 3 page 432.
Data can be found at: http://dtucker.cs.edinboro.edu/csci320/data/CH1003.txt
DON'T FORGET TO 'SET PROTECTION' SO I CAN SEE
-> $SET PROTECTION=(W:REWD)
* When class starts- Exam
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.
starter files can be copied from below.
have .txt extensions so they can be downloaded from the web site.
Depending on how you do it you may need to change the file extensions .COB
Try using some form of FTP, either the built in one
from Balta, Windows, or a stand-alone such as WS-FTP or Filezilla.
Filezilla is a popular one I see a lot of
students using. Once you do this you may choose to always edit your
programs this way becuase you have your choice of editior.
done copy your result back to the LAB6 directory:
| Go Over Exam
Cover Chapter 9
Extra lab on Chaper 9:
copy USR1:[dtucker.cobol]CHAPTER9LABFIX.cob lastname.cob //note this is not in the spring2013 directory structure
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 LAB9 directory:
COPY CHAPER9LABFirstInitialLastName USR1:[DTUCKER.COBOL.SPRING2013.LAB9]
then set protection on it so I can read it.
$SET PROTECTION=(W:REWD) USR1:[DTUCKER.COBOL.SPRING2013.LAB9]NAME_OF_FILE.COB
3/18/2013 we are on Spring Break
Other Ch 10 notes
Sample procedure division of single
control break (Problem 2 in Ch 10)
5, Page 554 & 555
to : USR1:[DTUCKER.COBOL.Spring2013.ASSIGNMENT4]
with Validation (mini lab/assignment)
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.
it up to USR1:[DTUCKER.COBOL.Spring2013.LAB7]
on Accept Statement
Review for the exam
Article that came out today about if Universitys should teach COBOL
Exam 2 - Chapters 8 -
- IF & EVALUATE
- Control Break
- Validation (with error
- Array Processing
- Reading from a File
program that sorts the following data
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
Input data file for the example
Chapter 14's lab and add functionality to insert a record then re-print
the list sorted.
the new list to your directory.
not worried about how the output looks for this one.
#5; Page 736 #4 - Using a CALL statement to another file,
also this one is user interactive instead of accessing files.
you link it will look something like this:
LINK MAINPART, SUBPROGRAM
you will RUN MAINPART
Chapter 17 & discuss the Final
of Calling another program Caller, Callee
Edit your Assignment 3 to make it use the report writer
Basically look at this, replace much of your code & try and get it to work.
This does not include anyting above the working storage section with the date hoder. That part should be the same as your old program.
Final Exam - Final Exam 8:00 am - 10:00
am Wednesday May 9th Hamilton Hall LL
copy USR1:[dtucker.cobol.spring2013]DISK1.SEQ DISK1.SEQ