.~GSR010.A` GSR010.ABACKUP/LOG [DBRYANT.GSR]KITINSTAL.COM;,GSR.OLB;,GSR.HLP;,GSR.CLD;,GSRTEST.COM;,GSRTEST.ALL;,GSRTEST.DAT;,GSRFILE.DAT; STONAPDEV:[DBRYANT.GSR]GSR010.A/SAVE_SET DBRYANT ISV4.7 _DON:: Z _DON$DRA4: V4.7 ~ *[DBRYANT.GSR]KITINSTAL.COM;13+,&. / 4P -"i0123KPWO 56fS7fS89GHJP$!******************************************************************************P$! !P$! K I N S T A L . C O M !P$! !P$! COPYRIGHT (C) 1989 BY !P$! DAVID BRYANT !P$! !P$!******************************************************************************?$! This procedure installs GSR V1.0 on VMS using VMSINSTAL$!$! Setup error handling$!*$ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y$ ON WARNING THEN GOTO ERR_EXIT$!K$! Handle INSTALL, IVP, and unsupported parameters passed by VMSINSTAL$!.$ IF P1 .EQS. "VMI$_INSTALL" THEN GOTO INSTALL&$ IF P1 .EQS. "VMI$_IVP" THEN GOTO IVP$ EXIT VMI$_UNSUPPORTED$! $INSTALL:$!A$! Let VMSINSTAL know we have an IVP which must be executed,5$! and that all replaced files are to be purged.$!$ VMI$CALLBACK SET IVP YES$ VMI$CALLBACK SET PURGE YES%$ VMI$CALLBACK SET SAFETY CONDITIONAL$!$$! Check for valid VMS version.1$! Will install to any version 4.0 or later.$! $ PRODUCT$TYPE = "RELEASED"$ PRODUCT$VERSION = "040"-$ VMI_TYPE = F$ELEMENT(0,",",VMI$VMS_VERSION)&$ VMI_TYPE = F$ELEMENT(0," ",VMI_TYPE)0$ VMI_VERSION = F$ELEMENT(1,",",VMI$VMS_VERSION)8$ IF PRODUCT$TYPE .NES. VMI_TYPE THEN GOTO WRONG_VERSION@$ IF F$EXTR(0,2,PRODUCT$VERSION) .NES. F$EXTR(0,2,VMI_VERSION) - THEN GOTO WRONG_VERSION@$ IF F$EXTR(2,1,PRODUCT$VERSION) .LES. F$EXTR(2,1,VMI_VERSION) - THEN GOTO V_OK$!$WRONG_VERSION:"$ VMI$CALLBACK MESSAGE E VERSION -L "This kit must be installed on an existing VMS''product$version 'system."$ EXIT VMI$_FAILURE$!$V_OK:$!4$! Check for enough free blocks on system disk.$! Need a minimum of 1000$!.$ VMI$CALLBACK CHECK_NET_UTILIZATION GSR$ 1000$!5$ IF .NOT. GSR$ THEN VMI$CALLBACK MESSAGE E NOSPACE -D "System disk does not contain enough free blocks to install GSR."&$ IF .NOT. GSR$ THEN EXIT VMI$_FAILURE$!%$! Add GSR and qualifiers to DCL$!*$ VMI$CALLBACK PROVIDE_DCL_COMMAND GSR.CLD$!&$! Update the system help library$!'$ VMI$CALLBACK PROVIDE_DCL_HELP GSR.HLP$!$! Relink GSR$! $ SET NOON#$ LINK/EXECUTABLE=VMI$KWD:GSR.EXE -E VMI$KWD:GSR/LIBRARY/INCLUDE=(GSR,SAR,TRUE_LEN,GSRMSG,GSR_HANDLER)$ IF $STATUS THEN GOTO LINK_OK$ SET ON$ TYPE SYS$INPUTK GSR failed to link. See the Release Notes included for error recovery. Installation aborted. $ERR_EXIT:$!$ EXIT VMI$_FAILURE$! $LINK_OK:$!($! Move the GSR image to the SYSEXE$!;$ VMI$CALLBACK PROVIDE_IMAGE GSR$ GSR.EXE VMI$ROOT:[SYSEXE]$!#$! All done with installation.$!?$! VMI$CALLBACK MESSAGE I INSTCOMP "GSR Installation complete."$!)$! Installation verification process$!$ EXIT VMI$_SUCCESS$!$IVP:$!$ ON WARNING THEN GOTO EXIT_IVP$!L$! VMI$CALLBACK MESSAGE I STARTIVP "Starting GSR Installation Verification."$!$ @VMI$KWD:GSRTEST$!J$! Check for differences in new output file and included output file.$!<$ DIFFERENCES/OUTPUT=VMI$KWD:GSRDIFF.OUT VMI$KWD:GSRTEST.ALL$!J$! VMI$CALLBACK MESSAGE I ENDIVP "GSR Installation Verification Complete."$! $EXIT_IVP:$ EXIT $STATUS*[DBRYANT.GSR]GSR.OLB;1+,%p.f/ 4fT-"i0123 KPWOg56nB7 eS89@8LVRGHJh% VAX-11 Librarian V04-00'nBBS!5 TT/2::  8GSRA GSR$_FACILITYA GSR$_ILLVALA GSR$_LOGGINGAGSR$_NOTSEQUENA GSR$_OPENINA GSR$_OPENOUTA GSR$_PARSEA GSR$_READAGSR$_SEARCHFAILA GSR$_WRITE4 GSR_HANDLERS~SAR3TRUE_LENB8GSRAGSRMSG4 GSR_HANDLERS~SAR3TRUE_LEN  !"#$%&'()*+,-./012 1@hWS013TRUE_LEN0120-Apr-1989 19:5820-Apr-1989 19:58VAX FORTRAN V5.0-1TRUE_LENTRUE_LENoPP H[}PQPk56P'P( xP{M xM M M (M 40M `8M @M HM 6PARSE%error parsing command line parameters,ILLVALillegal command line value, SEARCHFAILerror searching for !AS.OPENOUTerror opening !AS as output,OPENINerror opening !AS as input$WRITEerror writing output,READerror reading from input file&LOGGINGerror logging output4 NOTSEQUEN f7ile Organization not SequentialM GSRwwY PPPP QQ-PA yUV1 PPWWZ-ZG N-ZG nUV-ZG A-ZG aUV-ZG Q-ZG qYUV-ZG E-ZG eUUVXVUY1U1iG2V~ FOR$WRITE_SF\TRUE_LEN PTU PVVVU PPPU(@,( FOR$IO_T_DS FOR$IO_ENDPD LIB$SIGNAL12Y YTT2P PYYYYT, TIPPTTF1 @YS01Y6 GSR_HANDLER01 4-May-1989 20:37 4-May-1989 20:37VAX FORTRAN V4.4-177 GSR_HANDLER GSR_HANDLERP  PH[ЬЬ$޻R޼,( SYS$PUTMSGPY H GSR_HANDLER SYS$PUTMSG<$CODE$PDATA4$LOCAL2<wwITE_SF FOR$WRITE_SF FOR$WRITE_SLQk:P]P=hP91෫S01P.GSR0123-May-1989 19:2523-May-1989 19:25VAX FORTRAN V4.4-177  GSR@PFILE_SPECSEARCH_STRINGREPL_STRINGOUTPUTVERIFYLOG;) GSRTRANSFER$ADDRESSPP(()(Q(y(PPPi= GSR_HANDLERV X CLI$GET_VALUE@  p CLI$GET_VALUE@C  CLI$GET_VALUE@ $$ CLI$PRESENT@$ CLI$GET_VALUE@0V00 GSR$_OPENOUT GSR$_PARSE+(+ CLI$PRESENT@282 CLI$PRESENT@ GSR$_ILLVALGSR$_SEARCHFAIL /' @LS DBRYANT GSRSAR) oWS DBRYANT GSRSARTRUE_LENS DBRYANT GSRMSG$KYS DBRYANT GSR_HANDLER3[GS DBRYANT GSRSARGSRMSG GSR_HANDLER<SARQP ==> ^Replace Yes, No, All, End, or Quit [Y]: ==> )@))))9 SARhPPPp GSR$_LOGGINGh'Q$ POh[ ^}PQPk}PQ P} PQPS FOR$IO_END1~ FOR$WRITE_SLL FOR$IO_T_DS FOR$IO_END~ FOR$WRITE_SL\TRUE_LEN PTQ PPPPQQ(@,( FOR$IO_T_DS FOR$IO_ENDVXV2XP PTQ PPPPPQ-Q@ 2PzPP{PPPPPPPP=VX6~ FOR$WRITE_SFd FOR$IO_T_DS FOR$IO_ENDVV1@~ FOR$WRITE_SFl FOR$IO_T_DS FOR$IO_ENDE FOR$READ_SF  FOR$IO_T_DS FOR$IO_ENDPX1-P n PPPP ?QQ-PA Y PPPP QQ-PA yUV1 PPWWZ-ZG N-ZG nUV-ZG A-ZG aUV-ZG Q-ZG qYUV-ZG E-ZG eUUVXVUY1U1iG2V~ FOR$WRITE_SF\TRUE_LEN PTU PVVVU PPPU(@,( FOR$IO_T_DS FOR$IO_ENDPD LIB$SIGNAL12Y YTT2P PYYYYT, TIPPTTT2TT TTTTP ^Replace Yes, No, All, End, or Quit [Y]: ==> )@)))) SARhPPPp GSR$_LOGGINGh'Q$ POh[ ^}PQPk}PQ P} PQPPDP RP ^P }P>PAP4P,PP PPmPiP:P#PoDPaP6P2P_(P5P=PAP!iPAoPfP`PXCPXFPRP PP PP P PP P "&ww1(;WS01.SAR01 4-May-1989 20:37 4-May-1989 2R LIB$SIGNAL1oH FOR$CLOSEYT FOR$CLOSE` FOR$CLOSE˄ LIB$FIND_FILEPV1lXp FOR$CLOSE| FOR$CLOSEˌLIB$FIND_FILE_ENDP:PYESFORMATTEDUNFORMATTEDSEQUENTIALVARIABLEL |HGSR CLI$_PRESENT GSR$_OPENOUT GSR$_OPENIN GSR$_PARSE GSR$_ILLVAL GSR$_READ GSR$_WRITE GSR$_LOGGINGGSR$_NOTSEQUENGSR$_SEARCHFAIL CLI$GET_VALUE CLI$PRESENT LIB$FIND_FILELIB$FIND_FILE_ENDTRUE_LENS GSR_HANDLER LIB$ESTABLISH LIB$GET_LUNFOR$OPEN FOR$ERRSNS_W LIB$SIGNAL FOR$INQUIRE LIB$INDEXSAR FOR$CLOSE&$CODEc$PDATA`$LOCALZGSRFOR$INIT_UNDER FOR$IO_END FOR$IO_T_DS FOR$IO_X_SE FOR$READ_SF FOR$WRITE_SF FOR$WRITE_SUVLP[PjPPP~PmP ,P>PDP RP ^P }P>PAP4P,PP PPmPiP:P#PoDPa;P6P2P_(P5P=PAP!iPAoPfP`PXCPXFPRP PP PP P PP P [&ww1S01.SAR0123-May-1989 19:2523-May-1989 19:25VAX FORTRAN V4.4-177  *[DBRYANT.GSR]GSR.HLP;9+,$-. / 4J -"i0123KPWO 56YB7B89@8LVRGHJ1 GSRC Global Search and Replace will search for a character string in aB user specified set of files and replace with a character string.D When any strings are replaced in a file, a new version of the fileC will be created, with the exception of when a Quit is entered in  VERIFY mode. Format:A GSR search-and-replace-file-spec search-string replace-string 2 Parameters search-and-replace-file-specH Specifies the file(s) to be searched for string. If strings are found9 and replaced a new version of the file will be created. search-stringF Specifies the character string to be searched for. If the string isH entered without quotes, the string will be translated to uppercase forD the search. If entered with quotes the string will be used as is. replace-stringG Specifies the character string to replace the search string. If the E string is entered without quotes, the string will be translated to G uppercase for the search. If entered with quotes the string will be used as is.2 Command_Qualifiers/VERIFY /NOVERIFY defaultG When specified, the user will be prompted at each whenever the search3 string is located, before the replacement occurs. The user is prompted:/ Replace Yes, No, All, End, or Quit [Y]:J Replying 'Y' to the prompt will force the replacement and continue the search.G Replying 'N' will skip the replacement and continue the search.G Replying 'A' will force the replacement and turn VERIFY off forD the duration of the Search and Replace process, allowing all7 occurences of the search string to be replaced.C Replying 'E' will skip the replacement for the rest of the > current file and continue the search on the next file.G Replying 'Q' will skip the replacement for this file, not writeJ a new version of this file (regardless of changes) and discontinue the search process./LOG /NOLOG defaultF When specified, the filename of each file found with the string are I displayed, with the original version of each line containing the search string./ /LOG has no effect when /VERIFY is specified./OUTPUT /OUTPUT=output-file-specC When specified the same information displayed when using the /LOG/ qualifier is written to the output-file-spec. 2 Examples& 1. GSR/LOG [...]FILE*.DAT IS WAS( ==> $2$DUA0:[TEMPDIR]FILE1.DAT;2 THIS IS THE A TEST.; THIS WAS A FINE FILE BEFORE THE SEARCH AND REPLACE.0 ==> $2$DUA0:[TEMPDIR.SUBDIR]FILE2.DAT;23! THIS IS THE ANOTHER TEST. ? Searches all the files matching the FILE*.DAT wildcard F specification in the current directory and all subdirectories > for the string IS and replaces it with the string WAS.? 2. GSR/VERIFY/OUTPUT=TEMP.OUT *.COM uppercase "lowercase"( ==> $2$DUA0:[TEMPDIR]MYCOM.COM;5 A THIS IS UPPERCASE THIS IS NOT uppercase. UPPERCASE TEST. ^0 Replace Yes, No, All, End, or Quit [Y]:Y A THIS IS lowercase THIS IS NOT uppercase. UPPERCASE TEST.3 ^0 Replace Yes, No, All, End, or Quit [Y]:A A Searches all .COM files in the current directory for the F string UPPERCASE (notice the translation to uppercase because E of no quotes). The user is prompted and enters 'Y'. On the H same line notice that UPPERCASE was changed to lowercase. When B 'A' is entered at the next prompt the replacement occurs, ? VERIFY is turned off, and the search process continues.2 Author Version 1.0 % Original version by David Bryant. COPYRIGHT (C) 1989.*[DBRYANT.GSR]GSR.CLD;7+,3./ 4Lp-"i0123KPWO56:o.N7`̐.N89@8LVRGHJdefine verb gsr image sys$system:gsr.exe/ qualifier output, value(required,type=$file) qualifier verify qualifier logL parameter p1,label=file_spec,prompt="Filespec",value(required,type=$file)J parameter p2,label=search_string,prompt="Search String",value(required)I parameter p3,label=repl_string,prompt="Replace String",value(required)*[DBRYANT.GSR]GSRTEST.COM;6+,0./ 4P-"i0123KPWO56 @N7`6@N89@8LVRGHJP$!******************************************************************************P$! !P$! G S R T E S T. C O M !P$! !P$! COPYRIGHT (C) 1989 BY !P$! DAVID BRYANT !P$! !P$!******************************************************************************D$! This procedure verifies the installation of GSR V1.0 on VMS.$!K$ GSR/OUTPUT=VMI$KWD:GSRTEST.DAT VMI$KWD:GSRFILE.DAT "tomorrow" "yesterday"G$ GSR/OUTPUT=VMI$KWD:GSRTEST.DAT VMI$KWD:GSRFILE.DAT "today" "tomorrow"<$ GSR/OUTPUT=VMI$KWD:GSRTEST.DAT VMI$KWD:GSRFILE.DAT your my0$ COPY VMI$KWD:GSRTEST.DAT;* VMI$KWD:GSRTEST.ALL$ EXIT*[DBRYANT.GSR]GSRTEST.ALL;3+,$5./ 40L-"i0123KPWO56 B7``B89@8LVRGHJ) ==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;40 TODAY IS THE FIRST DAY OF THE REST OF YOUR LIFE) ==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;30 today is the first day of the rest of your life today is yesterday's yesterday? today is yesterday's TOMORROW) ==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;2 today is yesterday's tomorrow?*[DBRYANT.GSR]GSRTEST.DAT;3+,$./ 40^-"i0123KPWO"56@B7טB89@8LVRGHJ) ==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;40 TODAY IS THE FIRST DAY OF THE REST OF YOUR LIFE*[DBRYANT.GSR]GSRFILE.DAT;2+,#[./ 4/-"i0123KPWO56`jc9B79B89@8LVRGHJ/today is the first day of the rest of your life/TODAY IS THE FIRST DAY OF THE REST OF YOUR LIFEtoday is yesterday's tomorrow?today is yesterday's TOMORROW|P3D%p"i[DBRYANT.GSR]GSR.OLB;1f ?57GS004 ERBAOGR/LgG [N@RY9NT.GSR]KITINSTAL.COM;,GRUOLB;,O'0LP;<[CLD# ZTEStFK:,G{LgU.A|v%'RRT}'@T;l[HLEf ]!STyNAPDEV:DG "! 25s"QCCG/Hs"9(22+0,lmn!b"83/9ETERS,ILUIlne`al$goem7ZJjige2."O_, Z S lx-ar~o$]Rernhig dar*!CS!OPENOUTerros!rpOn2*%rxtO4s=(?9!=NTAL.BOM;7|REeIOcr^otpdnmnI (AS esipt $4P WRI\Eerror writing outpst"ibEAeCror!rWadmnT from"i%p !f9le'WO LOGEI{GezrYr u:g(oBtp͜RS8 NOTSEQUMNf7ila raixa$WKJO  0(8a}b="ehB($+yYwt HN]UA WN^.CALLBAG+ ZR&"MN"W@EFIDylt O"Rn_EXLpCMDa!I$! &p :%lgHzSTAJh`o ,+a1 4l9:87:n&r*u ?u6ev5';!s$::2'+"ef5!or icgi$$"";! $#v;) .!$! $ PWMVGU$YT igg D!Y!"@QTUCT$[E\RMND;#"045 p.%*[@ }tbvh ENEO-2-"o",VUJ?MS_VNR]HKO1$ VHKW]Q]-0c ma dei"#"lMHKWBE)0" XLM^r^RION%?E DhHF a~ggbMJ$V\VERVKM-9$)- it  hPF nU@Q#MI_TYXE TIFN CLTYUONB]fFIFNL@! IC"&^LS*0)2,PRODUCT$VERSION) +LQ5G$EXQP37,VCH_VERWION),jHRop t\UO WWMJCDERSINN@.gt 3*1"QVNoNU$VEWQaKJ( #Ggv |2/1lMJ_XDVR{T( -"$$UzHEc pr V'!OVRONGTwvVcL?QMI$FC\OYDA"V@QC\ E VERSION -L !"Thlqir$must/%6rM1 1 >/-"a&";o exlqpmu VMS7'pracucq&giwen #qyhJh.""^nQ VHK,\]_IUR@$!$Vk:Bm%S!" #,db1$-?FORf)<'d;a4L e4z om pu7674a*=SK> 'fsr#sarF171e>l('ru(1b01(elR}aicalJsgK MIMIXM a r;wQR{itN`l }OugJ PHFBde llbacHgPCgr[eA Dler"System disk does not contain enough free blocks to install GSR."&$ IF .NOT. GSR$ THEN EXIT VMI$_FAILURE$!%$! Add GSR and qualifiers to DCL$!*$ VMI$CALLBACK PROVIDE_DCL_COMMAND GSR.CLD$!&$! Update the system help library$!'$ VMI$CALLBACK PROVIDE_DCL_HELP GSR.HLP$!$!$  RdlinhsRS&% tsxin+SlEC)i.\ix ,yt. i#-k86&;Ze}@ IZ%D:GS{+_HkTE{]0c$lS ZuFH>ktCPpuOD%%MNO\W3$('t<# Ăq#Ehe|nPge߅TtYD Dt*LBAaMmGZmbcjYFL~T:\PͫԌԃ!p<=5Ąp$ž98ŁʀmaIionSunPqXM!WPA[y PeCOP&DbR ntlcto!`^mpee#Z! 9v7ptm*#3P>='t3:!/zHig:r%70/ =oP%C$ DX^!WH$ YRR$qPx@ NN+jt R޼OTEf mDq_ފdVGmeE=&0:grWfic2hn I)""H,;:klF %FiITK(; bo|ip I`TL FOR$IO_T_DS FOR$IO_END~ FOR$WRITE_SL\TRUE_LEN PTQ PPPPQQ(@,( FOR$IO_T_DS FOR$IO_ENDVXV2XP PTQ PPPPPQ-Q@ 2PzPP{PPPPPPPP=VX6~ FOR$WRITE_SFd FOR$IO_T_DS FOR$IO_ENDVV1@~ FOR$WRITE_SFl FOR$IO_T_DS FOR$IO_ENDE FOR$READ_SF  FOR$IO_T_DS FOR$IO_ENDPX1-P n PPPP ?QQ-PA Y PPPP QQ-A yUV0 +ZEB@RpoMu"-qG&k7pTV?KZG .-zG!cUV-ZG Q-\GqYgZGE/Z f_5UQNVvm$NV8Yd1i98S2VFRPIE_SF\TRUE7HEN QTU RUU @X}aJ!mB,0;FOR$IO_Ttrbʁ =_dNDP5D LI$SIGNL12\ YTT2P PYcYYT TIPPTTT2TT TTTTP G[VEMS@LLEF_RRPU [[W_m@EWS*PfSpScT ]@_DPi PEP@XP*PFPP0PRUP |PPBP!P PP PPg P P PF.P 9PDP"RP ]P hPtP PPgP_PPPP P)1P`B#QSF6 FSCODGSS|P2׳E]MLwwT1Y1B1 "S VERSION 1.00$;GSRMSG VERSION 1.00 4-MAY-1989 20:36 4-MAY-1989 20:36VAX-11 Message V04-00Mk$ABS$ MSG$SECTIONMSG$AAAAAAAAAAAMSG$AAAAAAAAAABMSG$AAAAAAAAAAC_KM GSR$_NOTSEQUEN@M GSR$_LOGGING:M GSR$_WEAD2M GSR$_WRITE,M GSR$_OPENIN$M GSR$_OPENOUTM GSR$_SEARCHFAILM GSR$_ILLVAL M GSR$_PARSEM GSR$_FACILITYDPeP*EP'P( xP{M xM M M (M 40M `8M @M HM 6PARSE%error parsing command line parameters,ILLVALillegal command line value, SEARCHFAILerror searching for !AS.OPENOUTerror opening !AS as&output,OPENINerror opening !AS as input$WRITEerror writing output,READerror reading from input file&LOGGINGerror logging output4 NOTSEQUEN fD,-) GSR$_OPENIN GSR$_OPENINGSR$_NOTSEQUEN 6(8 (( GSR$_WRITE GSR$_READLVVP|H[l LIB$ESTABLISH\lYXt LIB$GET_LUN| LIB$GET_LUN˄ LIB$GET_LUN˔ CLI$GET_VALUEP1ˬ CLI$GET_VALUEP1 CLI$GET_VALUEP1 CLI$PRESENT CLI$_PRESENTRPR1l CLI$GET_VALUEP9FOR$OPENիPP~^P~^ P~^$P~^( FOR$ERRSNS_W^0TRUE_LEN PQ PPPPQQ8@q<2P@ LIB$SIGNALlT LIB$SIGNALld CLIile Organization not SequentialM GSRwwP ==> ^Replace Yes, No, All, End, or Quit [Y]: ==> )@)))) SARhPPPp GSR$_LOGGINGh'Q$ POh[ ^tPQPk}PQ P} PQPPDP RP ^P }P>PAP4P,PP PPmPiP:P#PoDPaP6P2P_(P5P=PAP!iPAoPfP`PXCPXFPRP PP PP P PP P "&ww1(;WS01.SAR01 4-May-1989 20:37 4-May-1989 2R LIB$SIGNAL1oH FOR$CLOSEYT FOR$CLOSE` FOR$CLOSE˄ LIB$FIND_FILEPV1lXp FOR$CLOSE| FOR$CLOSEˌLIB$FIND_FILE_ENDP:PYESFORMATTEDUNFORMATTEDSEQUENTIALVARIABLEL |HGSR CLI$_PRESENT GSR$_OPENOUT GSR$_OPENIN GSR$_PARSP GSR$_ILLVAL GSR$_READ GSR$_WRITE GSR$_LOGGINGGSR$_NOTSEQUENGSR$_SEARCHFAIL CLI$GET_VALUE CLI$PRESENT LIB$FIND_FILELIB$FIND_FILE_ENDTRUE_LENS GSR_HANDLER LIB$ESTABLISH LIB$GET_LUNFOR$OPEN FOR$ERRSNS_W LIB$SIGNAL FOR$INQUIRE LIB$INDEXSAR FOR$CLOSE&$CODEc$PDATA`$LOCALZGSRFOR$INIT_UNDER FOR$IO_END FOR$IO_T_DS FOR$IO_X_SE FOR$READ_SF FOR$WRITE_SF FOR$WRITE_EUVLP[PjPPP~PmP ,P>PDP RP ^P }P>PAP4P,PP PPmPiP:P#PoDPa;P6P2P_(P5P=PAP!iPAoPfP`PXCPXFPRP PP PP P PP P [&ww1S01.SAR0123-May-1989 19:2523-May-1989 19:25VAX FORTRAN V4.4-177  *[DBRYANT.GSR]GSR.HLP;9+,$-. / 4J -"i0123KPWO 56YB7B89@8LVRGHJ1 GSRC Global Search and Replace will searcp for a character string in aB user specified set of files and replace with a character string.D When any strings are replaced in a file, a new version of the fileC will be created, with the exception of when a Quit is entered in  VERIFY mode. Format:A GSR search-and-replace-file-spec search-string replace-string 2 Parameters search-and-replace-file-specH Specifies the file(s) to be searched for string. If strings are found9 and replaced a new version of the file will be ckeated. search-stringF Specifies the character string to be searched for. If the string isH entered without quotes, the string will be translated to uppercase forD the search. If entered with quotes the string will be used as is. replace-stringG Specifies the character string to replace the search string. If the E string is entered without quotes, the string will be translated to G uppercase for the search. If entered with quotes the string will be used as is.2 Command_Kualifiers/VERIFY /NOVERIFY defaultG When specified, the user will be prompted at each whenever the search3 string is located, before the replacement occurs. The user is prompted:/ Replace Yes, No, All, End, or Quit [Y]:J Replying 'Y' to the prompt will force the replacement and continue the search.G Replying 'N' will skip the replacement and continue the search.G Replying 'A' will force the replacement and turn VERIFY off forD the uration of the Search and Replace process, allowing all7 occurences of the search string to be replaced.C Replying 'E' will skip the replacement for the rest of the > current file and continue the search on the next file.G Replying 'Q' will skip the replacement for this file, not writeJ a new version of this file (regardless of changes) and discontinue the search process./LOG /NOLOG defaultF When specified, the filename of each file found kith the string are I displayed, with the original version of each line containing the search string./ /LOG has no effect when /VERIFY is specified./OUTPUT /OUTPUT=output-file-specC When specified the same information displayed when using the /LOG/ qualifier is written to the output-file-spec. 2 Examples& 1. GSR/LOG [...]FILE*.DAT IS WAS( ==> $2$DUA0:[TEMPDIR]FILE1.DAT;2 THIS IS THE A TEST.; THIS WAS A FINE FILE BEFORE THE SEARCH AND REPLACE.0 ==> $2$DUA0:[TEMPDIR.SUBDIR]FILE2.DAT;23! THIS IS THE ANOTHER TEST. ? Searches all the files matching the FILE*.DAT wildcard F specification in the current directory and all subdirectories > for the string IS and replaces it with the string WAS.? 2. GSR/VERIFY/OUTPUT=TEMP.OUT *.COM uppercase "lowercase"( ==> $2$DUA0:[TEMPDIR]MYCOM.COM;5 A THIS IS UPPERCASE THIS IS NOT uppercase. UPPERCASE TEST. ^0 > Replace Yes, No, All, End, or Quit [Y]:Y A THIS IS lowercase THIS IS NOT uppercase. UPPERCASE TEST.3 ^0 Replace Yes, No, All, End, or Quit [Y]:A A Searches all .COM files in the current directory for the F string UPPERCASE (notice the translation to uppercase because E of no quotes). The user is prompted and enters 'Y'. On the H same line notice that UPPERCASE was changed to lowercase. When ] 'A' is entered at the next prompt the replacement occurs, ? VERIFY is turned off, and the search process continues.2 Author Version 1.0 % Original version by David Bryant. COPYRIGHT (C) 1989.*[DBRYANT.GSR]GSR.CLD;7+!,3./ 4Lp-"i0123KPWO56:o.N7`̐.N89@8LVRGHJdefine verb gsr image sys$system:gsr.exe/ qualifier output, value(required,type=$file) qualifier verify qualifier logL parameter p1,label=file_spec,prompt="Filespec",value(required,type=$file)J parameter p2,label=search_string,prompt="Search String",value(requiSed)I parameter p3,label=repl_string,prompt="Replace String",value(required)*[DBRYANT.GSR]GSRTEST.COM;6+,0./ 4P-"i0123KPWO56 @N7`6@N89@8LVRGHJP$!*****************************************************************************P$! !P$! G S R T E S T. C O M !P$! !P$! COPYRIGHT (C) 1989 BY !P$! DAVID BRYANT !P$!  !P$!******************************************************************************D$! This procedure verifies the installation of GSR V1.0 on VMS.$!K$ GSR/OUTPUT=VMI$KWD:GSRTEST.DAT VMI$KWD:GSRFILE.DAT "tomorrow" "yesterday"G$ GSR/OUTPUT=VMI$KWD:GSRTEST.DAT VMI$KWD:GSRFILE.DAT "today" "tomorrow"<$ GSR/OUTPUT=VMI$KWD:GSRTEST.DAT VMI$KWD:GSRFILE.DAT your my0$ COPY VMI$KWD:GSRTEST.DAT;* VMI$KWD:GSRTEST.ALL$ EXIT%*[DBRYANT.GSR]GSRTEST.ALL;3+,$5./ 40L-"i0123KPWO56 B7``B89@8LVRGHJ) ==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;40 TODAY IS THE FIRST DAY OF THE REST OF YOUR LIFE) ==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;30 today is the first day of the rest of your life today is yesterday's yesterday? today is yesterday's TOMORROW)==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;2 today is yesterday's tomorrow?*[DBRYANT.GSR]GSRTEST.DAT;3+,$./ 40^-"i0123KPWO"56@B7טB89@8LVRGHJ&) ==> STONAPDEV:[DBRYANT.GSR]GSRFILE.DAT;40 TODAY IS THE FIRST DAY OF THE REST OF YOUR LIFE'*[DBRYANT.GSR]GSRFILE.DAT;2+,#[./ 4/-"i0123KPWO56`jc9B79B89@8LVRGHJ/today is the first day of the rest of your life/TODAY IS THE FIRST DAY OF THE REST OF YOUR LIFEtoday is yesterday's tomorrow?today is yesterday's TOMORROW()*+,-./012 1@hWS013TRUE_LEN0120-Apr-1989 19:5820-Apr-1989 19:58VAX FORTRAN V5.0-1TRUE_LENTRUE_LENoPP H[}PQPk