.; Switch a line from RSX to DECNet .; .; B. Z. Lederman .; .ENABLE SUBSTITUTION .ENABLE DECIMAL .ASKN LINEIN Line Number .OPENR #1 LB:[3,40]XM38.DAT .IF <> .GOTO NODAT .READ: .READ #1 A .IFT .GOTO NOLINE .PARSE A "," LINE DEV CONT CSR VEC CIRC .SETN LIN 'LINE' .IF LINEIN = LIN .GOTO FOUND .GOTO READ .NOLINE: ; The line could not be found in the data file .EXIT .NODAT: ; The file containing the list of XM lines is missing. .EXIT .FOUND: .CLOSE #1 .GOSUB TSTDEV .; may have it even if not genned into RSX .IF DEV = "NSD" .GOTO SET .; if not loaded, O.K. for DECNet to try .IF A1 = "UNL" .GOTO SET .; if offline, O.K. for DECnet to try .IF A2 = "OFL" .GOTO SET .CON: CON OFFLINE 'DEV' .; test to see if it went off-line CON OFFLINE 'CONT' .SET: NCP SET LINE 'CIRC' VECTOR 'VEC' .; check exit status? NCP SET CIRCUIT 'CIRC' STATE ON .END: .EXIT .TSTDEV: .; Subroutine to test status on a device. .; .PARSE DEV ":" D1 REST should be in correct format when we get here. .; .SETS DEV D1+":" .TESTDEVICE 'DEV' .PARSE "," DEV D1 D2 D3 D4 A1 A2 A3 A4 A5 A6 A7 REST .; .; DEV device or NSD .; A1 LOD/UNL loaded/unloaded .; A2 ONL/OFL online/offline .; A3 MTD/NMT mounted/not-mounted or not-mountable .; A4 FOR/NFO mounted foreign / not-mounted or not-mountable .; A5 PUB/NPU public / not public .; A6 ATT/ATU/NAT attatched / attatched this copy ind / not attatched .; A7 ALO/ALU/NAL allocated / allocated to this terminal / not allocated .RETURN