Presentation is loading. Please wait.

Presentation is loading. Please wait.

Submitting Instructions on web site CS 1024 students Read guide

Similar presentations


Presentation on theme: "Submitting Instructions on web site CS 1024 students Read guide"— Presentation transcript:

1 Submitting Instructions on web site CS 1024 students Read guide
Download the EAGS Client Configuration Tool for Fall 1999 Save as box Save it somewhere Start, run, browse, double click on it Installs quickly Go to C:\TEMP and run CuratorSetup.exe

2 Now get the java runtime 1.2.2
US English version One large bundle Click on continue Accept Download from java.sun.com http download Save as, save Start,run,browse, double click… Go through the instructions Now use the submit link Association with data names

3 Chapter 4 COBOL notation Identification Division
Syntax and notational conventions - optional, required,lower & upper case Relevant to the book Identification Division Position in program Purpose and syntax provide identifying info - author,dates division and up to 6 paragraphs PROGRAM-ID & header are required 5 others are optional

4 Environment Division CONFIGURATION SECTION (Optional Entries)
Identifies the computer SOURCE-COMPUTER OBJECT-COMPUTER INPUT-OUTPUT SECTION Associates the files in the program with the files known to the OS FILE-CONTROL SELECT statement ASSIGN clause

5 Data Division FILE SELECTION LABEL RECORDS statement (optional)
FD (File Description) statement Size and type of each field Order in which the fields appear relationship of the fields LABEL RECORDS statement (optional) RECORD CONTAINS (record description) statement (optional) DATA RECORD IS statement (optional) documentation only

6 Figure 4.7 Development of a COBOL Program (File Section)
CREDITS UNION MEMBER INITIALS SCHOLARSHIP STUDENT NAME GPA LAST (a) Program Specifications (b) COBOL Entries FD STUDENT-FILE RECORD CONTAINS 27 CHARACTERS STUDENT-RECORD STU-NAME STU-LAST-NAME PIC X(15) STU-INITIALS PIC XX STU-CREDITS PIC 9(2) STU-UNION-MEMBER PIC X STU-SCHOLARSHIP PIC 9(4) STU-GPA PIC 9V99.

7 Data Division PICTURE CLAUSE PICTURE IS, PICTURE, PIC IS, PIC Size
Number of characters, positions Type 9 - numeric, 0-9 999 same as 9(3) Assumed decimal point Use of a V, PIC 9V99 can hold 1.23 X - alphanumeric, all characters including numbers as characters XXXXXX same as X(6)

8 Figure 4.3 Student Exam Record
STUDENT-NAME EXAM-SCORES SS-NUM LAST NAME FIRST NAME INIT MATH ENGLISH ALG GEO READ VOC LIT ALPHANUMERIC NUMERIC

9 DATA DIVISION RECORD DESCRIPTION
Figure 4.5 Assumed Decimal Point INCOMING RECORD DATA DIVISION RECORD DESCRIPTION VALUES 01 INCOMING-DATA-RECORD STUDENT-NAME PIC 9V STUDENT-NAME PIC 99V STUDENT-NAME PIC STUDENT-NAME PIC V999. v v v 9 87|65 4|3 | 210

10 Data Division Level numbers
Describe the relationship between the fields in the record Elementary Item - cannot be further divided Group Item - can be further divided Use 01 to 49 01 denotes a record as a whole used for fields within a record Elementry numbers must have picture clauses groups cannot have picture clauses

11 Data Division WORKING-STORAGE SECTION
defines any data name that does not appear in a file stores results of calculations, flags, switch control, constants Used to define print lines Intermediate data storage Filler - can use as a field name, not referenced anywhere else typically holds spaces or constants

