home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
netdor3.zip
/
DISK_13
/
IMAGE12.ZIP
/
CATALOG
/
SCHEDULE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-08-23
|
4KB
|
127 lines
/*****************************************************************************
* Extended COREADD Back-End for SCHEDULE *
* CORE Development (CORE at WATSON) *
*****************************************************************************
* Licensed Materials-Property of IBM *
* 5604-472 (c) Copyright IBM Corporation, 1993 *
* All rights reserved. *
* US Government Users Restricted Rights - *
* Use, duplication or disclosure restricted *
* by GSA ADP Schedule Contract with IBM Corp. *
****************************************************************************/
trace 'O'
signal on syntax
signal on novalue
call on halt
call rxfuncadd 'CADDINIT', 'RXCADD', 'CADDINIT'
Ver = 'CAddInit'()
if abbrev(Ver, 'ERROR:')
then exit 200
Title = RxCAdd.STitle 'Installation'
XCode = 0
select
when RxCAdd.OpType = 'ADD'
then do
RxCAdd.BatchMode = 1
say 'Adding TIMEXEC...'
XCode = CoreAddProg('TIMEXEC')
end
when RxCAdd.OpType = 'REMOVE'
then do
XCode = 0
end
otherwise do
call 'MessageBox' Title, 'Unexpected operation type "'RxCAdd.OpType'"'
XCode = 201
end
end
call AddExit XCode
RunItl: procedure expose RXCADD. Title
parse arg ItlName
CDr = value('CORE.DIR',,'OS2ENVIRONMENT')
List = 'VERSION STITLE OPTYPE PREVIOUS'
do I = 1 to words(List)
Name = 'RXCADD.'word(List, I)
call value Name, value(Name), 'OS2ENVIRONMENT'
end I
do I = 1 to RXCADD.PROGINFO.0
call value 'RXCADD.PROGINFO.'I, RXCADD.PROGINFO.I, 'OS2ENVIRONMENT'
end I
if pos('\', ItlName) = 0
then do
parse source . . Me
ItlName = left(Me, lastpos('\', Me))||ItlName
end
'@CALL' CDr'IMPIT.CMD /R:'ItlName '/NOPAUSE'
if rc <> 0
then call AddExit 205, 'Error' rc 'returned by ITL interpreter.'
return rc
AddExit:
parse arg XCode, Msg
if XCode = ''
then XCode = 0
if Msg <> ''
then call 'MessageBox' Title, Msg
call 'CAddComplete' XCode
/**
** Uncomment this block if program is a TCP/IP app that requires TCP/IP
** to be running before it can start.
if XCode = 0 & rxOs2Ver() >= 2.0 & RxCAdd.OpType = 'ADD'
then do
call rxSleep 2
Handle = '<CORE_APP_'RxCAdd.STitle'>'
if \SysSetObjectData(Handle, 'ASSOCFILTER=TCPIP;')
then call 'MessageBox' Title, 'Warning: TCP/IP association could not',
'be set.'
end
**/
call 'CAddExit'
exit XCode
/***********************************************************************
* ERROR TRAPS *
***********************************************************************/
BugInit:
signal off error; signal off failure; signal off halt
signal off novalue; signal off notready; signal off syntax
parse upper source . . Me
if symbol('TITLE') = 'LIT'
then Title = 'COREADD Failure'
Me = Me':'||'0A'x
if symbol('GLOBALS') = 'LIT'
then do
Globals = 'TrVal'
TrVal = 'O'
end
return
Halt:
Where = SigL
call BugInit
call 'MessageBox' Title, Me||'Execution halted by user in line' Where
XXC = 204
signal DebugExit
Syntax:
Where = SigL
call BugInit
call 'MessageBox' Title,,
Me||'Syntax error' rc '('errortext(rc)') in line' Where'.'
XXC = 203
signal DebugExit
Novalue:
Where = SigL
call BugInit
call 'MessageBox' Title, Me||'NOVALUE error ('condition('D')') in line' Where'.'
XXC = 203
signal DebugExit
DebugExit:
call 'CAddComplete' XXC
call 'CAddExit'
exit XXC