.; UP.IND, IND control file. .; .; Moves up one logical device and reassigns the logical name .; given in DOWN to that LD. Any other logical names which may .; have been assigned also are deassigned. .; If the LD you are coming UP from is not DK, the procedure will .; return you to the device or LD which is DK. .; In an alternate mode, an entire sequence of nested logical .; devices are dismounted and logical names deassigned. .; .; The parameters of the control file are: .; P1 Return to system disk as DK from any nesting depth .; (the HOME function). .; P2 Inhibit printing current assignment (used with OVER). .; .; NOTE... You must assign the logical name WF: to some device. .; .; When used in conjunction with a UCL, you can type .; UP to move up in the logical device nesting. .; The UCL entry is .; UP == R IND\SY:UP (assuming you are using UCL+). .; The HOME function is implemented in a UCL by .; HOME == R IND\SY:UP HOME .; .; Written by: .; R. W. Barnard .; BIO/Comp Applications .; Albuquerque, NM 87185 .; .; Version 3.7; 6-May-87. .; .enable quiet .disable prefix .; .sets LDQ "LD" .sets LABEL "nest" .;For normal UP. .if P1 eq "HOME" .sets LABEL "dism" .;For HOME. .; .setn MAXIDX 1 .onerr toomny .; .; Get the current LD unit and its logical name. .openr SY:CURDK.TMP .read LINE .close .parse LINE " ," A CURFIL A LOGICL REST .parse REST " :" A A A CURLD A .if CURLD eq "" .goto attop .; .; Now find out the current LD and logical assignments. RU WF:READLD .if ne .exit .openr WF:LDLGCL.TMP .again: .read LINE .parse LINE " : ," LD DEV FILNAM LOG1 LOG2 LOG3 REST .; Make sure LD's mounted match CURDK info. .if LD eq "" .or .if LD eq "No" .goto none .if LD eq CURLD .goto found .if LD eq "No" .goto none .;No LD's mounted. .goto again .; .found: .if LOG'MAXIDX' eq "" .goto dism .inc MAXIDX .;Find out how many logical .goto found .;assignments have been made. .; .dism: .close DISMOUNT 'CURLD' .setn IDX 1 .;Now deassign logicals on CURLD. .deaslp: .if LOG'IDX' eq "" .goto 20 .;No more logical assignments. .sets A LOG'IDX' .;Deassign everything associated DEASSIGN 'A' .20: .if IDX ge MAXIDX .goto onward .;with the LD. .inc IDX .goto deaslp .; .onward: .if LDQ ne DEV[1:2] .goto nonest .;We aren't nested. .other: .sets CURLD DEV .;We are nested - find out .openr WF:LDLGCL.TMP .nagain: .;the info on the next file up. .read LINE .parse LINE " : ," LD DEV VOLID LOG1 LOG2 LOG3 REST .if LD eq "" .or .if LD eq "No" .goto prblem .if LD eq CURLD .goto 'LABEL' .;We found the one we are nested in. .goto nagain .; .nonest: .if P1 eq "HOME" .and .if LOGICL ne "DK" DEASSIGN DK .sets LOGICL "DK" .;If not nested, report .testdevice 'LOGICL' .parse "," DEV A A A A A ONLQ A A .if ONLQ ne "OFL" .goto 30 .;DK is not assigned correctly. DEASSIGN DK .goto nonest .;Try again. .30: .if LDQ eq DEV[1:2] .goto other .;DK is another LD. .vol VOLID 'DEV' .parse VOLID " " VOLID REST .sets A "'DEV':'VOLID' is 'LOGICL'" .;the current DK assignment. .goto done .; .nest: .close .;Need to assign logical to next LD up. ASSIGN 'CURLD' 'LOGICL' .sets A "'DEV':'VOLID' is 'LOGICL', mounted on 'CURLD':" .done: .open SY:CURDK.TMP .data E 'A'  .close .; .if P2 ne "" .exit .;Don't type our whereabouts. TYPE SY:CURDK.TMP .; .exit .; .toomny: .setn MAXIDX 3 .;Trying to use too many logical assignments. .goto dism .; .attop: ;E  'LOGICL' is not assigned to an LD. .exit .nomnt: ;E  'CURLD' is not mounted. .exit .; .none: .;No LD units mounted. ;E  'LINE' .exit .; .prblem: .;Orphan LD unit - outer one not mounted. ;E  Outer LD unit ('CURLD') is not mounted! .exit