Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to ftp a pds library(each members contents) drom mainframe to my pc. I wrote the following code:

@ftp -i -s:"%~f0"&GOTO:EOF
open myip
myuser
mypass
pwd
get 'hlq.2ndlq.3rdlq.4thlq(*)' T_NORMAL.txt

When I run it it opens and shuts down the dos window. I can't seem to find what's wrong.

share|improve this question

migrated from stackoverflow.com Apr 24 '13 at 19:04

This question came from our site for professional and enthusiast programmers.

1  
Open a terminal window via Start -> Run cmd, OK (if you have no Run option on the Start menu, press Windows-R instead). Then cd to the folder with your batch file and run it. You should be able to see the error messages that way, and that should help you find what's wrong. –  Aaron Miller Apr 24 '13 at 21:40

2 Answers 2

You can't do (*) to get all the members, nor yet into one file.

If you treat the PDS as a directory/folder and then use MGET *, and you should have all the members downloaded, with their original 1-8 character names.

share|improve this answer
    
MGET *? Where do I indicate the path there? –  csbl_81 Apr 24 '13 at 18:21
1  
You treat the PDS as a directory so you "change directory" to it. So "CD your-PDS". You already have PWD so you should be able to confirm you have it. Then the MGET *. However, if your window is closing even when there is a PAUSE in the batch file, then there may be something fundamental wrong with your MS-DOS batch file. Try a PAUSE as the very first statement in the batch file. If it still closes then you'll need to look elsewhere. If it doesn't, move the PAUSE until you get the closing effect, and you'll know where to concentrate. –  Bill Woodger Apr 24 '13 at 18:31

If this is an MS-DOS batch file, then add "pause" on the last line of this script and run it. This way it will allow you to have a look at the results before you close the DOS window.

share|improve this answer
    
It doesn't work. It closes anyway. –  csbl_81 Apr 24 '13 at 18:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.