.ENABLE SUBSTITUTION .ENABLE GLOBAL .; .; OPS - Select files and perform operation (PIP version). .; .; @OPS (file selection) (command string) .; .PARSE COMMAN "()()" TMP FILE TMP CMD1 TMP .; .; If no selection string, prompt for string .; .IF FILE = "" .ASKS FILE File selection .; .; If no command string specified, loop and read strings. .; .IF CMD1 <> "" .GOTO 2000 .SETN CMD 0 .1000: .INC CMD .ASKS TMP Command #'CMD' .IF TMP = "" .GOTO 2000 .SETS CMD'CMD' TMP .GOTO 1000 .; .; Make PIP selection to temporary file and open for read. .; Check for special cases of /TD and /DD. .; .2000: .SETS SWT "" .PARSE FILE "/" FILE SWT .IF <= 1 .GOTO 2100 .SETS SWT "/"+SWT+"&" .SETS DMY SWT[1:3] .IF DMY = "/TD" .GOTO 2100 .IF DMY = "/DD" .GOTO 2100 ; ; *** Error: Only /TD and /DD selection switches allowed. ; .exit .; .2100: .ENABLE QUIET PIP 'SWT'OPS.TMP='FILE'/BR/NM .DISABLE QUIET .; .; Read PIP file and select filenames. Parse so $N is entire .; filename, $D is device, $U is UIC ($G is group, $O is owner), .; $F is filename, $T is filetype, and $V is version. .; .OPENR OPS.TMP .3000: .READ LINE .IFT .GOTO 9999 .; .PARSE LINE " [,]" TMP D1 D2 D3 TMP .IF < 4 .GOTO 3010 .SETS $D D1 .SETS $G D2 .SETS $O D3 .SETS $U "["+$G+","+$O+"]" .GOTO 3000 .; .3010: .PARSE LINE " []" TMP D1 D2 TMP .IF < 3 .GOTO 3100 .SETS $D D1 .SETS $G "" .SETS $O "" .SETS $U "["+D2+"]" .GOTO 3000 .; .3100: .SETS LINE LINE[3:*] .PARSE LINE ".;" $F $T $V TMP .IF < 3 .GOTO 3000 .SETS $T "."+$T .SETS $V ";"+$V .SETS $N $D+$U+$F+$T+$V .; .IF $F = "OPS" .IF $T = ".TMP" .GOTO 3000 .; .; Enter loop and execute commands for each file. .; .SETN CMD 0 .4000: .INC CMD .IFNDF CMD'CMD' .GOTO 3000 .SETS INP CMD'CMD' .SETS OUT "" .; .4100: .PARSE INP "$" TXT NXT .IF <= 1 .GOTO 5000 .SETS CHR NXT[1:1] .SETS INP NXT[2:*] .SETS OUT OUT+TXT+$'CHR' .GOTO 4100 .; .5000: .SETS OUT OUT+TXT 'OUT' .GOTO 4000 .; .9999: .ENABLE QUIET .CLOSE PIP OPS.TMP;*/DE/NM