Book description
Based on the best-selling, COBOL text by Robert and Nancy Stern.
* Increased coverage of ILE COBOL and subfiles.
Table of contents
- Copyright
- ACKNOWLEDGMENTS
- PREFACE
-
1. PHYSICAL FILES
- 1.1. CHAPTER OBJECTIVES
- 1.2. HIERARCHY OF DATA
- 1.3. INTERNAL BINARY REPRESENTATION OF DATA
- 1.4. DATA TYPES
- 1.5. ALPHANUMERIC (CHARACTER) FIELDS
- 1.6. NUMERIC FIELDS
- 1.7. ZONED DECIMAL FORMAT
- 1.8. PACKED DECIMAL FORMAT
- 1.9. PACKING NUMERIC DATA
- 1.10. CONVERTING ZONED DECIMAL FORMAT TO PACKED DECIMAL FORMAT
- 1.11. CONVERTING PACKED DECIMAL FORMAT TO ZONED DECIMAL FORMAT
- 1.12. DATE FORMAT
- 1.13. DATA FILES
- 1.14. ACCESS PATHS
- 1.15. HOW DATA ARE ORGANIZED AND RETRIEVED IN AN ARRIVAL SEQUENCE (NONKEYED) PHYSICAL FILE
- 1.16. HOW DATA ARE ORGANIZED AND RETRIEVED IN A KEYED SEQUENCE PHYSICAL FILE
- 1.17. CREATING A PHYSICAL FILE
- 1.18. CASE PROBLEM: CREATING A PHYSICAL FILE
- 1.19. DETERMINE THE RECORD FORMAT FOR THE PHYSICAL FILE
- 1.20. DATA DESCRIPTION SPECIFICATIONS (DDS) FOR AN ARRIVAL SEQUENCE FILE
- 1.21. DDS FOR A KEYED SEQUENCE FILE
- 1.22. COMPILE SOURCE DDS INTO A FILE OBJECT
- 1.23. DISPLAYING THE FIELD ATTRIBUTES OF A PHYSICAL FILE
- 1.24. ENTERING DATA INTO A PHYSICAL FILE WITH DFU
- 1.25. DISPLAYING THE CONTENTS OF PHYSICAL FILE RECORDS
- 1.26. PRINTING OR DISPLAYING RECORDS WITH THE COPY FILE (CPYF) COMMAND
- 1.27. USING THE CHANGE PHYSICAL FILE (CHGPF) COMMAND
- 1.28. END-OF-CHAPTER AIDS
- 1.29. CHAPTER SELF-TEST
- 1.30. CHAPTER REVIEW QUESTIONS
-
2. AN INTRODUCTION TO PROGRAMMING IN COBOL/400
- 2.1. CHAPTER OBJECTIVES
- 2.2. TYPES OF COMPUTER PROGRAMS
- 2.3. OPERATING SYSTEM SOFTWARE
- 2.4. APPLICATION PROGRAMS
- 2.5. MACHINE LANGUAGE PROGRAMS
- 2.6. SYMBOLIC PROGRAMS
- 2.7. AN INTRODUCTION TO COBOL
- 2.8. COBOL IS A STANDARD LANGUAGE
- 2.9. COBOL IS AN ENGLISH-LIKE LANGUAGE
- 2.10. COBOL IS A USER-FRIENDLY LANGUAGE
- 2.11. A HISTORY OF COBOL AND THE ANS VERSIONS
- 2.12. THE AMERICAN NATIONAL STANDARDS (ANS) VERSIONS OF COBOL
- 2.13. ILE COBOL AND THE ANS COBOL 1985 STANDARD
- 2.14. THE APPLICATIONS PROGRAM DEVELOPMENT PROCESS
- 2.15. DETERMINE THE PROGRAM SPECIFICATIONS
- 2.16. DESIGN THE PROGRAM USING PROGRAM PLANNING TOOLS
- 2.17. CODE AND ENTER THE PROGRAM
- 2.18. COMPILE THE PROGRAM INTO A PROGRAM OBJECT
- 2.19. TEST THE PROGRAM
- 2.20. DEBUGGING PHASES
- 2.21. DEBUGGING TECHNIQUES
- 2.22. DOCUMENT THE PROGRAM
- 2.23. CASE PROBLEM
- 2.24. PROBLEM DEFINITION
- 2.25. INPUT LAYOUT
- 2.26. OUTPUT LAYOUT
- 2.27. PLANNING THE PROGRAM'S DESIGN
- 2.28. INTERPRETING THE FLOWCHART IN FIGURE 2.10
- 2.29. INTERPRETING THE PSEUDOCODE IN FIGURE 2.11
- 2.30. THE PROGRAM ILLUSTRATED
- 2.31. THE COBOL CODING SHEET
- 2.32. THE MAIN BODY OF A COBOL PROGRAM
- 2.33. COLUMN 7: FOR COMMENTS, CONTINUING NONNUMERIC LITERALS, AND STARTING A NEW PAGE
- 2.34. BLANK LINES FOR SEPARATING ENTRIES
- 2.35. AREAS A AND B
- 2.36. AN OVERVIEW OF THE FOUR DIVISIONS
- 2.37. TYPES OF COBOL ENTRIES AND THEIR MARGIN RULES
- 2.38. THE IDENTIFICATION DIVISION
- 2.39. THE IDENTIFICATION DIVISION INSTRUCTION FORMAT
- 2.40. UNDERSTANDING INSTRUCTION FORMATS AS THEY APPEAR IN REFERENCE MANUALS
- 2.41. CODING THE IDENTIFICATION DIVISION
- 2.42. THE ENVIRONMENT DIVISION
- 2.43. CONFIGURATION SECTION
- 2.44. INPUT-OUTPUT SECTION
- 2.45. THE DATA DIVISION
- 2.46. USING THE APOSTROPHE IN COBOL PROGRAMS
- 2.47. THE PROCEDURE DIVISION
- 2.48. SCOPE TERMINATORS
- 2.49. LOOPING WITH THE PERFORM STATEMENT
- 2.50. CREATING AN EXECUTABLE PROGRAM OBJECT
- 2.51. END-OF-CHAPTER AIDS
- 2.52. CHAPTER SELF-TEST
- 2.53. CHAPTER REVIEW QUESTIONS
- 2.54. PROGRAMMING ASSIGNMENTS
-
3. DEFINING FILES AND PROCESSING DATA
- 3.1. CHAPTER OBJECTIVES
- 3.2. SPECIFYING ARRIVAL SEQUENCE AND KEYED SEQUENCE FILES FOR PROCESSING
- 3.3. THE SELECT STATEMENT
- 3.4. THE SELECT STATEMENT FOR AN ARRIVAL SEQUENCE FILE
- 3.5. THE SELECT STATEMENT FOR A KEYED SEQUENCE FILE
- 3.6. THE ASSIGN CLAUSE
- 3.7. THE ORGANIZATION CLAUSE
- 3.8. THE ACCESS CLAUSE
- 3.9. THE RECORD KEY CLAUSE
- 3.10. DEFINING FILES
- 3.11. THE DATA DIVISION
- 3.12. VARIABLE AND CONSTANT DATA
- 3.13. FORMING DATA-NAMES
- 3.14. In COBOL/400, user-defined names must conform to the following rules:
- 3.15. USE PREFIXES OR SUFFIXES WHERE APPROPRIATE
- 3.16. THE FILE SECTION OF THE DATA DIVISION
- 3.17. FILE DESCRIPTION ENTRIES
- 3.18. DEFINING A RECORD WITH RECORD DESCRIPTION ENTRIES
- 3.19. USING LEVEL NUMBERS TO DEFINE FIELDS WITHIN A RECORD
- 3.20. ELEMENTARY AND GROUP FIELDS
- 3.21. INVALID USE OF LEVEL NUMBERS
- 3.22. PICTURE (PIC) CLAUSES
- 3.23. TYPE OF DATA
- 3.24. SIZE OF DATA FIELDS
- 3.25. FORMAT OF THE PIC CLAUSE
- 3.26. THE USE OF THE IMPLIED DECIMAL POINT IN PIC CLAUSES
- 3.27. PACKED-DECIMAL OR COMPUTATIONAL-3 (COMP-3)
- 3.28. MULTIPLE-RECORD TYPES IN DISK FILES
- 3.29. RECORD DESCRIPTION ENTRIES FOR PRINTER FILES
- 3.30. USE OF RESERVED WORD FILLER IN RECORD DESCRIPTION ENTRIES
- 3.31. THE WORKING-STORAGE SECTION OF THE DATA DIVISION
- 3.32. USING AN END-OF-FILE INDICATOR
- 3.33. THE PROCEDURE DIVISION
- 3.34. DEFINING PARAGRAPHS
- 3.35. STATEMENTS AND SENTENCES WITHIN PARAGRAPHS
- 3.36. THE SEQUENCE OF INSTRUCTIONS IN A PROGRAM
- 3.37. STATEMENTS TYPICALLY CODED IN THE MAIN MODULE
- 3.38. OPEN STATEMENT
- 3.39. READ STATEMENT
- 3.40. THE NOT AT END CLAUSE
- 3.41. PERFORM . . . UNTIL STATEMENT: A STRUCTURED PROGRAMMING TECHNIQUE
- 3.42. CORRECTLY SEQUENCING INSTRUCTIONS IN A MODULE
- 3.43. END-OF-JOB PROCESSING: THE CLOSE AND STOP RUN STATEMENTS
- 3.44. CLOSE STATEMENT
- 3.45. STOP RUN STATEMENT
- 3.46. AN INTRODUCTION TO THE MOVE AND WRITE STATEMENTS
- 3.47. SIMPLIFIED MOVE STATEMENT
- 3.48. WRITE STATEMENT
- 3.49. EXTERNALLY DESCRIBED FILES
- 3.50. THE SELECT STATEMENT FOR AN EXTERNALLY DESCRIBED FILE
- 3.51. THE ASSIGN CLAUSE
- 3.52. THE RECORD KEY CLAUSE
- 3.53. FORMAT 2 COPY STATEMENT
- 3.54. USING THE ALIAS KEYWORD
- 3.55. END-OF-CHAPTER AIDS
- 3.56. CHAPTER SELF-TEST
- 3.57. CHAPTER REVIEW QUESTIONS
- 3.58. DEBUGGING EXERCISE 1
- 3.59. DEBUGGING EXERCISE 2
- 3.60. PRACTICE PROGRAM
- 3.61. PROGRAMMING ASSIGNMENTS
-
4. PRINTING REPORTS
- 4.1. CHAPTER OBJECTIVES
- 4.2. TYPES OF REPORTS
- 4.3. DETAIL REPORTS
- 4.4. EXCEPTION REPORTS
- 4.5. SUMMARY OR GROUP REPORTS
- 4.6. THE PRINTER SPACING CHART
- 4.7. PRINTING HEADINGS, DETAIL LINES, AND TOTAL LINES
- 4.8. DEFINING MULTIPLE RECORD TYPES FOR PRINTER FILES
- 4.9. VALUE CLAUSES FOR WORKING-STORAGE ENTRIES
- 4.10. THE WRITE . . . FROM STATEMENT
- 4.11. THE ADVANCING OPTION FOR SPACING LINES
- 4.12. OVERPRINTING
- 4.13. ADVANCING THE PAPER TO A NEW PAGE USING THE PAGE OPTION
- 4.14. PRINTING THE CURRENT SYSTEM DATE ON A REPORT
- 4.15. USING THE RESERVED WORD CURRENT-DATE FIELD.
- 4.16. USING THE RESERVED WORD DATE FIELD.
- 4.17. EDITING PRINTED OUTPUT
- 4.18. EDITING FUNCTIONS
- 4.19. PRINTING DECIMAL POINTS
- 4.20. SUPPRESSING LEADING ZEROS
- 4.21. BE SURE TO SIZE THE REPORT-ITEM CORRECTLY
- 4.22. PRINTING DOLLAR SIGNS AND COMMAS
- 4.23. PRINTING ASTERISKS (*) FOR CHECK PROTECTION
- 4.24. PRINTING PLUS OR MINUS SIGNS
- 4.25. PRINTING DEBIT AND CREDIT SYMBOLS FOR ACCOUNTING APPLICATIONS
- 4.26. PRINTING SPACES OR ZEROS AS SEPARATORS WITHIN FIELDS
- 4.27. DE-EDITING
- 4.28. EDITING USING FLOATING STRINGS
- 4.29. BLANK WHEN ZERO OPTION
- 4.30. THE JUSTIFIED RIGHT OPTION
- 4.31. PRINTING QUOTATION MARKS
- 4.32. CONTROLLING THE SPACING OF PRINTED REPORTS
- 4.33. PRINTING THE HEADINGS ON THE FIRST PAGE
- 4.34. LINE COUNTING FOR SINGLE-SPACED REPORTS
- 4.35. LINE COUNTING FOR DOUBLE-SPACED REPORTS
- 4.36. USING A LINE LIMIT FIELD TO DETERMINE THE NUMBER OF LINES TO PRINT
- 4.37. PRINTING PAGE NUMBERS
- 4.38. USING THE READ . . . INTO STATEMENT IN PLACE OF READ AND MOVE STATEMENTS
- 4.39. CASE PROBLEM
- 4.40. END-OF-CHAPTER AIDS
- 4.41. CHAPTER SELF-TEST
- 4.42. PRACTICE PROGRAM
- 4.43. CHAPTER REVIEW QUESTIONS
- 4.44. PROGRAMMING ASSIGNMENTS
-
5. DESIGNING STRUCTURED PROGRAMS
- 5.1. CHAPTER OBJECTIVES
- 5.2. WRITING WELL-DESIGNED PROGRAMS
- 5.3. PROGRAMS SHOULD USE A TOP-DOWN MODULAR APPROACH
- 5.4. PROGRAMS SHOULD BE STRUCTURED
- 5.5. PROGRAM LOGIC SHOULD BE MAPPED OUT USING A PLANNING TOOL
- 5.6. HIERARCHY CHARTS FOR TOP-DOWN PROGRAMMING
- 5.7. NAMING MODULES OR PARAGRAPHS
- 5.8. MODULARIZING PROGRAMS USING PERFORM STATEMENTS
- 5.9. DESIGNING THE LOGIC BEFORE CODING A PROGRAM
- 5.10. FLOWCHARTS
- 5.11. PSEUDOCODE: STANDARD AND STRUCTURED
- 5.12. THE FOUR LOGICAL CONTROL STRUCTURES
- 5.13. SEQUENCE
- 5.14. SELECTION
- 5.15. ITERATION
- 5.16. THE INFINITE LOOP: AN ERROR TO BE AVOIDED
- 5.17. CASE STRUCTURE
- 5.18. STRUCTURED PROGRAMMING CODING GUIDELINES
- 5.19. INDENT LINES WITHIN A SENTENCE
- 5.20. CASE PROBLEM
- 5.21. END-OF-CHAPTER AIDS
- 5.22. CHAPTER SELF-TEST
- 5.23. CHAPTER REVIEW QUESTIONS
- 5.24. PRACTICE PROGRAM #1
- 5.25. PRACTICE PROGRAM #2
- 5.26. PROGRAMMING ASSIGNMENTS
-
6. MOVING DATA AND TEXT MANIPULATION
- 6.1. CHAPTER OBJECTIVES
- 6.2. THE INSTRUCTION FORMATS OF THE MOVE STATEMENT
- 6.3. The two instruction formats for the MOVE statement are
- 6.4. NUMERIC MOVE
- 6.5. WHEN SENDING AND RECEIVING FIELDS HAVE THE SAME PIC CLAUSES
- 6.6. WHEN SENDING AND RECEIVING FIELDS HAVE DIFFERENT PIC CLAUSES
- 6.7. AVOIDING TRUNCATION
- 6.8. MOVING NUMERIC LITERALS TO NUMERIC FIELDS
- 6.9. MOVING SIGNED NUMBERS
- 6.10. ALPHANUMERIC OR NONNUMERIC MOVE
- 6.11. MOVING LITERALS TO ALPHANUMERIC (NONNUMERIC) FIELDS
- 6.12. A GROUP MOVE IS CONSIDERED AN ALPHANUMERIC (NONNUMERIC) MOVE
- 6.13. DECIMAL DATA ERROR
- 6.14. MOVING FIGURATIVE CONSTANTS
- 6.15. SUMMARY OF MOVE OPERATIONS
- 6.16. MOVING DATA WITH TEXT MANIPULATION
- 6.17. TEXT MANIPULATION WITH THE STRING STATEMENT
- 6.18. GENERAL RULES FOR USING THE STRING
- 6.19. CASE PROBLEM
- 6.20. END-OF-CHAPTER AIDS
- 6.21. CHAPTER SELF-TEST
- 6.22. CHAPTER REVIEW QUESTIONS
- 6.23. DEBUGGING EXERCISES
- 6.24. PRACTICE PROGRAM
- 6.25. PROGRAMMING ASSIGNMENTS
-
7. COMPUTING IN COBOL: THE ARITHMETIC VERBS
- 7.1. CHAPTER OBJECTIVES
- 7.2. THE FOUR BASIC ARITHMETIC OPERATIONS
- 7.3. ADD STATEMENT
- 7.4. FIELDS USED IN AN ADD
- 7.5. USING FORMAT 1 OF THE ADD STATEMENT
- 7.6. USING FORMAT 2 OF THE ADD STATEMENT
- 7.7. USING FORMAT 3 OF THE ADD STATEMENT
- 7.8. DECIDING WHETHER TO USE THE TO OR GIVING FORMAT
- 7.9. ADDING MORE THAN TWO FIELDS
- 7.10. PRODUCING MORE THAN ONE SUM
- 7.11. SUBTRACT STATEMENT
- 7.12. DECIDING WHICH FORMAT TO USE
- 7.13. MULTIPLY STATEMENT
- 7.14. EXAMPLE OF ARITHMETIC OPERATIONS THAT USE THE MULTIPLY OPERATION
- 7.15. STORING INTERMEDIATE RESULTS
- 7.16. DIVIDE STATEMENT
- 7.17. USE OF THE REMAINDER CLAUSE IN THE DIVIDE OPERATION
- 7.18. OPTIONS AVAILABLE WITH ARITHMETIC VERBS
- 7.19. HOW ROUNDING IS ACCOMPLISHED
- 7.20. ON SIZE ERROR OPTION
- 7.21. AVOIDING SIZE ERRORS
- 7.22. DIVIDING BY ZERO CAUSES A SIZE ERROR
- 7.23. NOT ON SIZE ERROR CLAUSE
- 7.24. DETERMINING THE SIZE OF RECEIVING FIELDS
- 7.25. USING SCOPE TERMINATORS
- 7.26. THE COMPUTE STATEMENT
- 7.27. SPACING RULES WITH A COMPUTE
- 7.28. THE COMPUTE WITH AND WITHOUT ROUNDING
- 7.29. ORDER OF EVALUATION
- 7.30. COMPARING COMPUTE TO ARITHMETIC VERBS
- 7.31. SIGNED NUMBERS IN ARITHMETIC OPERATIONS FOR FIELDS THAT CAN BE NEGATIVE
- 7.32. RULES FOR PERFORMING ARITHMETIC WITH SIGNED NUMBERS
- 7.33. ENTERING A SIGN SEPARATE FROM THE DATA
- 7.34. CLEARING FIELDS USING THE INITIALIZE STATEMENT
- 7.35. LIKE CLAUSE
- 7.36. DISPLAY STATEMENT
- 7.37. CASE PROBLEM # 1
- 7.38. CASE PROBLEM # 2
- 7.39. END-OF-CHAPTER AIDS
- 7.40. CHAPTER SELF-TEST
- 7.41. CHAPTER REVIEW QUESTIONS
- 7.42. DEBUGGING EXERCISES
- 7.43. PRACTICE PROGRAM
- 7.44. PROGRAMMING ASSIGNMENTS
-
8. DECISION-MAKING USING THE IF AND EVALUATE STATEMENTS
- 8.1. CHAPTER OBJECTIVES
- 8.2. LOGICAL CONTROL STRUCTURES
- 8.3. THE IF CONDITIONAL STATEMENT
- 8.4. THE INSTRUCTION FORMAT FOR AN IF STATEMENT
- 8.5. A SIMPLE IF STATEMENT
- 8.6. AN IF STATEMENT WITH ELSE CLAUSE
- 8.7. RELATIONAL OPERATORS
- 8.8. NUMERIC FIELDS SHOULD NOT CONTAIN BLANKS
- 8.9. HOW COMPARISONS ARE PERFORMED
- 8.10. EBCDIC COLLATING SEQUENCE
- 8.11. ENDING CONDITIONAL SENTENCES WITH A PERIOD OR AN END-IF SCOPE TERMINATOR
- 8.12. THE CONTINUE CLAUSE
- 8.13. NESTED CONDITIONAL IF STATEMENT
- 8.14. COMPOUND CONDITIONAL
- 8.15. OR IN A COMPOUND CONDITIONAL
- 8.16. LIMITATIONS ON A COMPOUND CONDITIONAL
- 8.17. IMPLIED OPERANDS
- 8.18. AND IN A COMPOUND CONDITIONAL
- 8.19. USING AND AND OR IN THE SAME STATEMENT
- 8.20. ORDER OF EVALUATION OF COMPOUND CONDITIONALS
- 8.21. THE EVALUATE STATEMENT: THE CASE STRUCTURE
- 8.22. DATA VALIDATION
- 8.23. THE SIGN TEST
- 8.24. TESTING FOR REASONABLENESS
- 8.25. THE CLASS TEST
- 8.26. CHECKING FOR MISSING DATA
- 8.27. ALPHABETIC CLASS TEST
- 8.28. NEGATING CONDITIONALS
- 8.29. CONDITION-NAMES: CHECKING CODED FIELDS FOR VALID CONTENTS
- 8.30. SET STATEMENT
- 8.31. CASE PROBLEM
- 8.32. END-OF-CHAPTER AIDS
- 8.33. CHAPTER SELF-TEST
- 8.34. REVIEW QUESTIONS
- 8.35. PROGRAMMING ASSIGNMENTS
-
9. ITERATION: BEYOND THE BASIC PERFORM
- 9.1. CHAPTER OBJECTIVES
- 9.2. THE SIMPLE PERFORM REVIEWED
- 9.3. IN-LINE PERFORM STATEMENT
- 9.4. MODULARIZING PROGRAMS USING PERFORM STATEMENTS
- 9.5. NESTED PERFORM: A PERFORM WITHIN A PERFORM
- 9.6. EXECUTING A GROUP OF PARAGRAPHS WITH A SIMPLE PERFORM
- 9.7. ITERATION USING OTHER TYPES OF PERFORMS
- 9.8. ITERATION USING THE PERFORM . . . UNTIL STATEMENT
- 9.9. CODING A LOOP WITH A PERFORM ... UNTIL: AN EXAMPLE
- 9.10. A PERFORM ... UNTIL TESTS FOR THE CONDITION FIRST
- 9.11. AVOIDING THE INFINITE LOOP
- 9.12. ITERATION USING THE PERFORM ... TIMES STATEMENT
- 9.13. CODING A LOOP WITH A PERFORM ... TIMES: AN EXAMPLE
- 9.14. USING A VARIABLE FIELD IN A PERFORM . . . TIMES STATEMENT
- 9.15. THE PERFORM ... VARYING STATEMENT
- 9.16. USING NESTED PERFORM ... VARYING STATEMENTS
- 9.17. PERFORM ... VARYING: EXAMPLE 2
- 9.18. THE PERFORM WITH TEST AFTER OPTION
- 9.19. WHICH ITERATION STATEMENT TO USE
- 9.20. END-OF-CHAPTER-AIDS
- 9.21. CHAPTER SELF-TEST
- 9.22. CHAPTER REVIEW QUESTIONS
- 9.23. PROGRAMMING ASSIGNMENTS
-
10. THE COPY AND CALL STATEMENTS
- 10.1. CHAPTER OBJECTIVES
- 10.2. THE COPY STATEMENT
- 10.3. ENTRIES THAT CAN BE COPIED
- 10.4. THE FULL FORMAT FOR THE COPY STATEMENT
- 10.5. CASE PROBLEM CPCH10A
- 10.6. MODULAR PROGRAMMING
- 10.7. THE CALL STATEMENT
- 10.8. LINKAGE TYPE PHRASE
- 10.9. IN LIBRARY PHRASE
- 10.10. USING PHASE
- 10.11. THE BY CONTENT CLAUSE
- 10.12. GROUPING DATA TO BE PASSED
- 10.13. CALLED PROGRAM REQUIREMENTS
- 10.14. DYNAMIC (EXTERNAL) AND STATIC BINDING
- 10.15. DYNAMIC (EXTERNAL) PROGRAM CALLS
- 10.16. STATIC PROGRAM CALLS
- 10.17. THE CREATE BOUND COBOL (CRTBNDCBL) COMMAND
- 10.18. CASE PROBLEM CPCH10B
- 10.19. CASE PROBLEM CPCH10C
- 10.20. END-OF-CHAPTER AIDS
- 10.21. CHAPTER SELF-TEST
- 10.22. CHAPTER REVIEW QUESTIONS
- 10.23. PROGRAMMING ASSIGNMENTS
-
11. LOGICAL FILES
- 11.1. CHAPTER OBJECTIVES
- 11.2. LOGICAL FILES
- 11.3. USING A SIMPLE LOGICAL FILE TO ENSURE THE DATA FILE IS IN THE CORRECT SEQUENCE
- 11.4. USING A LOGICAL FILE IN A COBOL/400 PROGRAM
- 11.5. SELECTING SPECIFIC FIELDS WITH A LOGICAL FILE
- 11.6. SELECTING AND OMITTING RECORDS USING LOGICAL FILES
- 11.7. ORED COMPARISIONS
- 11.8. ANDED COMPARISONS
- 11.9. CREATING A LOGICAL FILE
- 11.10. LOGICAL FILE WITH MULTIPLE-RECORD FORMATS
- 11.11. JOIN LOGICAL FILES
- 11.12. JOIN LOGICAL FILE CONCEPTS
- 11.13. HOW TO CODE JOIN FILES
- 11.14. EXAMPLE 1: JOINING TWO FILES AND USING DEFAULT VALUES FOR UNMATCHED RECORDS
- 11.15. EXAMPLE 2: JOINING TWO FILES AND SEQUENCING MULTIPLE MATCHES FROM A SECONDARY FILE
- 11.16. EXAMPLE 3: JOINING FOUR FILES
- 11.17. JOIN LOGICAL FILE KEYWORD DEFINITIONS
- 11.18. END-OF-CHAPTER AIDS
- 11.19. CHAPTER SELF-TEST
- 11.20. CHAPTER REVIEW QUESTIONS
- 11.21. PROGRAMMING ASSIGNMENTS
-
12. CONTROL BREAK PROCESSING
- 12.1. CHAPTER OBJECTIVES
- 12.2. DETAIL AND SUMMARY REPORTS
- 12.3. CASE PROBLEM #1: AN EXAMPLE OF A CONTROL BREAK PROCEDURE
- 12.4. USING A LOGICAL FILE IN A CONTROL BREAK PROGRAM
- 12.5. THE CONTROL BREAK PROCEDURE
- 12.6. PROGRAM REQUIREMENTS FOR SINGLE-LEVEL CONTROL BREAK PROCESSING
- 12.7. FORCING A CONTROL BREAK WHEN THERE ARE NO MORE RECORDS
- 12.8. REFINEMENTS TO IMPROVE THE QUALITY OF A CONTROL BREAK REPORT
- 12.9. PRINTING A FINAL TOTAL
- 12.10. GROUP SUPPRESSION OF A CONTROL FIELD
- 12.11. PRINTING THE CONTROL FIELD WITH THE CONTROL BREAK TOTAL LINE
- 12.12. EXECUTING THE CONTROL BREAK MODULE FROM THE MAIN MODULE AFTER AN END-OF-FILE CONDITION HAS BEEN MET
- 12.13. CASE PROBLEM #2: MULTIPLE-LEVEL CONTROL BREAKS
- 12.14. STARTING A NEW PAGE AFTER EACH CONTROL BREAK
- 12.15. END-OF-CHAPTER-AIDS
- 12.16. CHAPTER SELF-TEST QUESTIONS
- 12.17. CHAPTER REVIEW QUESTIONS
- 12.18. PROGRAMMING ASSIGNMENTS
-
13. RANDOM FILE ACCESS FOR KEYED FILES
- 13.1. CHAPTER OBJECTIVES
- 13.2. ACCESSING A KEYED FILE RANDOMLY
- 13.3. THE SELECT STATEMENT
- 13.4. THE READ STATEMENT
- 13.5. INVALID KEY CLAUSE
- 13.6. READING DATA RANDOMLY AS NEEDED: AN EXAMPLE
- 13.7. UPDATING A KEYED FILE RANDOMLY
- 13.8. OPENING A KEYED FILE AS I-O
- 13.9. REWRITE A RECORD TO UPDATE IT
- 13.10. THE INVALID KEY CLAUSE
- 13.11. DELETING RECORDS FROM A KEYED FILE
- 13.12. CASE PROBLEM: A FULL UPDATE PROCEDURE
- 13.13. ADDING NEW RECORDS TO A KEYED FILE
- 13.14. UPDATING OR CHANGING EXISTING RECORDS IN A KEYED FILE
- 13.15. DELETING RECORDS FROM A KEYED FILE
- 13.16. UPDATING A KEYED FILE WITH MULTIPLE TRANSACTION RECORDS FOR EACH KEYED RECORD
- 13.17. PROCESSING A KEYED FILE WITHIN LIMITS
- 13.18. THE START STATEMENT
- 13.19. CHECKING FOR THE UPPER LIMIT
- 13.20. ACCESSING A KEYED FILE DYNAMICALLY THE ACCESS IS DYNAMIC CLAUSE
- 13.21. THE READ ... NEXT RECORD INSTRUCTION
- 13.22. A REVIEW OF INVALID KEY CLAUSES
- 13.23. THE FILE STATUS CLAUSE
- 13.24. EXCEPTION HANDLING WITH THE USE STATEMENT
- 13.25. END-OF-CHAPTER AIDS
- 13.26. CHAPTER SELF-TEST
- 13.27. CHAPTER REVIEW QUESTIONS
- 13.28. DEBUGGING EXERCISES
- 13.29. PRACTICE PROGRAM #1
- 13.30. PRACTICE PROGRAM #2
- 13.31. PROGRAMMING ASSIGNMENTS
-
14. INTERACTIVE PROGRAMMING
- 14.1. CHAPTER OBJECTIVES
- 14.2. BATCH VERSUS INTERACTIVE PROCESSING
- 14.3. INTERACTIVE PROCESSING
- 14.4. DISPLAY FILES
- 14.5. TYPES OF RECORD FORMATS USED IN DISPLAY FILES
- 14.6. MENU FORMAT
- 14.7. INFORMATIONAL OR QUERY FORMAT
- 14.8. DATA ENTRY FORMAT
- 14.9. List or Work With Format
- 14.10. ELEMENTS OF A RECORD FORMAT
- 14.11. ATTRIBUTES
- 14.12. SETTING ATTRIBUTES WITH THE COLOR KEYWORD
- 14.13. SETTING ATTRIBUTES WITH THE DSPATR KEYWORD
- 14.14. CASE PROBLEM: AN INTERACTIVE QUERY PROGRAM
- 14.15. DEFINING THE DDS FOR A DISPLAY FILE
- 14.16. DEFINING THE FILE-LEVEL KEYWORDS FOR THE DISPLAY FILE
- 14.17. USING INDICATORS IN INTERACTIVE PROGRAMS
- 14.18. DEFINING THE DDS FOR RECORD FORMAT SCREEN1
- 14.19. USING COLOR TO DEFINE ATTRIBUTES
- 14.20. DATE KEYWORD
- 14.21. DEFINING THE DDS FOR RECORD FORMAT SCREEN2
- 14.22. EDITING NUMERIC FIELDS
- 14.23. EDTCDE KEYWORD
- 14.24. DISPLAYING NEGATIVE VALUES
- 14.25. ZERO SUPPRESSION
- 14.26. DISPLAYING DOLLAR SIGNS
- 14.27. USING EDIT WORDS
- 14.28. CREATING THE DISPLAY FILE OBJECT
- 14.29. THE INTERACTIVE PROGRAM
- 14.30. ESTABLISHING A TRANSACTION FILE
- 14.31. THE ASSIGN CLAUSE
- 14.32. DEFINING INDICATORS IN A SEPARATE INDICATOR AREA
- 14.33. THE CONTROL-AREA CLAUSE
- 14.34. PROCESSING DISPLAY FILE INPUT/OUTPUT (I/O) OPERATIONS
- 14.35. READ OPERATION
- 14.36. PROCEDURE DIVISION SPECIFICATIONS
- 14.37. TERMINATING A WORKSTN PROGRAM
- 14.38. CASE PROBLEM: AN INTERACTIVE FILE MAINTENANCE
- 14.39. DATA VALIDATION TECHNIQUES FOR DISPLAY FILES
- 14.40. COBOL/400 FILE MAINTANANCE PROGRAM
- 14.41. THE MOVE CORRESPONDING STATEMENT
- 14.42. END-OF-CHAPTER AIDS
- 14.43. CHAPTER SELF-TEST
- 14.44. CHAPTER REVIEW QUESTIONS
- 14.45. PROGRAMMING ASSIGNMENTS
-
15. SINGLE-LEVEL ARRAYS AND TABLES
- 15.1. CHAPTER OBJECTIVES
- 15.2. AN INTRODUCTION TO SINGLE-LEVEL OCCURS CLAUSES
- 15.3. USING AN OCCURS CLAUSE IN WORKING-STORAGE
- 15.4. USING LIKE CLAUSE WITH OCCURS CLAUSE
- 15.5. VALIDATING INPUT DATA
- 15.6. RULES FOR USE OF THE OCCURS CLAUSE
- 15.7. DEFINING ELEMENTARY OR GROUP ITEMS WITH AN OCCURS CLAUSE
- 15.8. ACCESSING WORKING-STORAGE AREAS DEFINED BY AN OCCURS CLAUSE
- 15.9. PROCESSING DATA STORED IN AN ARRAY
- 15.10. PRINTING DATA STORED IN AN ARRAY
- 15.11. PRINTING SUBSCRIPTED VARIABLES IN A VARIETY OF WAYS
- 15.12. USING AN OCCURS CLAUSE FOR TABLE HANDLING
- 15.13. WHY TABLES ARE USED
- 15.14. STORING THE TABLE IN WORKING-STORAGE
- 15.15. USING THE READ ... INTO TO LOAD A TABLE
- 15.16. VALIDATING DATA
- 15.17. LOOKING UP DATA IN A TABLE: FINDING A MATCH
- 15.18. USE OF THE SEARCH STATEMENT FOR TABLE AND ARRAY PROCESSING
- 15.19. USING THE SEARCH ... AT END FOR DATA VALIDATION
- 15.20. THE INDEXED BY CLAUSE AND THE SEARCH STATEMENT
- 15.21. HOW AN INDEX DIFFERS FROM A SUBSCRIPT
- 15.22. MODIFYING THE CONTENTS OF AN INDEX
- 15.23. USING TWO WHEN CLAUSES FOR AN EARLY EXIT FROM A SEARCH
- 15.24. WHEN PART-NUMBERS DO NOT NEED TO BE STORED
- 15.25. SEARCHING FOR MULTIPLE MATCHES
- 15.26. INTERNAL VERSUS EXTERNAL TABLES
- 15.27. LOOKING UP TABLE DATA FOR ACCUMULATING TOTALS
- 15.28. THE SEARCH ... VARYING OPTION FOR PROCESSING PARALLEL TABLES
- 15.29. DEFINITION OF A SERIAL SEARCH
- 15.30. THE BINARY SEARCH
- 15.31. DEFINITION OF A BINARY SEARCH
- 15.32. THE SEARCH ALL STATEMENT
- 15.33. ASCENDING OR DESCENDING KEY WITH THE SEARCH ALL STATEMENT
- 15.34. END-OF-CHAPTER AIDS
- 15.35. CHAPTER SELF-TEST
- 15.36. CHAPTER REVIEW QUESTIONS
- 15.37. DEBUGGING EXERCISES
- 15.38. PRACTICE PROGRAM
- 15.39. PROGRAMMING ASSIGNMENTS
-
16. MULTIPLE-LEVEL ARRAYS AND TABLES
- 16.1. CHAPTER OBJECTIVES
- 16.2. DOUBLE-LEVEL OCCURS CLAUSE
- 16.3. DEFINING A DOUBLE-LEVEL, OR TWO-DIMENSIONAL, ARRAY
- 16.4. USING SUBSCRIPTS WITH DOUBLE-LEVEL OCCURS ENTRIES
- 16.5. ACCESSING A DOUBLE-LEVEL, OR TWO-DIMENSIONAL, ARRAY
- 16.6. THE PERFORM ... VARYING WITH THE AFTER OPTION
- 16.7. USING NESTED PERFORMS
- 16.8. USING PERFORM ... VARYING ... AFTER
- 16.9. USING A DOUBLE-LEVEL, OR TWO-DIMENSIONAL, ARRAY FOR ACCUMULATING TOTALS
- 16.10. LOADING INPUT DATA INTO A DOUBLE-LEVEL, OR TWO-DIMENSIONAL, ARRAY
- 16.11. PERFORMING A LOOK-UP USING A DOUBLE-LEVEL OCCURS
- 16.12. THE IDENTIFIER USED WITH THE SEARCH REFERS TO THE LOWEST-LEVEL OCCURS ENTRY
- 16.13. SEARCHING ONLY PART OF A TABLE
- 16.14. VARYING ONLY ONE INDEX
- 16.15. SEARCHING ELEMENTS IN AN ARRAY
- 16.16. SEARCHING AN ARRAY UNTIL A MATCH IS FOUND
- 16.17. SEARCHING AN ENTIRE ARRAY FOR MULTIPLE MATCHES
- 16.18. TRIPLE-LEVEL OCCURS CLAUSES AND MORE
- 16.19. END-OF-CHAPTER AIDS
- 16.20. CHAPTER SELF-TEST
- 16.21. DEBUGGING EXERCISES
- 16.22. PRACTICE PROGRAM
- 16.23. PROGRAMMING ASSIGNMENTS
-
17. SUBFILE PROGRAMMING
- 17.1. CHAPTER OBJECTIVES
- 17.2. LIST SCREEN OR WORK WITH SCREEN
- 17.3. SUBFILE RECORD FORMATS
- 17.4. DESIGNING SCREEN FORMATS FOR AN INTERACTIVE SUBFILE PROGRAM
- 17.5. THE PROMPT RECORD FORMAT-SFLPROMPT
- 17.6. DEFINING SUBFILE RECORD FORMATS
- 17.7. THE SUBFILE RECORD FORMAT—SFLRECORD
- 17.8. THE SUBFILE CONTROL-RECORD FORMAT-SFLCONTROL
- 17.9. LOADING THE SUBFILE
- 17.10. CASE PROBLEM #1—LOAD-ALL SUBFILE
- 17.11. THE LOAD-ALL SUBFILE PROGRAM
- 17.12. ESTABLISHING A SUBFILE TRANSACTION FILE
- 17.13. ACCESS IS DYNAMIC CLAUSE
- 17.14. THE RELATIVE KEY CLAUSE
- 17.15. THE CONTROL-AREA CLAUSE
- 17.16. FILE STATUS CLAUSE
- 17.17. DEFINING INDICATORS AND FUNCTION KEYS IN SEPARATE AREAS
- 17.18. QUALIFICATION OF NAMES
- 17.19. WRITING TO A SUBFILE TRANSACTION FILE
- 17.20. PROCEDURE DIVISION SPECIFICATIONS
- 17.21. EXPANDING SUBFILE
- 17.22. SINGLE-PAGE-AT-A-TIME SUBFILE
- 17.23. CASE PROBLEM #2: AN INTERACTIVE SUBFILE UPDATE
- 17.24. UPDATING RECORDS IN A SUBFILE
- 17.25. END-OF-CHAPTER AIDS
- 17.26. CHAPTER SELF-TEST
- 17.27. CHAPTER REVIEW QUESTIONS
- 17.28. PROGRAMMING ASSIGNMENTS
- A. THE 5250 KEYBOARD
- B. COBOL CHARACTER SET AND RESERVED WORDS
- C. CRTBNDCBL COMMAND AND PROCESS STATEMENT
Product information
- Title: PROGRAMMING IN COBOL/400: 2nd Edition
- Author(s):
- Release date: January 2002
- Publisher(s): Wiley
- ISBN: 9780471418467
You might also like
book
Write Great Code, Volume 1, 2nd Edition
This, the first volume in Randall Hyde’s Write Great Code series, dives into machine organization without …
book
Programming in C, Fourth Edition
will teach you how to write programs in the C programming language. Whether you’re a novice …
book
C++ Software Design
Good software design is essential for the success of your project, but designing software is hard …
book
C Programming Language, 2nd Edition
This book is meant to help the reader learn how to program in C. It is …