| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Rexx & Program Objects... |
On in a message to PHIL PATTENGALE, Mike Bilow wrote:
PP> I am trying to modify a rexx script (used to do FTP
PP> transfers of Fidonet echomail) and need to restart my dos
PP> mailer (dbridge) after completion.
PP> Originally, I was just calling hstart to fire up the batch,
PP> but that loads DB's internal X00 instead of SIO's vx00. So,
PP> how can I fire up the correct program object from within a
PP> rexx script?
MB> Reference VX00 globally as a DEVICE in CONFIG.SYS.
That treats the symptoms, by loading VX00 in _every_ DOS shell.
There is a way to do what you asked: loading the program object for
your mailer from REXX.
In the RexxUtil function package that comes with OS/2, there's a
function called SysOpenObject() (assuming that you're using Warp -
if you're using OS/2 2.x, you can use SysSetObjectData()) that will
open a program object given its object ID.
So what you need to do is create an object with an ID (OS/2
unfortunately doesn't supply one by default), and copy the settings
of your current object into the new object.
The following REXX script will create an object with the ID
if you run it with the parameter "/CREATE", and will
open a default view of that object otherwise.
---Begin MYMAILER.CMD-----don't-cut-here---you'll-ruin-your-monitor--
/* rexx */
objID = '' /* Change to whatever you want */
/* load RexxUtil library - not necessary if loaded already -- I load
mine in STARTUP.CMD */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
parse upper arg create rest
if create = '/CREATE' then
rc = SysCreateObject('WPProgram',, /* create a program object */
'My Mailer',, /* with this title */
'',, /* on the desktop */
'OBJECTID='objID,, /* assign an object ID */
'fail') /* fail if the object exists */
else
rc = SysOpenObject(objID, default, 1)
/* use
rc = SysSetObjectData(objID, 'OPEN=DEFAULT')
in OS/2 2.x -- SysOpenObject() hadn't been included yet */
---End MYMAILER.CMD-----don't-cut-here---you'll-ruin-your-monitor--
Ed Blackman
... If this is hell, then where are all the JCL decks?
--- OMX/Blue Wave/OS2 v2.20
* Origin: Blackman/Strayer '96 Campaign HQ (910) 425-5610 (1:3634/22.42)SEEN-BY: 270/101 620/243 711/401 409 410 413 430 808 809 934 955 712/407 515 SEEN-BY: 712/517 628 713/888 800/1 7877/2809 @PATH: 3634/22 37 38 3615/50 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.