OS/2, eCS & ArcaOS - Technical > Web applications

REXX and 'mode'

(1/2) > >>

Hello, everyone.

I have recently had some serious hardware issues on my server(s) and in the rebuilding process I have taken some time to rework the *.cmd files that start and restart my servers. The following example is for named.exe, but is typical of how I start/restart all of my server software.
While the following REXX script

--- Code: -----
/* 'Named Run.cmd' starts the DNS server named.exe  and keeps it going. Created 180127
   Last modified 180128, 180201, 180208, */

Do Forever


/* set window size */
'mode 29,7'

Say 'Named is running'

/* adjust as necessary */
'set path=C:\mptn\etc'
'cd \mptn\etc'

Call Syssleep 2
exit do
--- End code ---

works fine and loads the server well enough, (in this case named.exe), when it auto restarts after it fails, (or by testing via ^C), I get the following error;

--- Code: ---SYS1041: The name mode is not recognized as an internal or external command, operable program or batch file.
    10 *-*     'mode 29,7';
       +++       RC(1041)

--- End code ---

I'm no expert on this, but I know that some people who frequent this site are.

Can one of you experts, (or anyone for that matter), tell me why "mode 29,7" is accepted at first run, but not upon restart?


Doug Bissett:

--- Quote ---'mode 29,7'
--- End quote ---

I have no idea why this would work, at all. It should be: mode CO29,7 or mode BW29,7

Dave Yeo:
That was my thought, then I looked at some code. Here's a snippet from awget\awgexec.cmd.

--- Code: ---/* adjust session window */
parse upper value cfg.downloads_window with show","rows","cols
"MODE "rows","cols

--- End code ---

so it seems to be valid REXX, can't find anything in the documentation though.

Rich Walsh:

--- Quote from: Ben on February 08, 2018, 07:00:25 pm ---Can one of you experts, (or anyone for that matter), tell me why "mode 29,7" is accepted at first run, but not upon restart?

--- End quote ---


You did yourself in with 'set path=C:\mptn\etc'.  'mode.com' is in C:\os2 but that's no longer on the PATH for the session you started.  Try 'set path=C:\mptn\etc;%PATH%'

BTW... in an OS/2 session, there's no need for "CO" or "BW".

Dave Yeo:
Btw Ben, your gif triggers this,

--- Quote ---Timestamp: 02/08/18 12:27:25 PM
Warning: Loading mixed (insecure) display content "http://www.sf-w.net/Pics/1/Ben_Dragon-100.gif" on a secure page
Source File: https://www.os2world.com/forum/index.php/topic,1650.0.html
Line: 0

--- End quote ---

In this new world of HTTPS everywhere.


[0] Message Index

[#] Next page

Go to full version