******************************************************************************* * * Activate files from select list * * Module %M% Version %I% Date %H% * * (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved * This is unpublished proprietary source code of Ardent Software Inc. * The copyright notice above does not evidence any actual or intended * publication of such source code. * ******************************************************************************* * * Maintenence log - insert most recent change descriptions at top * * Date.... GTAR# WHO Description......................................... * 10/14/98 23801 SAP Change copyrights. * 03/25/96 18212 LAG Windows NT port * 03/13/96 17797 AGM Replace 'SH -c' with OS.EXEC * 04/07/95 14980 GMH Verify filetype first * 02/09/93 11033 CSM Process file names containing $ * 01/19/93 10886 CSM Detect missing/incorrect UV.TRANS index * 01/18/93 10886 CSM Initial Creation * ******************************************************************************* $OPTIONS DEFAULT $INCLUDE UNIVERSE.INCLUDE FILENAMES.H $INCLUDE UNIVERSE.INCLUDE MACHINE.NAME ****************** ** Windows NT port ** DEFFUN IS.EQPATHS(FILESPEC.A, FILESPEC.B) CALLING "*IS.EQPATHS" ** ****************** ! * Check that we are within uniVerse home directory ! ****************** ** Windows NT port ** if not(IS.EQPATHS(@PATH, UV.ROOT)) then print "You must be within the uniVerse home account to run this program!" stop END ** ****************** if SYSTEM(27) # 0 then stop "You must be root to run this program!" ! * Get command line ! CommandLine = convert(" ",@fm,@sentence) locate "ACTLIST" in CommandLine setting POS then * Get rid of everything up to and including program name for i = 1 to POS del CommandLine<1> next i end ! * Make certain enough arguments ! NumArgs = dcount(CommandLine,@fm) if NumArgs # 1 then print "Incorrect Number of arguments" print print "Syntax: ACTLIST listname" print stop end ListName = CommandLine<1> ! * Make certain ListName name does exist ! getlist ListName to 1 else print print "List '":ListName:"' does NOT exist!" stop end ! * Check that UV.TRANS has a current Index ! open "UV.TRANS" TO uvtrans then IndexStatus = indices(uvtrans,"FILE") if IndexStatus<1,1> <> "D" then print "UV.TRANS must have an Index!" stop end if IndexStatus<1,2> = "1" then print "Index of UV.TRANS must be rebuilt!" stop end end else stop "Unable to open UV.TRANS file!" ! * Open UV.ACCOUNT file open "UV.ACCOUNT" to uvaccount else print "Unable to open UV.ACCOUNT file!" stop end ! * Disable pagination ! assign 0 to system(1005) LastAccount="" ThisAccount="" AccountPath="" ThisFile="" skip = 0 ! * Read through list ! eof = 0 loop readnext aline from 1 else eof = 1 until eof do * Get current account and file ThisAccount = field(aline,":",1) ThisFile = field(aline,":",2) * Skip files that begin with ampersand & if ThisFile[1,1] = "&" then continue * Check if AccountPath = "" or ThisAccount # LastAccount then * Read new path readv AccountPath from uvaccount,ThisAccount,11 else skip += 1 if skip = 1 then print "No entry for ":ThisAccount:" in UV.ACCOUNT file!" end print " File '":ThisFile:"' cannot be activated!" end end else * Check file type cmd = OS.EXEC:" '":UV.BIN:"/UVfile ":ThisAccount:"/":ThisFile:"'" execute cmd capturing ALINE * Look for word directory if index(ALINE<1>,": directory",1) then * Skip directories skip = 1 end else skip = 0 end end * Skip? if not(skip) then * Activate DATA portion of file cmd = OS.EXEC:" '":UV.BIN:"/log_main 10 ":ThisAccount:" 0 ":ThisFile:"'" execute cmd * Activate DICT portion of file cmd = OS.EXEC:" '":UV.BIN:"/log_main 10 ":ThisAccount:" 1 DICT ":ThisFile:"'" execute cmd end LastAccount = ThisAccount repeat ! * end of code ! stop end