.key address
.def address ${RAPBOSS}
 Cd RAP:
 IF NOT EXISTS RAP:RAP.WPL
 Echo "RAP must be run from the same directory where Jaz.wpl resides"
 QUIT
 ENDIF
 Search >NIL: S:User-Startup RAP:
 IF $RC NOT EQ 0 
 ; Append a standard Application-Specific User-Startup
 ; use backtick execution to get the current directory to display
 Echo "Adding Assign RAP: `CD` to S:User-Startup"
 Echo >>S:User-Startup ";BEGIN RAP MAILER"
 ; use backtick execution to get the current directory to insert
 Echo >>S:User-Startup "Assign RAP: `CD`"
 Echo >>S:User-Startup ";END RAP MAILER"
 ENDIF
 IF <address> EQ "PANEL"
 ECHO "Loading RAP Control Panel"
 SKIP panel
 ENDIF 
 IF NOT EXISTS RAP:rap.x
 Echo "RAP is not configured yet"
 SKIP panel
 ENDIF
 SetFont ${rap/305} ${rap/306}
 Echo "Calling <address>"
 SetEnv calling <address>
 Assign XFERQ: T:
 LoadLib LIBS:rexxsupport.library
 ; Copy libs and change these libs/ to LIBS: for permanent installation
 LoadLib libs/xferq.library
 LoadLib libs/xprzedzap.library
 sys:rexxc/rxlib rexxsupport.library 0 -30 0
 sys:rexxc/rxlib xferq.library 0 -30 0
 rx "if ~show('p','LOGPROC') then address COMMAND 'Run >NIL: RAP:LogProc'"
 LaunchWPL rap rap:rap.wpl rap rap!startup 0 30000
 SKIP BACK NOTEND
 QUIT
 LAB PANEL
 LoadLib libs/req.library
 run >nil: RAP:Cliva RAP:rap.p
 QUIT

