-
sdlc phases
- software development life cycle
- Requirements Analysis phase
- Design phase
- Implementation phase
- Testing phase
- Release phase
- Maintenance phase
-
Requirements Analysis
- What the customer(s) want
- identify problems to be solved
- focus on what not how
- End result: functional specification document
- reviewed by customer, designers
before design phase
-
design phase
- focus on how
- break up the problem into smaller pieces
- decide how each component work and how they work together
- end result: design specification
- reviewed by designers and implementers
- not writing code
- after requirements analysis, before implementation
-
Implementation Phase
- Write the code according to the design
- often the shortest phase
- end result: program code
- Reviewed by designers, coders, testers
after design, before testing
-
Testing Phase
- Verify the code works according to the functional specification
- look for corner cases
- End result: test plan, program that works
- Reviewed by designers, coders and testers
after implementation, before release
-
Release Phase
- Working closely with customers
- Validate customer expectations
- Get feedback for next version
- Maintenance of this program
- End result:happy customers, $$
after testing, before maintenance
-
VSAM
- Virtual Storage Access Method
- high performance access method and data set organization
- organizes and maintains data via a catalog structure
- VSAM are the logical datasets for storing records.
- Files can be read sequentially and randomly in VSAM.
- allows data set sharing in both batch and online environment.
- cannot be stored on TAPE volume
- always stored on DASD space.
-
PERFORM types
- PERFORM procedure-name.
- PERFORM procedure-name UNTIL condition
- PERFORM [UNTIL condition] (inline)
- statement 1
- statement 2
- END-PERFORM
- PERFORM pro-name THRU pro-name-exit
-
READ
- READ file-name
- AT END statement
- END-READ
- READ INPUT-FILE
- AT END MOVE 'NO' TO DATA-REMAINS-SW
- END-READ
-
combine
05 NAME-IN-PIECES.
10 LNAME PIC...
10 FNAME PIC...
10 MID-INIT PIC...
into
05 ENTIRE-NAME PIC...
- MOVE SPACES TO ENTIRE-NAME.
- STRING FNAME DELIMITED BY SPACE
- ' ' DELIMITED BY SIZE
- MID-INIT DELIMITED BY SPACE
- ' ' DELIMITED BY SIZE
- LNAME DELIMITED BY SPACE
- INTO ENTIRE-NAME.
-
clear variables
INITIALIZE all numeric to 0's all alphanum to spaces.
INITIALIZE GROUP-ITEM - for all items in group
INITIALIZE GROUP-ITEM REPLACING NUMERIC BY ZERO
INITIALIZE GROUP-ITEM REPLACING ALPHANUMERIC BY SPACES
-
INSPECT replace one char or char string with another
change SC-NUM 123456789 to
123-456-789
- 05 SC-NUM PIC 9(9).
- 05 SC-NUM-OUT PIC 999B999B999
- MOVE SC-NUM TO SC-NUM-OUT.
- INSPECT SC-NUM-OUT REPLACING ALL ' ' BY '-'.
-
remove leading blanks in numeric field
INSPECT FIELD-W-BLANKS REPLACING LEADING ' ' BY '0'.
-
separate John B Smith
- MOVE SPACES INTO NAME-IN-PIECES.
- UNSTRING ENTIRE-NAME DELIMITED BY ' '
- INTO FNAME MID-INIT LNAME.
-
date and day clause chapter 8
-
-
class test
- IF identifier IS [NOT] NUMERIC
- ALPHABETIC
- ALPHABETIC-UPPER
- ALPHABETIC-LOWER
- ALPHANUMERIC ?
- NUMERIC allows only 0-9, not ,.$' '
- ALPHABETIC allows A-Z and ' '
-
sign test
- IF identifier or expression
- IS [NOT] POSITIVE
- NEGATIVE
- ZERO
-
condition-name test
- 88-level entry
- condition name defined in the DATA Division
- for elementary items only
- 05 YEAR-CODE PIC 9.
- 88 FRESHMAN VALUE 1.
- 88 SOPHOMORE VALUE 2.
- 88 JUNIOR VALUE 3.
- 88 SENIOR VALUE 4.
- 88 GRAD-STU VALUES ARE 5 THRU 8.
- 88 LOWER-CLASS VALUES ARE 1, 2.
- 88 UPPER-CLASS VALUES ARE 3, 4.
- 88 VALID-CODES VALUES ARE 1 THRU 8.
- IF FRESHMAN
- PERFORM ...
- END-IF.
- ...
-
IF SALARY > 30000 AND SALARY < 40000
...
END-IF. can be written as
IF DEPT = 10 OR 20
...
END-IF. is the same as
- IF SALARY > 30000 AND < 40000
- ...
- END-IF. (same var diff relation)
- IF DEPT = 10 OR DEPT = 20.
- ...
- END-IF. (same var and relation)
- Implied Conditions.
-
NEXT
- NEXT clause directs control to the statement following the period in an IF statement.
- No longer needed with END-IF. in COBOl-85.
-
-
ACCEPT dates
- ACCEPT identifier FROM DAY-OF-WEEK
- DATE
- DAY
- TIME
- DAY-OF-WEEK=1-7 meaning MON-SUM
- DATE=yymmdd
- DATE=yyddd (Julian date)
- TIME=hhmmsshh(hr, min, sec, hundreds of sec)
- 01 TODAYS-DATE.
- 05 TODAYS-YEAR PIC 99
- 05 TODAYS-MONTH PIC 99
- 05 TODAYS-DAY PIC 99
- ACCEPT TODAYS-DATE FROM DATE.
- can do COMPUTE with these
-
Perform 230 and
READ
AT END
NO AT END
END-READ.
|
|