home *** CD-ROM | disk | FTP | other *** search
/ Sams Cobol 24 Hours / Sams_Cobol_24_Hours.iso / source / ch22 / CHAPT22F.COB < prev    next >
Text File  |  1998-09-14  |  704b  |  20 lines

  1. 000010 @OPTIONS MAIN,TEST
  2. 000020 Identification Division.
  3. 000030 Program-Id.  Chapt22f.
  4. 000031* Function Char
  5. 000040 Environment Division.
  6. 000050 Configuration Section.
  7. 000051 Source-Computer.  IBM-PC.
  8. 000055 Object-Computer.  IBM-PC.
  9. 000056 Data Division.
  10. 000057 Working-Storage Section.
  11. 000108 01  Character-Returned   Pic X.
  12. 000118 01  Position-Returned    Pic 999 Value Zeros.
  13. 000148 Procedure Division.
  14. 000159 Chapt22f-Start.
  15. 000169     Move Function Char (89) To Character-Returned
  16. 000179     Display "Character = " Character-Returned
  17. 000189     Compute Position-Returned = Function Ord ("Q")
  18. 000190     Display "Position = " Position-Returned
  19. 000311     Stop Run.
  20. 000319     .