PJP Documentation > Reference Manual Menu

 

Phantom Job Processor Reference Manual

Scripts for System-Launched Processes

 

 

Cubs Consulting, Inc.’s expertise is in multi-value database (jBASE and UniVerse) programming and customizations for Columbia Ultimate’s “The Collector System”.  We are not qualified to act as operating system administrators.  However, for a complete installation of our PJP software, it is necessary to run a couple of programs (PHANTOM.MONITOR and PHANTOM.RESUME) from your operating system’s scheduling tool (cron for Unix or Scheduled Tasks for Windows).  Some collection businesses using TCS have resources available to make this happen, but some don’t.  With that in mind, we present here some examples of how this scheduling task has been successfully accomplished on live sites.

 

Please bear in mind that these examples have some data hard-coded for local use which will need to be tweaked to make it work in your specific computing environment.  We have attempted to make these stand out by marking them in red.  Please note that the source code file PL-CCI is installed in a single logon on your system, which we call the “Main Logon”, and which is indicated in the following examples as LOGON1.

 

·         Unix / UniVerse

·         Unix / jBASE

·         Windows / UniVerse

·         Windows / jBASE

 

 

Unix / UniVerse:

cron setup:

# make sure background jobs running

0 * * * * /data/scripts/phantom_monitor LOGON1 1>/dev/null 2>/dev/null

5 * * * * /data/scripts/phantom_resume LOGON1 1>/dev/null 2>/dev/null

6 * * * * /data/scripts/phantom_resume LOGON2 1>/dev/null 2>/dev/null

 

phantom_monitor script:

#

# runs as root and starts PHANTOM.MONITOR running every hour

#

cd /data/$1

/uv/bin/uv "PHANTOM PHANTOM.MONITOR "$1

exit

 

phantom_resume script:

#

# runs as root and starts PHANTOM.RESUME running every hour

#

cd /data/$1

/uv/bin/uv "PHANTOM PHANTOM.RESUME "$1

exit

 

Note:

This setup was provided by Ian Sandler who provides Unix system administration services and other specialized services such as system performance optimization, migration to new hardware, automated file transfers, outbound emails, outbound faxes, and some areas of SAS 70 compliance such as source code and user controls.  Ian can be reached by phone at (561)208-8158 or (250)483-6752, or by email at iansandl@yahoo.com.

 

 

 

Unix / jBASE:

cron setup:

# make sure background jobs running

0 * * * * /data/scripts/phantom_monitor LOGON1 1>/dev/null 2>/dev/null

5 * * * * /data/scripts/phantom_resume LOGON1 1>/dev/null 2>/dev/null

6 * * * * /data/scripts/phantom_resume LOGON2 1>/dev/null 2>/dev/null

 

phantom_monitor script:

# execute jbase command PHANTOM_MONITOR in /data/$1/MD from unix

#

JBCLOGNAME=$1; export JBCLOGNAME

JEDIFILENAME_MD=/cubs/$1/data/MD; export JEDIFILENAME_MD

JEDIFILEPATH=/cubs/$1/data; export JEDIFILEPATH

JBCRELEASEDIR=/usr/jbc; export JBCRELEASEDIR

JBCGLOBALDIR=/usr/jbc; export JBCGLOBALDIR

NAVROOT=$JBCRELEASEDIR/jdp ; export NAVROOT

JEDIFILENAME_SYSTEM=/cubs/SYSTEM; export JEDIFILENAME_SYSTEM

 

stty intr ^C erase ^h eof ^d susp ^- kill ^- eol ^- eol2 ^- werase ^- lnext ^- opost echo echoe echok onlcr -lcase

umask 000

cd /cubs/$1/data

 

PATH=$JBCRELEASEDIR/bin:$NAVROOT/bin:/cubs/$1/bin:/cubs/logon1/bin_PL-CCI:$PATH:.:/usr/ccs/bin:/usr/ucb:/cubs/LIB2003F/bin; export PATH

