home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
db22re.zip
/
STARTUP.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1993-03-09
|
2KB
|
75 lines
/*
┌──────────────────────────────────────────────────────────────────┐
│ Name : startup.cmd │
│ Purpose : boot time startup functions │
│ Platform : DB2/2 │
│ Author : Jeff Fisher │
│ IBM Toronto Development Lab │
│ Disclaimer : This "sample" code is for demonstrations only, no │
│ warrenties are made or implied as to correct │
│ function. You should carefully test this code in │
│ your own environment before using it. │
│ │
└──────────────────────────────────────────────────────────────────┘
*/
BeginProg:
call SetColor
address cmd '@ECHO OFF'
if RC \= 0 then signal ErrorRC
say
header1 = 'STARTUP Processing'
say c.yellow center(header1, 60, ' ')
say c.normal
say 'Register REXX SQL functions'
rc = RxFuncAdd('SQLDBS' , 'SQLAR' , 'SQLDBS')
if RC \= 0 then signal ErrorRC
rc = RxFuncAdd('SQLEXEC', 'SQLAR', 'SQLEXEC')
if RC \= 0 then signal ErrorRC
say 'Start Database Manager'
address cmd 'STARTDBM'
if RC \= 0 then signal ErrorRC
say 'Local Logon'
address cmd 'LOGON USERID /P=PASSWORD /L'
if RC \= 0 then signal ErrorRC
say
say c.magenta '>>> STARTUP command complete <<<'
say c.normal
EndProg:
address cmd 'EXIT'
ErrorRC:
say c.red
call beep 220,500
say
say ' >>> OS/2 has returned a fatal condition code'
say ' RC = ' RC
say
pause
signal EndProg
SetColor:
ansii.esc = '1B'x
c.normal = ansii.esc || '[0m'
c.highlite = ansii.esc || '[1m'
c.blackback = ansii.esc || '[40m'
c.red = c.normal || ansii.esc || '[31m'
c.grey = c.normal || ansii.esc || '[37m'
c.blue = c.normal || ansii.esc || '[34m'
c.magenta = c.normal || ansii.esc || '[35m'
c.yellow = c.highlite || ansii.esc || '[33m'
c.reset = c.normal || c.grey || c.blackback
return