12 Figure 4.4 Level Numbers and PICTURE Clauses
01 STUDENT-EXAM-RECORD STUDENT-NAME LAST-NAME PICTURE IS X(15) FIRST-NAME PICTURE IS X(15) MID-INITIAL PICTURE IS X SOC-SEC-NUM PICTURE IS 9(9) EXAM-SCORES MATH ALGEBRA PICTURE IS 9(5) GEOMETRY PICTURE IS 9(5) ENGLISH READING PICTURE IS 9(5) VOCABULARY PICTURE IS 9(5) LITERATURE PICTURE IS 9(5). 01 STUDENT-EXAM-RECORD STUDENT-NAME LAST-NAME PIC X(15) FIRST-NAME PIC X(15) MID-INITIAL PIC X SOC-SEC-NUM PIC 9(9) EXAM-SCORES MATH ALGEBRA PIC GEOMETRY PIC ENGLISH READING PIC VOCABULARY PIC LITERATURE PIC (a) Initial Coding (b) Alternative Specification

13 VALUE clause initializes contents of a field (Literals)
Numeric literals , VALUE 3.00 Non-numeric literals, VALUE ‘ENGINEERING’ Figurative constants (zero or space), VALUE SPACES

14 Figure 4.8 Development of a COBOL Program (Constants and Rates)
1. Calculate tuition due at the rate of $200 per credit. 2. The union fee is $ Compute the activity fee based on the number of credits taken; $25 for credits or less, $50 for 7 to 12 credits, and $75 for more than 12 credits Award a scholarship equal to the amount in the incoming record if, and only if, the GPA is greater than 2.5. (a) Excerpt from the Program Specifications WORKING-STORAGE SECTION CONSTANTS-AND-RATES PRICE-PER-CREDIT PIC 9(3) VALUE UNION-FEE PIC 9(2) VALUE ACTIVITY-FEES ST-ACTIVITY-FEE PIC VALUE ST-CREDIT-LIMIT PIC VALUE ND-ACTIVITY-FEE PIC VALUE ND-CREDIT-LIMIT PIC VALUE RD-ACTIVITY-FEE PIC VALUE MINIMUM-SCHOLARHSIP-GPA PIC 9V9 VALUE 2.5. (b) COBOL Entries

15 Figure 4.9 Development of a COBOL Program (Print Lines)
(a) Report Layout

16 Figure 4.9 Development of a COBOL Program (Print Lines)
01 HEADING-LINE FILLER PIC X VALUE SPACES FILLER PIC X(12) VALUE ‘STUDENT NAME’ FILLER PIC X(10) VALUE SPACES FILLER PIC X(7) VALUE ‘CREDITS’ FILLER PIC X(2) VALUE SPACES FILLER PIC X(7) VALUE ‘TUITION’ FILLER PIC X(2) VALUE SPACES FILLER PIC X(9) VALUE ‘UNION FEE’ FILLER PIC X(2) VALUE SPACES FILLER PIC X(7) VALUE ‘ACT FEE’ FILLER PIC X(2) VALUE SPACES FILLER PIC X(11) VALUE ‘SCHOLARSHIP’ FILLER PIC X(2) VALUE SPACES FILLER PIC X(10) VALUE ‘TOTAL BILL’ FILLER PIC X(48) VALUE SPACES DETAIL-LINE FILLER PIC X VALUE SPACES DET-LAST-NAME PIC X(15) FILLER PIC X(2) VALUE SPACES DET-INITIALS PIC X(2) FILLER PIC X(5) VALUE SPACES DET-CREDITS PIC 9(2) FILLER PIC X(2) VALUE SPACES DET-TUITION PIC 9(6) FILLER PIC X(7) VALUE SPACES DET-UNION-FEE PIC 9(3) FILLER PIC X(8) VALUE SPACES DET-SCHOLARSHIP PIC 9(5) FILLER PIC X(6) VALUE SPACES DET-IND-BILL PIC 9(6) FILLER PIC X(49) VALUE SPACES. (b) COBOL Entries


Download ppt "Submitting Instructions on web site CS 1024 students Read guide"

Similar presentations


Ads by Google