× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: RUNRMTCMD
  • From: "Angela Wawrzaszek(EXCH)" <wawrzaszeka@xxxxxxxxxxx>
  • Date: Tue, 11 Jan 2000 15:50:33 -0500

Okay, I'm getting closer!   I have created the input file but since I am
getting a file from a network, and from where the software on this dos pc
stores it, it has quite the long directory, therefor ftp does not like it. 

 Command                                                           
> GET \\AUSTEEL.AUSTEEL.COM\HOME\SPECTROM\AA.TXT AUSTEELLIB/CHEMF 
227 Entering Passive Mode (192,168,0,1,155,236).                  
501 Specified object name too long, limit is 10 characters: AUSTE 

Also in this instance I "hard coded" the chem code AA for the text file i
want, but can I do a parm somehow?  I do not want several files out there as
we can have many chem codes, and new ones are created all the time, thus a
new input file would have to remember to be created.

I am sorry if I'm not getting this, I have not had a lot of experience with
pc programming.                                            

-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Rob Berendt
Sent: Monday, January 10, 2000 3:51 PM
To: MIDRANGE-L@midrange.com
Subject: RE: RUNRMTCMD


I was going to point out something else, but hey, let's totally change tack.
Can you get a ftp SERVER for this PC?  I am sure that there might be some on
the cheap.  Then yes, you could do it all from the 400.
There are ways to pipe in and out of the ftp command on the 400.  Sample:
PGM        PARM(&RMTSYSTEM)                      
DCL        VAR(&RMTSYSTEM) TYPE(*CHAR) LEN(200)  
OVRDBF     FILE(INPUT) TOFILE(MYLIB/FTPSCRIPT)   
OVRDBF     FILE(OUTPUT) TOFILE(MYLIB/FTPOUTPUT)  
FTP        RMTSYS(&RMTSYSTEM)                    
DLTOVR     FILE(INPUT)                           
DLTOVR     FILE(OUTPUT)                          
CALL       PGM(ANALYZER) /* Analyze FTP output by reading the FTPOUTPUT file
*/
ENDPGM                                           


The contents of ftpscript might look like
 

user USERID  PASSWORD
cd \mydir
get myfile mylib/myfile
quit





wawrzaszeka@AUSTEEL.com on 01/10/2000 03:11:12 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: RUNRMTCMD

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('192.168.0.1')                           
       /*    USER          */
????
       /*    PASSWORD      */
????
             get  networkpc\CHEMCD.TXT CHEMF    ????
             EXIT  
                ENDPGM
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 '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 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 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
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.