The following are functions in the sample program:
You already defined minimum forms of some of these functions before you ran an intermediate test of the program. Now you need to finish defining them.
Complete the GET-LIST function first.
move custmap.cusnum to cusnum; ***---- SETINQ CUSTOMER ------*** move 0 to count; move 0 to last; while ezesqcod = 0 and count < 10; read-and-save(); end; forwards();
Note: | You already defined the I/O option and I/O object. Add the text around the line containing the name of the I/O option and I/O object as shown here. The first line of the example should be entered on line one. The second line of the example should be entered on line three. Line numbers are displayed in the top right corner of the editor beside the I/O Object drop-down list box. The first number is the line your cursor is on. The second number is the number of the column your cursor is in. |
As shown in Figure 79, READ-AND-SAVE and FORWARDS have been added to the program diagram under GET-LIST.
Now, you can finish defining the BACKWARDS function.
To define BACKWARDS:
The New Part Package/Application window is displayed.
The new part is created and the Function Editor is displayed.
sub2 = last - 5; if sub2 < 1; move "Top of Customer file" to ezemsg; else; last = sub2 - 5; if last < 0; move 0 to last; end; move-it(); end;
VisualAge Generator will validate and format the statements. You must correct any errors before you save the part.
Your function should look like the one shown in Figure 80.
As shown in Figure 81, MOVE-IT has been added to the program diagram under BACKWARDS.
Now, you can finish defining the FORWARDS function.
To define processing statements for FORWARDS:
The New Part Package/Application window is displayed.
The new part is created and the Function Editor is displayed.
if last = count; move "No more Customer Records" to ezemsg; else; move-it(); end;
VisualAge Generator will validate and format the statements. You must correct any errors before you save the part.
Your function should look like the one shown in Figure 82.