![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Networking Error ! Networking Errors and Queries |
![]() |
|
REXX Script to NET USE
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 18,715
Join Date: Jan 2006
Rep Power: 10
IM:
|
This question was first posed in my question about the loss of a mapped netware drive in the OS/2 topic area. Please respond to this question there, as that is where all of my points are. |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Administrator
Posts: 18,715
Join Date: Jan 2006
Rep Power: 10
IM:
|
I got this to run on an OS/2 box using the syntax drivemap 10 (check every 10 secs) It remapped a drive to share called \\bunker\mcafee whenever I unlinked it. it might just do what youre looking for if you can get it to use a netware link command.../**************************** *LINKCHECK.CMD * * Checks Z drive linkage *****************************/ progname = 'LINKCHECK.CMD' progver = '1.0' /* * Syntax: */ psyntax.1 = progname progver psyntax.2 = '' psyntax.3 = ' Function:' psyntax.4 = '' psyntax.5 = ' Rexx script which checks Z: drive linkage.' psyntax.6 = ' ' psyntax.7 = ' ' psyntax.8 = '' psyntax.9 = ' Usage: Linkcheck interval [Q]' psyntax.10 = '' psyntax.11 = ' interval = Check interval in minutes. 1-60' psyntax.12 = ' Q = Quiet mode.' psyntax.13 = '' psyntax.14 = '' psyntax.0 = 14 /* * Load Sysfuncs.. */ call rxfuncadd 'SysfileTree','rexxutil','SysFileTree' call rxfuncadd 'SysCurPos','rexxutil','SysCurPos' call rxfuncadd 'SysSleep','rexxutil','SysSleep' /* * Get argument/display syntax: */ arg freq quiet if freq = '' then do do i=1 to psyntax.0 say psyntax.i end exit 0 end do forever '@cls' say '' say progname progver say '' say ' Checking Link Status...' say '' say ' Updated at 'time('C') 'on 'date('W') date() say '' say ' ________________________________________ say '' call checklink say ' ________________________________________ say '' say 'Next update in 'freq 'seconds.' say 'Press any key to exit...' call syssleep freq if chars() \= 0 then do say 'Exiting...' call prexit 0 end end /* do forever */ /* ** Link Check. */ checklink: do say '' say 'Checking Linkage...' say '' '@z:' if rc \= 0 then do say ' Drive Unlinked, Relinking..' '@net use Z: \\bunker\mcafee' '@C:' end return end /* Linkcheck */ /* ** Update alert. */ sound: do note.1 = 494 note.2 = 330 note.0 = 2 do i= 1 to note.0 call beep note.i,600 end return /* ** Exit. */ prexit: do arg exitcd '@echolog Exiting...' if exitcd \= 0 then exitmsg = progname' EXITING WITH ERROR CODE:'exitcd else exitmsg = ' 'progname' Completed Sucessfully. Have a nice day.' say '' say exitmsg say '' call directory home exit 0 end /* prexit() */ |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|