SUBROUTINE PRSFIL ( fillst, fillen ) C CHARACTER*80 fillst CHARACTER*80 defuic, prtuic ! Default UICs. CHARACTER*80 defdev CHARACTER*20 node ! Default node name. C LOGICAL dirmod ! Directory mode? C INTEGER*2 lendev ! Length of default dev. INTEGER*2 lendir, lenprt ! " " UICs. INTEGER*2 fillen ! Length of file list. INTEGER*2 loccol, istart, iend, loccom ! INTEGER*2 i1, i2 ! Temporary vars. INTEGER*2 maxint INTEGER*2 itmp INTEGER*2 lennod C INTEGER*2 COMMA, COLON, STRLEN, LFTBRC, ! Functions. + RGTBRC EXTERNAL COMMA, COLON, STRLEN, LFTBRC, ! + RGTBRC C DATA maxint/81/ DATA node/'FUSION::'/ DATA lennod/8/ C C Executable begins here. C C Get defaults for device and directory or UIC. C ier = 1 ! Init error flag. CALL GETDEF ( defuic, lendir, lenprt, prtuic, ! Get UIC or directory + dirmod, ier ) ! mode and default. CALL GETLOG ( 'SY', 1, 2, 80, defdev, ! Try to translate + lendev, ier ) ! default device SY:. IF ( ier .NE. 1 ) THEN ! Default to LB: if no defdev = 'LB:' ! SY:. lendev = 3 ! ier = 1 ! Reset error flag. END IF ! loccol = COLON ( defdev, 1, lendev ) ! Check for colon. IF ( loccol .LE. 0 ) THEN ! No colon so insert. lendev = lendev + 1 ! defdev(lendev:lendev) = ':' ! END IF ! End colon check. C C Now check the start of the file list and look for devices and/or C UICs. C istart = 1 ! Save inputs to modify iend = fillen ! later. loccol = COLON ( fillst, istart, iend ) ! Try for colon. loccom = COMMA ( fillst, istart, iend ) ! Try for comma. IF ( loccom .LE. 0 ) loccom = maxint ! IF ( loccol .LE. 0 .OR. ! No colon or + loccol .GT. loccom ) THEN ! no colon before the ! first comma. Hence, ! use definition of SY: ! for device. iposs = 1 ! Right at start. istrt = 1 ! Ditto for DEFDEV. CALL CONCAT ( fillst, istart, iend, ! Insert default + iposs, defdev, istrt, ! device into file + lendev ) ! list at start. ELSE IF ( loccol .GT. 0 .AND. ! There is a colon + loccol .LT. loccom ) THEN ! before first comma. CALL GETLOG ( fillst, istart, loccol - 1, ! Try to translate the + 80, defdev, lendev, ier ) ! string before the :. D TYPE 99, IER, DEFDEV(1:20) D99 FORMAT ( ' IER: ',I6,' DEFDEV: ',A ) IF ( ier .GT. 0 ) THEN ! Translated. iposs = loccol ! istrt = 1 ! CALL CONCAT ( fillst, istart, iend, ! + iposs, defdev, istrt, ! + lendev ) ! END IF ! END IF ! C C Check for UIC or directory; insert one if one is not present at C the start. C locrgt = RGTBRC ( fillst, istart, iend ) ! Look for UIC or DIR. loclft = LFTBRC ( fillst, istart, iend ) ! loccom = COMMA ( fillst, istart, iend ) ! IF ( loccom .LE. 0 ) loccom = maxint ! Force to end of string. D TYPE 111, istart, iend, locrgt, loclft, loccom D111 FORMAT ( ' ISTART: ',I6,' IEND: ',I6/ D + ' LOCRGT: ',I6,' LOCLFT: ',I6/ D + ' LOCCOM: ',I6 ) IF ( loclft .LT. loccom .AND. ! [ before comma and + loclft .LT. locrgt .AND. ! [ before ], then we + loclft .GT. 0 ) THEN ! have a UIC or dir. ELSE ! No UIC, so insert one. loccol = COLON ( fillst, istart, iend ) ! Get device spec loc. iposs = loccol + 1 ! After colon. IF ( iposs .LE. 0 ) iposs = 1 ! Force to start. istrt = 1 ! Start of default. itmp = iposs CALL CONCAT ( fillst, itmp, iend, ! Insert default + iposs, defuic, istrt, ! device into file + lendir ) ! list at start. END IF ! itmp = INDEX ( fillst, '::' ) ! Is there a node? IF ( itmp .LE. 0 ) THEN ! No node name so.... fillst(istart+lennod:iend+istart+lennod-1) =! Move list over. + fillst(istart:iend) ! fillst(istart:istart+lennod-1) = ! Insert node name. + node(1:lennod) ! iend = iend + istart + lennod - 1 ! New length. END IF ! fillen = iend ! Return new length. RETURN END