Separate speaker notes to accompany screensection presentation:

Slide #1:

This presentation deals with the screen section in COBOL.

Slide #2:

This program displays information on the screen using a layout of the entire screen structure that is set up in the screen section.

Two fields are going to be displayed on the screen. They are ID-IN and NAME-IN which came in when I read the data file. The FROM clause tells where the screen is going to get the data.

Note that when the user is ready to end the screen display, the enter a response. The response is taken in and saved in the field defined in WORKING-STORAGE to hold the response. In this example that is RESPONSE-IN-WS.

Note that entries like BLANK SCREEN can also be made with the first thing displayed on the line - in other words, with the first 05.

Slide #3:

The DATA-ENTRY-SCREEN is the 01 name of the screen defined in the SCREEN SECTION. Remember it is the layout of the whole screen, not just an individual line.

Slide #4:

This is essentially the same program. This time however the data is taken from a working storage area that the record is read into when the READ statement is issued. See next slide.

There is also a difference in background color and the fore ground color is not mentioned so the default is used.

Slide #5:

In this program, data is taken in from the screen and stored in working storage. It will then be written to the screen.

When the user moves from the place to enter the id to the place to enter the name, it is done with the tab. When enter is pressed, the screen is done. Be careful not to attempt to move from field to field with the enter, the screen will be ended when you press enter. Use the tab!

Slide #6:

Note that there are two similar versions of this program. This is from SCR1FROM.CBL.

Slide #7:

In this program, data is taken in from the screen and stored in working storage. It will then be written to the screen.

When the user moves from the place to enter the id to the place to enter the name, it is done with the tab. When enter is pressed, the screen is done. Be careful not to attempt to move from field to field with the enter, the screen will be ended when you press enter. Use the tab!

Slide #8:

The data is taken in from the user and then written to the disk.

Note the similarity between the READ which has an initializing read before starting the loop and a READ at the bottom of the loop which reads all other records. The DISPLAY and ACCEPT combination with full screen processing is handled logically in the same way.

Slide #9:

The screen is display waiting for user input. Again, note that after the id has been entered, the user must use the tab to move to the name and then the tab to move to the choice. When the choice has been keyed in, the enter key can be pressed because the user is done with the screen.

Slide #10:

In this example, I have divided the screen into three sections. One to receive the id, one to receive the name and one to receive the user response.

Slide #11:

This is the program that shows the data being taken in from three sections. Note that the names that are used are defined at the 05 level in the screen section. Previously we have used the 01 level name exclusively.

Slide #12:

The USING is the combination of the FROM and the TO. It puts the data on the screen and lets the user change it.

Slide #13:

When USING is used the file is opened for input and output as an I-O file meaning the file can be read from and written to. To write, I use the REWRITE which puts the information back in the same record from where it was retrieved. This is beyond the scope of this course, however I did want to mention the USING.