Scripts

Storing specific answer sets

This script is for storing specific answer sets after a monitoring.
Download: script19.sc [3.7kb]

\* ------------------------------------------------------------------
\* STN Express Script
\* Name:  savesets.sc
\* Function: Stores specific answer sets
\* Author:  Andreas Litscher, InfoLit Infobroker GmbH, CH-Bern
\* Date:  19.12.2007
\* ------------------------------------------------------------------

\* User specific variable:
\* Path and file name for temporary information:

_savelist = "c:\\stnexp\\trnscrpt\\SAVELISTtemp.trn"

\* ------------------------------------------------------------------
\* Activating of the free of charge STNGUIDE file:
=> file stnguide
\* ------------------------------------------------------------------

\* Checking of the correct path setting:
open <_savelist>
if (_$filerror = 0) begin
close
goto @further1
end
else
close
echo ""
echo "Wrong path in _savelist"
echo ""
goto @end

@further1
\* ------------------------------------------------------------------
\* User entry:
echo "Type in the year and month for the first month"
echo "(e.g. 200710 for October 2007)"
echo ""
get _month1
echo "Type in the year and month for the last month"
echo " (e.g. 200711 for November 2007)"
echo "If you need only one month then type in"
echo " the same number twice"
echo ""
get _month2

\* ---------------------------------------------------------------------
\* Some variables:
_daterange = "_month1"+"01-"+"_month2"+"31"
_year = SUBSTR(_month1,1,4)
delete _savelist
open <_savelist>

if (_$filerror = 0) begin
write _year
end
close

open <_savelist>
if (_$filerror = 0) begin
read _year1
end
close

_pryear = _year1 - 7
_transcr="_daterange"+".trn"
_translist="LIST-"+"_daterange"+".trn"

_shortmont1 = SUBSTR(_month1,3,4)
_shortmont2 = SUBSTR(_month2,3,4)

_SAVEde = "DCOM"+"_shortmont1"+"_shortmont2"+"/A"
_SAVEfr = "FCOM"+"_shortmont1"+"_shortmont2"+"/A"
_SAVEen = "ECOM"+"_shortmont1"+"_shortmont2"+"/A"

_contr = "COM"+"_shortmont1"+"_shortmont2"+"/A"

delete _savelist

capture on <_savelist>
=> d sav
capture off <>

open <_savelist>

@start
read _line
if (_$filerror = 0) begin
if (SUBSTR(_line,2,13) = "_contr") begin
goto @saveerror
end

goto @start

end
close
goto @further2

@saveerror
close
echo ""
echo "Saved answer sets for _daterange allready exists"
echo "(x_contr x= D,E,F)"
echo ""
echo "Please delete (e.g. DEL M_contr) and start the script again"
echo ""
pause 10
goto @end

@further2
\* ----------------------------------------------------------------
\* Chance to stop the script:
echo ""
echo "Monitoring of the data range _daterange"
echo "Please wait about 10 seconds for controlling"
echo " the date range ....."
echo "In case of a wrong date range click"
echo " on >Cancel Script< ....."
echo ""

pause 10

\* ----------------------------------------------------------------
\* Example search with a low cost STN file:

=> FILE MEDLINE
=> s (neoplasm? or cancer?) and therap? \> _search
=> s _search and _daterange/ed \> _range

if (#_range=0) begin
goto @keinedocs
end

=> s _range and german/la \> _deutsch

if (#_range=0) begin
goto @keinedocs
end

=> s _range and french/la \> _francais

if (#_range=0) begin
goto @keinedocs
end

=> s _range and english/la \> _english

if (#_range=0) begin
goto @keinedocs
end

=> save _deutsch _SAVEde
=> save _francais _SAVEfr
=> save _english _SAVEen

goto @end

@keinedocs
echo ""
echo "***** Stop: No answers found *****"
echo ""

@end
\* ----------------------------------------------------------------
\* Activating of the free of charge STNGUIDE file:

=> file stnguide
=> d his full

echo ""
echo "END of the script"
echo ""
=>

\* ---------------------------------------------------------------

Post a comment

Enter your comments to the field below.



Name (required):  
Email (required):  
Type the code:

  Save personal information
  Receive notifications for this comment