products/Sources/formale Sprachen/Cobol/Test-Suite/COBOL/SQ/   (Lyx Textverarbeitung ©)  Datei vom 4.1.2008 mit Größe 132 kB image not shown  

SSL filetext.cob   Interaktion und
PortierbarkeitCobol

 
       identification division.
       program-id. filetext.
      *  aus Wirth, systematisches Programmieren p. 107 
       author"JD".
       date-written. 25.10.2004.
       date-compiled.
       environment division.
       input-output section.
       file-control.
         select f assign to file-f
         status f-status.
         select g assign to file-g
         status g-status.
       data division.
       file section.
        fd f
        record contains 120 characters
        data record is f-record
        label record is omitted.
        01 f-record.
          05 c pic x.
        fd g
        record contains 120 characters
        data record is g-record
        label record is omitted.
        01 g-record.
          05 c pic x.
       working-storage section.
        78 lmax  pic 9(4) value 100.
        77 w   pic 9(4).
        77 l   pic 9(4).
        77 i   pic 9(4).
        77 f-status pic S9(4) comp.
        77 g-status pic S9(4) comp.
        77 blanc    pic x value space.
        77 ch       pic x.
        77 crlf     pic x(2) value x'1013'.
       procedure division.
         move 0 to l
         open input  f
              output g
         read f into f-record
         perform readword
         perform writeword
         perform until f-status <= 0
           read f into f-record
           perform readword
           if l+w < lmax then
             write g-record from blanc
             add 1 to l
           else
             write g-record from crlf
             move 0 to l
           end-if
           perform writeword
         end-perform.
         write g-record from crlf
         close f g
         stop run.
        readword.
          move 0 to w
          perform until ch = ' '
            add 1 to w
            move ch to z(w)
            read f into f-record
          end-perform.  
        writeword.
          perform varying i from 1 by 1 until i >= w
            write f-record from z(i)
      *     all w to l
          end-perform
        end-program filetext.

99%


¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:  Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.