Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Directory list from mainframe FTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
vd120

New User


Joined: 06 Nov 2010
Posts: 24
Location: NYC

PostPosted: Wed Aug 03, 2011 10:24 pm    Post subject: Directory list from mainframe FTP
Reply with quote

Hello,

I need to get directory file list from the server I'm connecting to via FTP session. When I use Dir *.txt command I can see all the files in the folder on the screen, but when I try Dir *.txt > file_name.txt it is not working. Can you tell if this is possible? My task is to bring list of files from the folder to the mainframe for furser processing.

Thank you.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Aug 03, 2011 10:40 pm    Post subject:
Reply with quote

well, you have not told us much.

you do realize that file_name.txt will reside on the pc in whatever folder your ftp session set. you will need to transfer the file (get?) to the mainframe after creating it with your dir command. don't know if you can do it in the same ftp session, but probably.

there are others on the board who are more versed in ftp that I and can give you pointers if the want.
Back to top
View user's profile Send private message
vd120

New User


Joined: 06 Nov 2010
Posts: 24
Location: NYC

PostPosted: Wed Aug 03, 2011 10:48 pm    Post subject: Reply to: Directory list from mainframe FTP
Reply with quote

Yes, I understand this and ready to get file (in the same step on next one). Problem to create file itself.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Wed Aug 03, 2011 10:55 pm    Post subject:
Reply with quote

The syntax for the FTP DIR command is DIR followed optionally by directory/file name followed optionally by (DISK. Notice that you cannot use redirection such as you attempted.

Your best bet is to use DIR *.TXT (DISK and this will create a file named FTP.DIROUTP under your TSO user id; this file will contain the directory listing.

This is easily found in section 5.18 of the Communications Server: IP User's Guide and Commands manual, which is located on the IBM web site. Why did you not look it up for yourself?
Back to top
View user's profile Send private message
vd120

New User


Joined: 06 Nov 2010
Posts: 24
Location: NYC

PostPosted: Wed Aug 03, 2011 11:13 pm    Post subject: Reply to: Directory list from mainframe FTP
Reply with quote

I looked in the different manual and did not find it. Thank you, look like it may work for me. Any chance do you know what would be high level qualifier for FTP.DIROUT when jcl will be submitted by TWS scheduler?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Aug 04, 2011 12:55 am    Post subject:
Reply with quote

If there's a USER on the job card, then it'll be whatever that USER is. If not, it'll be whatever default user id is assigned by TWS -- and since we're not running TWS here, I have no idea what that would be. That may be a question for your site support group.

Personally, I'd put a USER on the job card to ensure I know where the directory listing goes!
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Aug 04, 2011 9:03 pm    Post subject:
Reply with quote

Be careful with this too. The format of the directory list can change based on the server you are talking to. It can even change if the same server gets upgraded.

So make your directory parsing routine flexible and make sure it checks for valid data.
Back to top
View user's profile Send private message
vd120

New User


Joined: 06 Nov 2010
Posts: 24
Location: NYC

PostPosted: Thu Aug 04, 2011 9:07 pm    Post subject: Reply to: Directory list from mainframe FTP
Reply with quote

Thank you.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Aug 05, 2011 5:23 am    Post subject: Reply to: Directory list from mainframe FTP
Reply with quote

That's why I prefer LIST to DIR. Depends on what details you need, though.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts Mainframe scheduling tool ddhar Compuware & Other Tools 2 Wed Sep 27, 2017 12:48 am
No new posts How do I create a mainframe monitorin... anjali.bisht All Other Mainframe Topics 4 Fri Sep 01, 2017 2:20 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us