Calling Batch from Rexx/OS2 
Author Message
 Calling Batch from Rexx/OS2

On Tue, 24 May 1994 19:35:57 GMT Robert Losee said:
Quote:

>My STARTUP.CMD is written in REXX. I've tried to invoke a batch
>program (TCPSTART.CMD to run TCP/IP). When I just call it with quotes
>around it I'm told that I'm chaining, a bad thing and it dies. Help
>tells me I should "CALL" it so I do, but then the called program
>TCPSTART.CMD gets errors that indicate to me the files is being
>interpreted as a Rexx program, not a batch program that it is.

You could always convert TCPSTART.CMD to REXX...

--------

Systems Programmer
NYS Legislative Bill Drafting Commission
1450 Western Avenue
Albany,NY 12203
VOICE:(518)458-5114  FAX:(518)458-5108



Sat, 09 Nov 1996 23:58:48 GMT  
 Calling Batch from Rexx/OS2

OK--this should be simple but I must be missing some concept to make
this easy.

My STARTUP.CMD is written in REXX. I've tried to invoke a batch
program (TCPSTART.CMD to run TCP/IP). When I just call it with quotes
around it I'm told that I'm chaining, a bad thing and it dies. Help
tells me I should "CALL" it so I do, but then the called program
TCPSTART.CMD gets errors that indicate to me the files is being
interpreted as a Rexx program, not a batch program that it is.

Of course I could use a "START" command but in this case I want to know
that TCPSTART has finished before I start a program that requires it.
So how do I "call" a batch subprogram and have it interpreted like a
batch program (or how do I convince OS/2 I'm not chaining)?

Your help would be appreciated.
--
*-------------------------------------------------------------------------*
Robert D. Losee                 Phone: (402) 472-7663    

Lincoln NE  68588-0496          Radio Call Sign:  N0XLU



Sun, 10 Nov 1996 03:35:57 GMT  
 Calling Batch from Rexx/OS2

I think that if you put the word "call" in quotes, REXX will never see it.

'call myfunc.cmd'

Paul Prescod



Mon, 11 Nov 1996 00:21:30 GMT  
 Calling Batch from Rexx/OS2

Quote:

>>You could always convert TCPSTART.CMD to REXX...
>I suppose that's not an option because TCPSTART.CMD is generated
>automatically.

Not a desirable option because next time I upgrade or install TCP/IP
I'll have the problem again.

[...]

Quote:
>You should try this:
>   /* Call TCPSTART */
>   'call tcpstart'
>This way you tell the command shell to call it, which should work
>whether TCPSTART is in REXX or not.

This worked great, thanks a lot.

Since I'm on the subject let me ask this:

I called tcpstart (and it now works), so when it comes back I know
tcpip is up and I can run a little tcp/ip program to get accurate
time from the Bureau of Standards to reset my clock (this is a nice
little function).

Then I start Novell's Netware Tools. This will run for my entire
session so I issue a "start" command on it and that works fine. But as
soon as it's up and running I'd like to start my cc:Mail session.

The question is: is there an easy way to tell if the NW Tools is now
running and then start the cc:Mail session.

My current solution is to do a SysSleep for 60 then "start" the
cc:Mail and exit to startup.cmd file so it's not{*filter*} around but
I'd prefer a more tightly linked or elegant solution. Any thoughts
out there?

--
*-------------------------------------------------------------------------*
Robert D. Losee                 Phone: (402) 472-7663    

Lincoln NE  68588-0496          Radio Call Sign:  N0XLU



Mon, 11 Nov 1996 01:31:32 GMT  
 Calling Batch from Rexx/OS2

Quote:

>On Tue, 24 May 1994 19:35:57 GMT Robert Losee said:

>>My STARTUP.CMD is written in REXX. I've tried to invoke a batch
>>program (TCPSTART.CMD to run TCP/IP). When I just call it with quotes
>>around it I'm told that I'm chaining, a bad thing and it dies. Help
>>tells me I should "CALL" it so I do, but then the called program
>>TCPSTART.CMD gets errors that indicate to me the files is being
>>interpreted as a Rexx program, not a batch program that it is.

>You could always convert TCPSTART.CMD to REXX...

I suppose that's not an option because TCPSTART.CMD is generated
automatically.

Robert, I think you tried to call explicitly like this:

   /* Call TCPSTART */

   call tcpstart

This way you call TCPSTART as a REXX subroutine. Since it isn't in REXX,
this fails.

You should try this:

   /* Call TCPSTART */

   'call tcpstart'

This way you tell the command shell to call it, which should work
whether TCPSTART is in REXX or not.

Horst



Sun, 10 Nov 1996 17:45:49 GMT  
 Calling Batch from Rexx/OS2
WATCOM VX-REXX provides features for determining (from REXX) what other windows
are open.  If Netware Tools is a PM program, you can use VX-REXX to poll for
its existance and then call cc:mail.

Paul Prescod



Tue, 12 Nov 1996 05:02:18 GMT  
 Calling Batch from Rexx/OS2

[...]

Quote:
>Since I'm on the subject let me ask this:

>I called tcpstart (and it now works), so when it comes back I know
>tcpip is up and I can run a little tcp/ip program to get accurate
>time from the Bureau of Standards to reset my clock (this is a nice
>little function).

>Then I start Novell's Netware Tools. This will run for my entire
>session so I issue a "start" command on it and that works fine. But as
>soon as it's up and running I'd like to start my cc:Mail session.

>The question is: is there an easy way to tell if the NW Tools is now
>running and then start the cc:Mail session.

>My current solution is to do a SysSleep for 60 then "start" the
>cc:Mail and exit to startup.cmd file so it's not{*filter*} around but
>I'd prefer a more tightly linked or elegant solution. Any thoughts
>out there?

Don't know if it may be of some help with Novel, but this work for me using
ibm lan requester.

    site: wcarchive.cdrom.com

    file: pub/os2/2_x/network/lanstart.zip 22755
    desc: Startup folder that only starts after network is up

I've put "nistime" and a couple utility who need the network before
they may be started in that folder.

Xtian,
Poly.



Mon, 11 Nov 1996 12:13:58 GMT  
 Calling Batch from Rexx/OS2

Quote:
>OK--this should be simple but I must be missing some concept to make
>this easy.
>My STARTUP.CMD is written in REXX. I've tried to invoke a batch
>program (TCPSTART.CMD to run TCP/IP). When I just call it with quotes
>around it I'm told that I'm chaining, a bad thing and it dies. Help
>tells me I should "CALL" it so I do, but then the called program
>TCPSTART.CMD gets errors that indicate to me the files is being
>interpreted as a Rexx program, not a batch program that it is.
>Of course I could use a "START" command but in this case I want to know
>that TCPSTART has finished before I start a program that requires it.
>So how do I "call" a batch subprogram and have it interpreted like a
>batch program (or how do I convince OS/2 I'm not chaining)?

I believe that you can do the following:  (I'm not running OS/2 here
and can't test it)

   -Steve



Wed, 13 Nov 1996 21:38:51 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Calling Batch from Rexx/OS2

2. OS2 REXX CPU usage function call?

3. Calling dos program from OS2 REXX

4. Calling dos program from OS2 REXX

5. call a batch file using rexx

6. Batch MVS REXX Calling Telnet

7. NT REXX assistance for OS2/VM REXX man

8. VSE: Interest in REXX-Binding for VSE-OS2 ?

9. HELP: Rexx & FTP from OS2 to MVS

10. Char input in REXX/OS2

11. OS2 REXX Compiler

12. Printing functions in rexx os2?

 

 
Powered by phpBB® Forum Software