home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / party14.zip / 19XX.CMD next >
OS/2 REXX Batch file  |  1995-09-29  |  1KB  |  41 lines

  1. /* PARTY.DAT konvertieren                                      */
  2. /*                                                             */
  3. /* Autor: Andreas Rau          Datum: 27.09.95                 */
  4. /*                                                             */
  5.  
  6. say ""
  7. say ""
  8. say ("Konvertierprogramm für die Datei PARTY.DAT aus Versionen vor 1.2")
  9. say ""
  10. say ("Dieses Programm erweitert das Geburtsjahr in der Datei PARTY.DAT um ")
  11. say ("das Jahrhundert. Dieses wird ab der Version 1.2 benötigt.")
  12. say ("Es wird bei allen Geburtsdaten das 19te Jahrhundert eingefügt.")
  13. say ("")
  14. say ("Bsp: 03.04.30 Birne       ---->>> 03.04.1930 Birne ")
  15. say ("")
  16. say ("Die konvertierte Datei wird als PARTY.NEU gespeichert.")
  17. say ("")
  18. say ("Bitte geben Sie den Pfad und Dateinamen für die Datei PARTY.DAT")
  19. say ("ein. (z.B. D:\OS2\APPS\PARTY.DAT)")
  20. say ""
  21.  
  22. pull PFAD
  23.  
  24. s = SAY Stream("PFAD", "c", "open read")   
  25. sw = SAY Stream("PARTY.NEU", "c", "open write")
  26.  
  27. DO WHILE Lines(PFAD)                   
  28.    Zeile = Linein(PFAD)
  29.    Jahr = SUBSTR(Zeile, 7, 2)
  30.    if Jahr = 00 then 
  31.        ZeileOut =INSERT("00", Zeile, 6, 2, "0")
  32.    else
  33.        ZeileOut =INSERT("19", Zeile, 6, 2, "0")
  34.    say ZeileOut
  35.    call LINEOUT "PARTY.NEU", ZeileOut    
  36. END
  37. s = SAY Stream("PFAD", "c", "close")  
  38. s = SAY Stream("PARTY.NEU", "c", "close")
  39. say "Die neue Datei wurde als PARTY.NEU im aktuellen Verzeichnis gepeichert."
  40. say ""
  41.