home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Anwendungen / Kurztests / DFA / Rexx / ArexxScripts.lha / export_dfa.dfa < prev    next >
Text File  |  1994-09-16  |  3KB  |  117 lines

  1. /* $Revision Header built automatically *************** (do not edit) ************
  2. **
  3. ** © Copyright by Dirk Federlein
  4. **
  5. ** File             : export_dfa.dfa
  6. ** Created on       : Monday, 04.04.94 16:25:47
  7. ** Created by       : Dirk Federlein
  8. ** Current revision : V2.0
  9. **
  10. **
  11. ** Purpose
  12. ** -------
  13. **
  14. ** Exports marked addresses to another DFA address file.
  15. **
  16. ** Important: Exports from DFA V2.0 file format to DFA V2.0 format only !!!
  17. **
  18. ** Notice that this new file WILL be compatible to the DFA V2.0
  19. ** format and can be loaded as usual using the "Open"
  20. ** Menu item of DFA V2.0 (and up).
  21. **
  22. ** This script was done, because it is not possible, to save part
  23. ** of the stored addresses to another file directly out of DFA up to now.
  24. **
  25. **
  26. ** Revision V2.0
  27. ** --------------
  28. ** created on Monday, 04.04.94 16:25:47  by  Dirk Federlein.   LogMessage :
  29. **     --- Initial release ---
  30. **
  31. *********************************************************************************/
  32.  
  33. options results
  34.  
  35. tabchar = '09'X
  36. cr    = '0A'X
  37.  
  38. exportfile = 't:dfa_dfa.export'
  39.  
  40. if ~show(ports, DFA) then
  41. do
  42.     exit 0
  43. end
  44.  
  45.  
  46. if open('exfh',exportfile,'W') then
  47. do
  48.     address 'DFA'
  49.  
  50.     /* --- File header. Format revision 1.5 ! --------------------------- */
  51.  
  52.     writeln('exfh', 'DFAddress1.5')
  53.  
  54.     /* --- Write empty Templates ---------------------------------------- */
  55.  
  56.     writech('exfh', (cr))
  57.     writech('exfh', (cr))
  58.     writech('exfh', (cr))
  59.     writech('exfh', (cr))
  60.     writech('exfh', (cr))
  61.     writech('exfh', (cr))
  62.     writech('exfh', (cr))
  63.     writech('exfh', (cr))
  64.     writech('exfh', (cr))
  65.     writech('exfh', (cr))
  66.     writech('exfh', (cr))
  67.     writech('exfh', (cr))
  68.     writech('exfh', (cr))
  69.     writech('exfh', (cr))
  70.     writech('exfh', (cr))
  71.     writech('exfh', '00000000'||cr)
  72.     writech('exfh', (cr))
  73.     writech('exfh', (cr))
  74.     writech('exfh', (cr))
  75.  
  76.     FIRST STEM ADR.
  77.  
  78.     if ADR.ADDRESS.24 = 0 then
  79.         NEXTSEL STEM ADR.
  80.  
  81.     do while RC = 0
  82.  
  83.     /* Notice that the logical and the physical order differs */
  84.     /* because of compatibility to former versions of DFA     */
  85.  
  86.         writech('exfh', ADR.ADDRESS.2||cr )        /* Name */
  87.         writech('exfh', ADR.ADDRESS.1||cr )        /* First name */
  88.         writech('exfh', ADR.ADDRESS.4||cr )        /* Street */
  89.         writech('exfh', ADR.ADDRESS.5||cr )        /* ZIP */
  90.         writech('exfh', ADR.ADDRESS.6||cr )        /* City */
  91.         writech('exfh', ADR.ADDRESS.8||cr )        /* Country */
  92.         writech('exfh', ADR.ADDRESS.9||cr )        /* Birthday */
  93.         writech('exfh', ADR.ADDRESS.10||cr )    /* Phone */
  94.         writech('exfh', ADR.ADDRESS.12||cr )    /* EMail 1 */
  95.         writech('exfh', ADR.ADDRESS.13||cr )    /* EMail 2 */
  96.         writech('exfh', ADR.ADDRESS.14||cr )    /* EMail 3 */
  97.         writech('exfh', ADR.ADDRESS.15||cr )    /* Comment */
  98.         writech('exfh', ADR.ADDRESS.24||cr )    /* Selected */
  99.         writech('exfh', ADR.ADDRESS.0||cr )        /* Salutation */
  100.         writech('exfh', ADR.ADDRESS.11||cr )    /* Fax */
  101.  
  102.             /* Group flags */
  103.  
  104.         writech('exfh', ADR.ADDRESS.16||ADR.ADDRESS.17||ADR.ADDRESS.18||ADR.ADDRESS.19||ADR.ADDRESS.20||ADR.ADDRESS.21||ADR.ADDRESS.22||ADR.ADDRESS.23||cr )
  105.  
  106.         writech('exfh', ADR.ADDRESS.3||cr )        /* c/o */
  107.         writech('exfh', ADR.ADDRESS.7||cr )        /* State */
  108.         writech('exfh', ADR.ADDRESS.25||cr )    /* External file */
  109.  
  110.         NEXTSEL STEM ADR.
  111.     end
  112.  
  113.     close ('exfh')
  114. end
  115.  
  116. exit
  117.