0

This is simple , I am assuming some flaws at my end. So I am using ftplib to access the Mainframe. After entering through credentials, I have to go in a certain DSNAME and see the list of the files under it..

The Code :

ftp.dir("ABCD.TR.RTYP4573.REQW3024")
ftp.retrlines("LIST")

However I am getting error like :

error_perm: 550 No data sets found.
LonelySoul
  • 1,212
  • 5
  • 18
  • 45

1 Answers1

0

After banging my head around here and there , I have finally found a solution. And I will try to be as verbose as I can since it might help others.

import ftplib

from ftplib import *

ftp = ftplib.FTP('xyz.tpt.com','abcdef','abcdef')

ftp.retrlines('LIST')

ftp.dir()

The last two commands gives the name of DSNAME's where you are currently. Both can be used interchangingly (is it a word !!!! )

ftp.sendcmd('pwd')

Provides the name of "present working directory".

ftp.cwd("'PSQW.CV.RRRR67.RETY890'")

The above command will change the working direcoty. Please please use the quotes inside quotes.

ftp.retrlines('LIST')

See the file listing........

LonelySoul
  • 1,212
  • 5
  • 18
  • 45