home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703B.ISO / terminal / niftyman / w95nim / program / data.z / SFENICS4.SCR < prev    next >
Text File  |  1996-11-19  |  2KB  |  86 lines

  1. !
  2. !  Copyright (c) 1995
  3. !  by NIFTY Corporation, Tokyo, Japan
  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. !  FENICS-ROAD 4:
  10. !    Connect to FENICS-ROAD 4
  11. !    Success:  returns %Success
  12. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  13. !
  14. !+V
  15. ! "3.5"
  16. !-V
  17. guide "FENICS-ROAD 4 に接続されました"; 
  18. NIMSCRIPT FENICS4.SCR;
  19. Tries = 2;
  20. on cancel goto Return_Cancel;
  21. wait until 10;
  22.  
  23. Wait_HOST:
  24.     if Tries = 0 goto Return_Failure;
  25.     Tries = Tries - 1;
  26.  
  27.     wait
  28.         "*"        goto Send_NIF,
  29.         %mdm_Failure    goto Return_Failure
  30.     until 100;
  31. !    send %CR;
  32.     goto Wait_HOST;
  33.  
  34.  
  35. Send_NIF:
  36.     send "C NIF" & %CR;
  37.  
  38. Tries = 3;
  39. Wait_FENICS4:
  40.     if Tries = 0 goto Return_Failure;
  41.     Tries = Tries - 1;
  42.  
  43.     wait
  44.         "Enter Connection-ID"    goto Send_FENICS4_Host,
  45.         %mdm_Failure        goto Return_Failure
  46.     until 80;
  47.     goto Wait_FENICS4;
  48.  
  49. Send_FENICS4_Host:
  50.     wait until 10;
  51.     guide "サインアップを開始します";
  52.     send "PSG" & %CR; 
  53.  
  54. Tries = 5;
  55. Wait_ENQ:
  56.     if Tries = 0 goto Return_Failure;
  57.     Tries = Tries - 1;
  58.  
  59.     wait
  60.         %ENQ            goto Send_SIGNUP,
  61.         %NAK            goto Return_Failure
  62.         %mdm_Failure        goto Return_Failure
  63.     until 80;
  64.     goto Wait_ENQ;
  65.  
  66.  
  67. Send_SIGNUP:
  68.     wait until 10;
  69.     guide "登録データを送信しています";
  70.     signup : Result; 
  71.     guide "登録データの送信が終了しました";
  72.     if Result = %Success goto Return_Success;
  73.     if Result = %Cancel goto Return_Cancel;
  74.     
  75. Return_Failure:
  76.     define %FailureMsg = "FENICS-ROAD 4 が反応しません";
  77.     %ErrorCode = 2050;
  78.     exit %ErrorCode;
  79.  
  80. Return_Cancel:
  81.     exit %Cancel;
  82.  
  83. Return_Success:
  84.     wait until 10;
  85.     exit %Success;
  86.