home *** CD-ROM | disk | FTP | other *** search
- /* Shutdown script for REXXVAR */
-
- /* Is REXXVAR operational? */
-
- If 'SHOW'('PORTS', 'REXXVAR') = 0
- then Exit 0
-
- filename = "RAM:rv_status_info"
- Address COMMAND 'status >'filename
- If rc ~= 0
- then do
- Say 'Unable to shutdown RexxVar.'
- Exit 10
- end
-
- If 'OPEN'(1, filename, 'R') = 0
- then do
- Say 'Unable to shutdown RexxVar.'
- Exit 10
- end
-
- done = 0
- Do Forever
- Parse value 'READLN'(1) with . cli_process ':' . 'command:' name
- If 'EOF'(1)
- then Leave
-
- name = 'UPPER'('STRIP'(name,'B',' '))
-
- If 'INDEX'(name, 'REXXVAR_SERVER') > 0
- then do
- Address COMMAND 'break' cli_process 'C'
- Address COMMAND 'Assign AREXXVAR: dismount' /* For whatever it's worth */
- done = 1
- Leave
- end
- End
-
- x = 'CLOSE'(1)
- Address COMMAND 'DELETE >NIL:' filename 'QUIET FORCE'
-
- If done = 0
- then do
- Say 'Unable to shutdown RexxVar.'
- Exit 10
- end
-
- Exit 0
-