LD_LIBRARY_PATH=$JBCRELEASEDIR/lib:$NAVROOT/lib:/cubs/$1/lib:/cubs/logon1/lib_PL-CCI:/usr/ccs/lib:/usr/lib:/cubs/LIB2003F/lib; export LD_LIBRARY_PATH

LIBPATH=$JBCRELEASEDIR/lib:$NAVROOT/lib:/cubs/$1/lib:/usr/ccs/lib:/cubs/logon1/lib_PL-CCI:/usr/lib:/cubs/LIB2003F/lib; export LIBPATH

SHLIB_PATH=$JBCRELEASEDIR/lib:$NAVROOT/lib:/cubs/$1/lib:/cubs/logon1/lib_PL-CCI:/usr/ccs/lib:/usr/lib:/cubs/LIB2003F/lib; export SHLIB_PATH

JBCOBJECTLIST=$NAVROOT/lib:/cubs/$1/lib:/cubs/logon1/lib_PL-CCI:/usr/ccs/lib:/usr/lib:/cubs/LIB2003F/lib; export JBCOBJECTLIST

MANPATH=$MANPATH:$JBCRELEASEDIR/man:/usr/share/man; export MANPATH

 

$JBCRELEASEDIR/bin/jbcconnect

$JBCRELEASEDIR/bin/jpq /cubs/$1/data/MD]D/PHANTOM_MONITOR

PHANTOM_MONITOR MD Item:

PQ

HPHANTOM.MONITOR

P

phantom_resume script:

# execute jbase command PHANTOM_RESUME in /data/$1/MD from unix

#

JBCLOGNAME=$1; export JBCLOGNAME

JEDIFILENAME_MD=/cubs/$1/data/MD; export JEDIFILENAME_MD

JEDIFILEPATH=/cubs/$1/data; export JEDIFILEPATH

JBCRELEASEDIR=/usr/jbc; export JBCRELEASEDIR

JBCGLOBALDIR=/usr/jbc; export JBCGLOBALDIR

NAVROOT=$JBCRELEASEDIR/jdp ; export NAVROOT

JEDIFILENAME_SYSTEM=/cubs/SYSTEM; export JEDIFILENAME_SYSTEM

 

stty intr ^C erase ^h eof ^d susp ^- kill ^- eol ^- eol2 ^- werase ^- lnext ^- opost echo echoe echok onlcr -lcase

umask 000

cd /cubs/$1/data

 

PATH=$JBCRELEASEDIR/bin:$NAVROOT/bin:/cubs/$1/bin:/cubs/logon1/bin_PL-CCI:$PATH:.:/usr/ccs/bin:/usr/ucb:/cubs/LIB2003F/bin; export PATH

LD_LIBRARY_PATH=$JBCRELEASEDIR/lib:$NAVROOT/lib:/cubs/$1/lib:/cubs/logon1/lib_PL-CCI:/usr/ccs/lib:/usr/lib:/cubs/LIB2003F/lib; export LD_LIBRARY_PATH

LIBPATH=$JBCRELEASEDIR/lib:$NAVROOT/lib:/cubs/$1/lib:/usr/ccs/lib:/cubs/logon1/lib_PL-CCI:/usr/lib:/cubs/LIB2003F/lib; export LIBPATH

SHLIB_PATH=$JBCRELEASEDIR/lib:$NAVROOT/lib:/cubs/$1/lib:/cubs/logon1/lib_PL-CCI:/usr/ccs/lib:/usr/lib:/cubs/LIB2003F/lib; export SHLIB_PATH

JBCOBJECTLIST=$NAVROOT/lib:/cubs/$1/lib:/cubs/logon1/lib_PL-CCI:/usr/ccs/lib:/usr/lib:/cubs/LIB2003F/lib; export JBCOBJECTLIST

MANPATH=$MANPATH:$JBCRELEASEDIR/man:/usr/share/man; export MANPATH

 

$JBCRELEASEDIR/bin/jbcconnect

$JBCRELEASEDIR/bin/jpq /cubs/$1/data/MD]D/PHANTOM_RESUME

PHANTOM_RESUME MD Item:

PQ

