Scripts

Remembering the last E-Number after SELECT

This script remembering the last E-Number after SELECT command. It works with the cost saving Learning Files LWPI and LINPADOCDB
Download: script32.sc [1.9kb]

\* -------------------------------------------------------------
\* STN Express Script
\* Name:  selenum.sc
\* Function: Remembering the last E-Number after SELECT
\* Author:  Andreas Litscher, InfoLit Infobroker GmbH, CH-Bern
\* Date:  31.12.2007
\* -------------------------------------------------------------

\* Test it with the search terms:
\* magnetic levitation train gives 2 E-Numbers
\* magnetic levitation gives 23 E-Numbers
\* magnetic fields gives 130 E-Numbers
\* magnetic gives >999 E-Numbers

\* USER SPECIFIC VARIABLES
\* Path and file name of the message memory:
_selmess = "c:\\stnexp\\trnscrpt\\SELtemp.trn"

\* Path and file name of the transcript:
_transcript = "c:\\stnexp\\trnscrpt\\SELENUMtest.trn"

capture on <_transcript>

=> del his y;del exp y
echo ""
echo "Type in a search term"
echo ""
get _search

=> fil lwpi
=> set sfield bi
=> s _search \> _lwpi
if (#_lwpi=0) begin
goto @nodocs
end

capture off <>
capture on <_selmess>
=> sel _lwpi pn.b
capture off <>
capture on <_transcript /A>

=> edit e1- pn.b pn

=> fil stnguide
open <_selmess>

@start
read _line
if (_$filerror = 0) begin
if (SUBSTR(_line,1,10) = "E1 THROUGH") begin
goto @endenumber
end

goto @start
end
close
goto @further

@endenumber
if (SUBSTR(_line,15,8) = "ASSIGNED") begin
_endenum = SUBSTR(_line,12,2)
end
if (SUBSTR(_line,16,8) = "ASSIGNED") begin
_endenum = SUBSTR(_line,12,3)
end
if (SUBSTR(_line,17,8) = "ASSIGNED") begin
_endenum = SUBSTR(_line,12,4)
end
if (SUBSTR(_line,12,4) = "E999") begin
goto @error999
end
close

@further
=> fil linpadocdb
=> s e1-_endenum
goto @end

@error999
echo ""
echo "***** Stop: Limit E999 exceeded *****"
echo ""
goto @end

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

@end
=> fil stnguide
capture off <>
=>
\* -----------------------------------------------

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