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

When you say to write the script on the 400-  do you mean write a cl?  I
guess this sounded better to me since I do not have very much experience
with doing anything in dos.  I thought if I wrote a cl that passed in the 2
pos character field I want then start ftp in the cl:

*************** Beginning of data ************************************* 
             PGM        PARM(&CHEMCD)                                   
             DCL        VAR(&CHEMCD) TYPE(*CHAR) LEN(2)                 
             FTP        RMTSYS('')                           
       /*    USER          */
       /*    PASSWORD      */
             get  networkpc\CHEMCD.TXT CHEMF    ????
How do i supply the password or profile?  Do I still need runrmtcmd?  I have
done ftp within bat files but then I don't know how to do paramaters, so
this sounded better, but I'm still lost.  

Thanks for any help!                                                     

-----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 '' 
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:
             *TCAT '.BAT')                           
RUNRMTCMD  CMD(&CMD) +                                

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

-Sample command-
mypgm.bat  myfile.txt

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
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')
 RMTUSER(WAWRZASZEK) RMTPWD()                                      

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

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

\\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

 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!

Angela Wawrzaszek
 <<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].