HPHANTOM.RESUME

P

Note:

This setup was provided by Ian Sandler who provides Unix system administration services and other specialized services such as system performance optimization, migration to new hardware, automated file transfers, outbound emails, outbound faxes, and some areas of SAS 70 compliance such as source code and user controls.  Ian can be reached by phone at (561)208-8158 or (250)483-6752, or by email at iansandl@yahoo.com.

 

Windows / UniVerse:

Scheduled Tasks:

Since different versions of Windows have different user interfaces for the Scheduled Tasks service, we are not going to attempt to show you the screen shots of how to set these processes up.  It should suffice to say that the following commands need to be executed on the following schedule.

 

Command line

Schedule

PHANTOM_EXEC LOGON1-PHANTOM.MONITOR

At the top of each hour

PHANTOM_EXEC LOGON1-PHANTOM.RESUME

5 minutes past each hour

PHANTOM_EXEC LOGON2-PHANTOM.RESUME

6 minutes past each hour

 

PHANTOM_EXEC.bat script:

This script should reside within a folder in the “PATH”, such as C:\WINDOWS.

 

@echo off

rem This program logs to a pseudo-logon, as specified in

rem command line parameter %1, causing the logon proc in the

rem MD of the host-logon, named for the pseudo-logon, to run.

rem

cd c:\cubs\ccontrol

c:\ibm\uv\bin\uv.exe "LOGTO %1"

 

Setting up the pseudo-logons:

LOGON1-PHANTOM.MONITOR, LOGON1-PHANTOM.RESUME, and LOGON2-PHANTOM.RESUME are all pseudo-logons.  To set up each pseudo-logon requires an item in the SYSTEM file and in the MD file.  Here is how to set up those items for LOGON1-PHANTOM.MONITOR.

 

>COPY SYSTEM LOGON1

TO: LOGON1-PHANTOM.MONITOR

 

Within the MD for LOGON1, add the new item:

 

>ED MD LOGON1-PHANTOM.MONITOR         

MD CCI-PHANTOM.MONITOR (CCI)                         

001 PQ                             

002 HPHANTOM.MONITOR               

003 P                              

                       

Windows / jBASE:

Scheduled Tasks:

Since different versions of Windows have different user interfaces for the Scheduled Tasks service, we are not going to attempt to show you the screen shots of how to set these processes up.  It should suffice to say that the following commands need to be executed on the following schedule.

 

Command line

Schedule

PHANTOM_EXEC LOGON1 PHANTOM.MONITOR

At the top of each hour

PHANTOM_EXEC LOGON1 PHANTOM.RESUME

5 minutes past each hour

PHANTOM_EXEC LOGON2 PHANTOM.RESUME

6 minutes past each hour

 

PHANTOM_EXEC.bat script:

This script should reside within a folder in the “PATH”, such as C:\WINDOWS.

 

@echo off

rem This program executes a jBase program according to 2

rem  command line parameters:

rem    %1 = jBase logon

rem    %2 = Program name to execute

rem

setlocal

set HOME=d:\cubs\%1\data

set CCIPROGPATH=d:\cubs\LOGON1\bin_PL-CCI

set LOCALPROGPATH=d:\cubs\%1\bin

set CUBSPROGPATH=d:\cubs\lib2006a\bin

set PATH=%PATH%;%CCIPROGPATH%;%LOCALPROGPATH%;%CUBSPROGPATH%

set JBCOBJECTLIST=d:\cubs\lib2006a\lib;d:\cubs\LOGIN1\lib_PL-CCI

set JBCLOGNAME=%1

set JEDIFILENAME_MD=d:\cubs\%1\data\MD]D

set JEDIFILEPATH=d:\cubs\%1\data

set JBCRELEASEDIR=d:\cubs\cutools

set JBCGLOBALDIR=d:\cubs\cutools

set JEDIFILENAME_SYSTEM=d:\cubs\SYSTEM]D

%CCIPROGPATH%\%2

endlocal

   

 

Home             

 

Copyright 2010, Cubs Consulting, Inc.