this simple , assuming flaws @ end. using ftplib access mainframe. after entering through credentials, have go in dsname , see list of files under it..
the code :
ftp.dir("abcd.tr.rtyp4573.reqw3024") ftp.retrlines("list") however getting error :
error_perm: 550 no data sets found.
after banging head around here , there , have found solution. , try verbose can since might others.
import ftplib ftplib import * ftp = ftplib.ftp('xyz.tpt.com','abcdef','abcdef') ftp.retrlines('list') ftp.dir() the last 2 commands gives name of dsname's currently. both can used interchangingly (is word !!!! )
ftp.sendcmd('pwd') provides name of "present working directory".
ftp.cwd("'psqw.cv.rrrr67.rety890'") the above command change working direcoty. please please use quotes inside quotes.
ftp.retrlines('list') see file listing........
Comments
Post a Comment