home *** CD-ROM | disk | FTP | other *** search
/ Sams Cobol 24 Hours / Sams_Cobol_24_Hours.iso / source / ch17 / chapt17d.cob < prev    next >
Text File  |  1998-09-21  |  2KB  |  49 lines

  1. 000010 @OPTIONS MAIN,TEST
  2. 000020 Identification Division.
  3. 000030 Program-Id.  Chapt17d.
  4. 000031* Create An Indexed File From A Sequential File Using Sort
  5. 000041 Environment Division.
  6. 000050 Configuration Section.
  7. 000051 Source-Computer.  IBM-PC.
  8. 000056 Object-Computer.  IBM-PC.
  9. 000057 Input-Output Section.
  10. 000058 File-Control.
  11. 000059     Select Dealer-Text Assign To "Dealer.TXT"
  12. 000060            Organization Line Sequential
  13. 000061            Access Sequential.
  14. 000062     Select Dealer-File Assign To "Dealer.Dat"
  15. 000063            Organization Is Indexed
  16. 000064            Record Key Dealer-Number Of Dealer-Record
  17. 000065            Alternate Key Dealer-Name Of Dealer-Record
  18. 000066            Access Is Sequential.
  19. 000067     Select Sort-Work Assign To Dealer-Sort-Work.
  20. 000068 Data Division.
  21. 000069 File Section.
  22. 000070 Fd  Dealer-File.
  23. 000071 01  Dealer-Record.
  24. 000072     03  Dealer-Number         Pic X(8).
  25. 000073     03  Dealer-Name.
  26. 000074         05  Last-Name   Pic X(25).
  27. 000075         05  First-Name  Pic X(15).
  28. 000076         05  Middle-Name Pic X(10).
  29. 000077     03  Filler          Pic X(318).
  30. 000096 Fd  Dealer-Text.
  31. 000097 01  Text-Record         Pic X(376).
  32. 000121 Sd  Sort-Work.
  33. 000122 01  Sort-Record.
  34. 000123     03  Dealer-Number         Pic X(8).
  35. 000124     03  Dealer-Name.
  36. 000125         05  Last-Name   Pic X(25).
  37. 000126         05  First-Name  Pic X(15).
  38. 000127         05  Middle-Name Pic X(10).
  39. 000128     03  Filler          Pic X(318).
  40. 000147 Working-Storage Section.
  41. 000390 Procedure Division.
  42. 000391 Chapt17d-Start.
  43. 000401     Sort Sort-Work Ascending Key Dealer-Number Of Sort-Record
  44. 000431          Using Dealer-Text
  45. 000441          Giving Dealer-File
  46. 000461     Display "Sort Complete"
  47. 000471     Stop Run
  48. 000481     .
  49.