Re: COMMAND SHELL PROGRAMMING.



Wow is that bad. All these variables with no indication of how one would set
them. The first comment claims to get user's input but never prompts for
anyhing. Another comment claims to delete the script file but only empties it.
And it only handles one file.

Long ago I read :REM is quicker then REM. The DOS variables would allow a
user to pass in everything you need.

You do not need to specify USER unless your host does not require you to
signon. And if you do not need to signon, why are you?

But thanks for showing the reversed redirection method. Until now I have
always used:
Echo some text here >outputfile.txt


On Fri, 7 Sep 2007 15:21:33 +0530, Yogesh Mahajan
<yogesh.mahajan@xxxxxxxxxxxxxxxxx> wrote:

This could be done by REXX/ CList.

But if you wish to do write FTP script on client receiving the file, you may
write a DOS shell script (.bat) like this:

==========================================================
=======================
REM Get user's input - Mainframe IP, FTP ID, Pwd etc...
REM Create downloading script, execute it (ftp) and delete it.
REM
SET strMember='%strInputFileNameFromUser%'
script.ftp ECHO USER %strUser%
script.ftp ECHO %strPwd%
script.ftp ECHO prompt n
echo Downloading the file: %strMember% TO %strSProc%
script.ftp ECHO get %strMember% %strSProc%
script.ftp ECHO bye
ftp -n -s:script.ftp %strMainframe%
TYPE NUL >script.ftp
NOTEPAD %strSProc%


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html
.



Relevant Pages

  • Re: script log file (how)
    ... The problem with my original script was that it didn't keep any logs of what ... echo copy files into archive ... if %1$==$ GOTO:Error ... REM instead of GEQ you could substitute: ...
    (microsoft.public.windows.server.scripting)
  • RE: Help for Windows Vista.
    ... just add a username and password to your command. ... Echo Loggin into our company ... REM *** drev w ... Did you run the Script as Administrator? ...
    (microsoft.public.windows.vista.general)
  • Re: script log file (how)
    ... Maybe I'll just have the script ... create log archives after they grow to a certain size and purge the oldest ... echo copy files into archive ... REM instead of GEQ you could substitute: ...
    (microsoft.public.windows.server.scripting)
  • Re: Printer Starup Script successfull for Win2k, but not for XP
    ... So I used the NT Resource Kit file "con2prt.exe" and the following script: ... @echo off ... REM Script is to set up printers on users ... REM workstations ...
    (microsoft.public.windows.server.scripting)
  • Re: FTP question...
    ... my batch file will initiate the ... must then interact with that remote process, responding to it's prompts. ... I believe echo is the solution, ... these prompts by means of a script. ...
    (microsoft.public.windowsxp.general)