home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 September
/
VPR9809B.ISO
/
TERMINAL
/
NIFTY95
/
DATA.Z
/
CONNECT.SCR
< prev
next >
Wrap
Text File
|
1998-06-24
|
6KB
|
238 lines
%ShowdEnable = 1;
!
! Copyright (c) 1996
! by NIFTY Corporation, Tokyo, Japan
! by CompuServe Incorporated, Columbus, Ohio
!
! The information in this software is subject to change without
! notice and should not be construed as a commitment by CompuServe.
!
! CONNECT:
! Handles NIFTY SERVE and Direct.
!
! NOTE: It is recommended that the numeric codes for networks NOT be
! modified since other utility programs may assume the relationships
! of network names and network ids specified below.
!
!+V
! "3.5"
!-V
!+N
CompuServe = 1; ! "SCSERVE.SCR"
FENICS_II = 42; ! "SFENICS2.SCR"
!FENICS_IV = 43; ! "SFENICS4.SCR"
!FENICS_V = 47; ! "SFENICS5.SCR"
NIFTY_VII = 51; ! "SNROAD7.SCR"
INS-C = 44; ! "SINSC.SCR"
MNP10 = 46; ! "SMNP10.SCR"
DOCOMO = 49; ! "SDOCOMO.SCR"
FENICS2.SCR = 42; ! "SFENICS2.SCR"
!FENICS4.SCR = 43; ! "SFENICS4.SCR"
!FENICS5.SCR = 47; ! "SFENICS5.SCR"
NIFROAD7.SCR = 51; ! "SNROAD7.SCR"
INSC.SCR = 44; ! "SINSC.SCR"
MNP10.SCR = 46; ! "SMNP10.SCR"
DOCOMO.SCR = 49; ! "SDOCOMO.SCR"
Infonet = 50; ! "SINFONET.SCR"
InfoNet-Euro = 5; ! "SINFONET.SCR"
InfoNet-Kor = 29; ! "SINFONET.SCR"
InfoNet-Mex = 31; ! "SINFONET.SCR"
InfoNet-RSA = 32; ! "SINFONET.SCR"
InfoNet-Taiw = 30; ! "SINFONET.SCR"
!-N
define %CR = "^M";
define %ENQ = "^E";
define %ACK = "^F";
define %NAK = "^U";
define %XOFF = "^Q";
define %FALSE = 0;
define %TRUE = 1;
define %ErrorCode = 0;
hangup = 1;
UsingModem = %FALSE;
NIFNetwork = %FALSE;
!
! Main Program
!
Connect_Network:
if %Network = FENICS_II goto Connect_FENICS_II;
if %Network = FENICS2.SCR goto Connect_FENICS_II;
if %Network = FENICS_IV goto Connect_FENICS_IV;
if %Network = FENICS4.SCR goto Connect_FENICS_IV;
if %Network = FENICS_V goto Connect_FENICS_V;
if %Network = FENICS5.SCR goto Connect_FENICS_V;
if %Network = FENICS_VII goto Connect_FENICS_VII;
if %Network = NIFROAD7.SCR goto Connect_NIFTY_VII;
if %Network = INS-C goto Connect_INS-C;
if %Network = INS-C.SCR goto Connect_INS-C;
if %Network = MNP10 goto Connect_MNP10;
if %Network = MNP10.SCR goto Connect_MNP10;
if %Network = DOCOMO goto Connect_DOCOMO;
if %Network = DOCOMO.SCR goto Connect_DOCOMO;
if %Network = CompuServe goto Connect_CIS;
if %Network = InfoNet_Europe goto Connect_InfoNet_Europe;
if %Network = InfoNet_Korea goto Connect_InfoNet_Korea;
if %Network = InfoNet_Taiwan goto Connect_InfoNet_Taiwan;
if %Network = InfoNet_Mexico goto Connect_InfoNet_Mexico;
if %Network = InfoNet_SAfrica goto Connect_InfoNet_SAfrica;
if %Network = InfoNet_World goto Connect_InfoNet_World;
if %Network = Infonet goto Connect_InfoNet;
define %FailureMsg = "Network not supported";
goto Connect_Fatal;
!
! Connect to InfoNet
!
Connect_InfoNet:
call %Dir & "sinfonet.scr" (0) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet World
!
Connect_InfoNet_World:
call %Dir & "sinfonet.scr" (0) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Europe
!
Connect_InfoNet_Europe:
call %Dir & "sinfonet.scr" (1) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Korea
!
Connect_InfoNet_Korea:
call %Dir & "sinfonet.scr" (2) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Taiwan
!
Connect_InfoNet_Taiwan:
call %Dir & "sinfonet.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Mexico
!
Connect_InfoNet_Mexico:
call %Dir & "sinfonet.scr" (4) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet South Africa
!
Connect_InfoNet_SAfrica:
call %Dir & "sinfonet.scr" (5) : Result;
goto Handle_Network_Return;
!
! Connect to FENICS II
!
Connect_FENICS_II:
call %Dir & "sfenics2.scr" (3) : Result;
goto Handle_Network_Return;
Connect_FENICS_IV:
call %Dir & "sfenics4.scr" (3) : Result;
goto Handle_Network_Return;
Connect_FENICS_V:
call %Dir & "sfenics5.scr" (3) : Result;
goto Handle_Network_Return;
Connect_NIFTY_VII:
call %Dir & "snroad7.scr" (3) : Result;
goto Handle_Network_Return;
Connect_INS-C:
call %Dir & "sinsc.scr" (3) : Result;
goto Handle_Network_Return;
Connect_MNP10:
call %Dir & "smnp10.scr" (3) : Result;
goto Handle_Network_Return;
Connect_DOCOMO:
call %Dir & "sdocomo.scr" (3) : Result;
goto Handle_Network_Return;
Connect_CIS:
call %Dir & "scserve.scr" (3) : Result;
goto Handle_Network_Return;
!
! Handle Network Return
!
Handle_Network_Return:
if Result = %Success goto Do_NIF_Script;
if Result = %Cancel goto Cancel_Connect;
if Result = %Fatal goto Connect_Fatal;
if Result = %ErrorCode goto Connect_Error;
goto Connect_Failure;
!
! Connect to NIF
!
Connect_NIF:
NIFNetwork = %TRUE;
send %CR;
Do_NIF_Script:
guide "Connect Successful";
reset;
exit %Success;
Connect_Failure:
guide %FailureMsg;
gosub Hangup_Connect;
reset;
exit %Failure;
Connect_Fatal:
guide "Connect Fatal";
gosub Hangup_Connect;
reset;
guide "Connect Fatal";
exit %Fatal;
Hangup_Connect:
if not UsingModem goto Hangup_Done;
define %LOCAL = 1;
Hangup_Done:
return;
Cancel_Connect:
guide "Connect cancelled";
gosub Hangup_Connect;
reset;
exit %Cancel;
Init_Fatal:
guide "Could not initialize port";
gosub Hangup_Connect;
reset;
exit %_init;
Init_TimeOut:
guide "タイムアウト";
gosub Hangup_Connect;
reset;
%ErrorCode = 1008;
exit %ErrorCode;
Connect_Error:
guide %FailureMsg;
gosub Hangup_Connect;
reset;
exit %ErrorCode;