home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 117 
 mark lewis to Bj”rn Felten 
 Errorlevels problem 
 12 Nov 16 11:49:40 
 
12 Nov 16 07:10, you wrote to Manuel Adorni:

 MA>> if errorlevel 235 goto B300
 MA>> if errorlevel 236 goto B1200

 BF>    You need to check the error levels highest first.

damn! i completely missed that... it is, however, one of the reasons why i
like 4DOS/4OS2/4NT...

IF errorlevel EQ 42 GOTO do_42
IF errorlevel EQ 95 GOTO do_95
IF errorlevel EQ 69 GOTO report_69
IF errorlevel LE 30 AND errorlevel NE 0 GOTO FD_ERR_%?

then you can list the errorlevels in order of most used to least used and have
the script execute faster... note the last one branches on any errorlevel less
than or equal to 30 which are all reserved for frontdoor exits... instead of
having a line to check each errorlevel, we use the %? which contains "the
external program exit code"... then later in the script we might have a
section like

:FD_ERR_30
:FD_ERR_29
:FD_ERR_28
:FD_ERR_27
:FD_ERR_26
:FD_ERR_25
:FD_ERR_24
:FD_ERR_23
:FD_ERR_22
:FD_ERR_21
:FD_ERR_20
:FD_ERR_19
:FD_ERR_18
:FD_ERR_17
:FD_ERR_16
:FD_ERR_15
:FD_ERR_14
:FD_ERR_12
  SET fdmsg=-=- FD ERROR: (%?) Reserved FD Error Code!
  GOTO LOGGER

:FD_ERR_13
  SET fdmsg=-=- FD ERROR: (%?) Maximum number of active/nested events exceded!
  GOTO LOGGER

:FD_ERR_11
  ECHO -=- FD ERROR: (%?) License Key Error!
  GOTO LOGGER

:FD_ERR_10
  SET fdmsg=-=- Normal FD Exit - Terminating %0
  GOTO LOGGER

[...]

:LOGGER
  ECHO %fdmsg
  ECHO ! %_TIME  %fdmsg >> logs\fd%node.log
  GOTO end


another thing that could be done (without 4*) is to call dobbs.bat... with 4*,
i actually parse dobbs.bat as a data file instead of using it as a script...
then i use that parsed information to start RA with... in this way i have only
one script file to deal with for running the mailer and the BBS... i used to
also execute tossing from it but switched to background tossing using a
scheduler to check if there's a semaphore indicating mail has arrived and
needs processing...

)\/(ark

Always Mount a Scratch Monkey
Do you manage your own servers? If you are not running an IDS/IPS yer doin' it
wrong...
... I sprinkled baking powder over a couple of potatoes, it didn't work.
---
 * Origin:  (1:3634/12.73)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca