home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1996 September / CD_06_96.ISO / cserve / scripts.lib / DATEXJ.SCR < prev    next >
Text File  |  1996-06-24  |  2KB  |  91 lines

  1. !
  2. !  Copyright (c) 1996
  3. !  by CompuServe Incorporated, Columbus, Ohio
  4. !
  5. !  The information in this software is subject to change without
  6. !  notice and should not be construed as a commitment by CompuServe.
  7. !
  8. !  Datex-J (BTX):
  9. !    Success:  returns %Success
  10. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  11. !
  12. !+V
  13. ! "3.8.2fast"
  14. !-V
  15.  
  16. Tries = 5;
  17. count = 0;
  18. Second_Time = %FALSE;
  19. on cancel goto Return_Cancel;
  20. show "Verbindungsaufbau mit Datex-J";
  21.  
  22. Wait_DatexJ:
  23.     if Tries = 0 goto DatexJ_Failure;
  24.     Tries = Tries - 1;
  25.     wait
  26.         "^@"        goto Send_Response,
  27.         "^E"        goto Send_Response,        
  28.         "CET"        goto Send_Response,
  29.         "---"        goto Send_Kennung,
  30.         %mdm_Failure    goto DatexJ_Failure
  31.     until 200;
  32.  
  33.     goto Wait_DatexJ;
  34.  
  35. Wait_Kennung:
  36.     wait
  37.         "---"        goto Send_Kennung
  38.     until 200;
  39.  
  40.     goto DatexJ_Failure;
  41.  
  42. Send_Response: 
  43.     wait until 10;
  44.     send "." & %CR;
  45.     
  46.     goto Wait_Kennung;
  47.  
  48. Send_Kennung:
  49.     wait until 10;
  50.     send "000255975978";
  51.     show "Datex-J Teilnehmernummer wird ⁿbertragen";
  52. Send_CR:
  53.     count = 0;
  54.     wait 
  55.         "DM"        goto Send_Pound,
  56.         "Host Name:"    goto Match_Host_Name
  57.     until 300;
  58.  
  59.     if Second_Time = %TRUE goto DatexJ_Failure;
  60.  
  61. Send_Pound:
  62.     wait
  63.         %mdm_Failure    goto DatexJ_Failure,
  64.         "User ID:"    goto Match_Host_Name,
  65.         "Host Name:"    goto Match_Host_Name
  66.     until 10;
  67.  
  68.     send %CR;
  69.     count = count + 1;
  70.     if count < 3 goto Send_Pound;
  71.  
  72.     Second_Time = %TRUE;
  73.     goto Send_CR;
  74.  
  75. DatexJ_Failure:
  76.     define %FailureMsg = "Datex-J antwortet nicht";
  77.     exit %Failure;
  78.  
  79. Return_Cancel:
  80.     exit %Cancel;
  81.  
  82. Match_Host_Name:
  83.     wait
  84.         "Host Name:"    goto Match_Host_Name
  85.     until 10;
  86.  
  87. Return_Success:
  88.     send %CR;
  89.     wait until 10;
  90.     exit %Success;
  91.