DCL Examples for the PMDF Conversion channel
==============================================

            Contents
          ------------

   1.0  The conversion entry.
   2.0  A basic Vsweep example.
   3.0  A basic Melissa example.
   4.0  An elaborate Example.

1.0 The conversion entry.
-------------------------

!
in-channel=*; in-type=application; in-subtype=*;
  parameter-symbol-0=NAME; parameter-copy-0=*;
  dparameter-symbol-0-FILENAME; dparameter-copy-0=*; 
  message-header-file=2; original-header-file=1;
  override-header-file=1;
  command="@pmdf_table:virus-scan.com"

!

2.0 A basic Vsweep example.
----------------------------
$! 
$! A definition of vsweep as a foreign symbol along the lines of:
$! vsweep:=$dev:[dir]vsweepexecutable
$ run pmdf_Exe:unique_id        !to generate a unique name
$ vsweep 'INPUT_FILE'/ff/ns/il/output=vs-'unique_id'.lis
$ if sweep$_status .nes. "SWEEP$_VIRUS" then goto clean
$ mail/subj="VSweep alert ''p1' is infected" vs-'unique_id'.lis system
$ copy INPUT_FILE VSWEEP_ROOT:[INFECTED]
$ copy dev:[dir]yourwarningtext.txt OUTPUT_FILE
$ define/job OUTPUT_TYPE TEXT
$ define/job OUTPUT_SUBTYPE PLAIN
$ define/job OUTPUT_MODE TEXT
$ delete vs-'unique_id'.lis;
$ exit
$!
$ CLEAN:
$ rename/nolog INPUT_FILE OUTPUT_FILE
$ delete vs-'unique_id'.lis;
$ exit


           ===============================================

3.0 A basic melissa example. 
----------------------------
$! Run the program to check for the virus
$  define/nolog/user sys$input 'INPUT_FILE'
$  define/nolog/user sys$error nl:
$  define/nolog/user sys$output nl:
$  on severe_error then goto problem_file
$  run pmdf_exe:melissa
$  on error then exit
$  rename/nolog 'INPUT_FILE' 'OUTPUT_FILE'
$  exit
$ !
$ problem_file:
$  copy/nolog pmdf_table:virus-warning.txt 'OUTPUT_FILE'
$  copy/nolog 'INPUT_FILE' pmdf_root:[virus]
$  define/nolog/job output_type text 
$  define/nolog/job output_subtype plain
$  define/nolog/job output_encoding none
$  define/nolog/job output_mode text
$  exit

           ===============================================

4.0 An elaborate example.
-------------------------
The elaborate example has been updated and is now at

scan.dcl

Search About Contact Home Search About Contact Home