• Subject: RE: RUNRMTCMD
  • From: "Angela Wawrzaszek(EXCH)" <wawrzaszeka@xxxxxxxxxxx>
  • Date: Mon, 10 Jan 2000 15:12:14 -0500

How about strpccmd?   This seems to work fine with the network, but I still
have the problem of trying to send a parameter.

-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Rob Berendt
Sent: Monday, January 10, 2000 11:47 AM
To: MIDRANGE-L@midrange.com
Subject: Re: RUNRMTCMD


Let's try walking first.  I am assuming that you can ping '192.168.0.1' 
from the AS/400.  Can you try to execute a command that is local to the 
PC prior to executing a command that is off on the network ifs?

Here is a sample use of RUNRMTCMD from our system:
CHGVAR     VAR(&CMD) VALUE('D:\PVC4XX\' *TCAT &REMOTE
             *TCAT '.BAT')                           
RUNRMTCMD  CMD(&CMD) +                                
             RMTLOCNAME(&CONTROLPC *IP) RMTUSER(&USER)
             RMTPWD(&PASSWORD)                        

On the parameter you want...
DOS batch files support positional parameters using %1, %2

-Sample command-
mypgm.bat  myfile.txt

-mypgm.bat-
type %1

As to actually embedding the name of the file into your ftp script perhaps a
simple basic program.  Or, 
if you're like me and prefer to code on the 400, then write the FTP script
on the 400 and have the PC do 
a get of the script file and then use this script file to send up.





wawrzaszeka@AUSTEEL.com on 01/10/2000 11:31:22 AM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     midrange-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RUNRMTCMD

        
I am trying to use runrmtcmd for a file transfer.  What I am trying to
accomplish is this -  We have a computer ALL DOS software that collects data
during testing of material and stores it in txt files.   I want to from an
AS/400 program, when a command key is pressed to pull in this data from the
text file.

I set up the command as follows:

                                                                     
 RUNRMTCMD CMD('\\austeel.austeel.com\home\chem.bat')
RMTLOCNAME('192.168.0.1' *IP) 
 RMTUSER(WAWRZASZEK) RMTPWD()                                      
 

chem.bat :   ftp -s:\\austeel.austeel.com\home\spectrom\code.txt
exit

code.txt:    open 192.168.0.1        
keybank 
keybank
put c:\spectrom\aa.txt austeellib/chemf.chemf
quit


\\austeel.austeel.com is out network ifs,  I am using this for testing
purposes, as I have not wanted to mess with the files on the other maching
yet.  however that  also will have a network address
\\aubmeltshop\spectromer1\bairdas

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7
 String '\\AUSTEEL.' contains a character that is not valid.           
 Error found on *N command.                                            
        
This is the error I keep getting,  so what am I doing wrong???

My ultimate goal is to beable to send a parameter into the bat file to
determine which file to send back.  Meaning if the user is on an AA code to
grab the aa.txt file,   if on an BB code grab the bb.txt file.  Is there a
way to sent this type of parm?

Any/all help on these 2 questions/problems would be great!

Thankyou,
Angela Wawrzaszek
Programmer/analyst
 <<Angela Wawrzaszek(EXCH).vcf>>



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].