home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / n / newscr.zip / NEWSCR.EXE / LATA.SCR < prev    next >
Text File  |  1993-02-05  |  2KB  |  70 lines

  1. !---------------------------------------------------------------------!
  2. !                                                                     !
  3. !  Copyright (c) 1991                                                 !
  4. !  by CompuServe Incorporated, Columbus, Ohio                         !
  5. !                                                                     !
  6. !  The information in this software is subject to change without      !
  7. !  notice and should not be construed as a commitment by CompuServe.  !
  8. !                                                                     !
  9. !  LATA Purpose:                                                      !
  10. !     Connect to LATA                                                 !
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !     Arg1 = False if Network setting is LATA-Ct, True if LATA        !
  14. !                                                                     !
  15. !     $Revision::   1.6      $                                        !
  16. !                                                                     !
  17. !---------------------------------------------------------------------!
  18.  
  19. show "Connecting to LATA";
  20. Tries = 5;
  21. on cancel goto Return_Cancel;
  22.  
  23. Response_Char = ".";
  24. if Arg1 = %TRUE goto Send_Response;
  25.  
  26. Response_Char = "H";     ! Ct. LATA selected
  27.  
  28. Send_Response:
  29.  
  30.     if Tries = 0 goto LATA_Failure;
  31.     Tries = Tries - 1;
  32.  
  33.     wait until 5;
  34.  
  35.     send Response_Char;
  36.     wait until 2;
  37.     send Response_Char;
  38.     wait until 2;
  39.     send Response_Char;
  40.     wait until 2;
  41.     send %CR;
  42.  
  43. Wait_LATA:
  44.  
  45.     wait
  46.         "*"            goto Send_LATA_Host,
  47.         "COM^M"        goto Return_Success,
  48.         "Err"          goto Send_LATA_Host,
  49.         "NO CARRIER"   goto LATA_Failure
  50.     until 70;
  51.  
  52.     goto Send_Response;
  53.  
  54. Send_LATA_Host:
  55.  
  56.     send ".CPS" & %CR;
  57.     goto Wait_LATA;
  58.  
  59. LATA_Failure:
  60.     define %FailureMsg = "LATA not responding";
  61.     exit %Failure;
  62.  
  63. Return_Cancel:
  64.     exit %Cancel;
  65.  
  66. Return_Success:
  67.     exit %Success;
  68.  
  69.  
  70.