SSL filetext.cob
Interaktion und PortierbarkeitCobol
identificationdivision. program-id. filetext. * aus Wirth, systematisches Programmieren p. 107 author. "JD". date-written. 25.10.2004. date-compiled. environmentdivision. input-outputsection. file-control. select f assignto file-f status f-status. select g assignto file-g status g-status. datadivision. filesection. fd f recordcontains 120 characters datarecordis f-record labelrecordisomitted.
01 f-record.
05 c pic x. fd g recordcontains 120 characters datarecordis g-record labelrecordisomitted.
01 g-record.
05 c pic x. working-storagesection.
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 valuespace.
77 ch pic x.
77 crlf pic x(2) value x'1013'. proceduredivision. move 0 to l openinput f output g read f into f-record perform readword perform writeword performuntil 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 stoprun.
readword. move 0 to w performuntil ch = ' ' add 1 to w move ch to z(w) read f into f-record end-perform.
writeword. performvarying i from 1 by 1 until i >= w write f-record from z(i) * all w to l end-perform. end-program filetext.
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.9Angebot
Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können
¤
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.