Page 1 of 1

FTP - Output of LS -l disk needs to trapped

PostPosted: Tue Jan 10, 2012 9:04 pm
by Yuvarajan
http://ibmmainframes.com/about39335.html

I might have a solution for the problem in the above link. i couldn't post a reply there and hence i am here.

//LAN01040 EXEC PGM=FTP,PARM='IP address'                   
//OUTPUT   DD  SYSOUT=*                                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//INPUT    DD  *                                                       
Username                                                               
password                                                             
CD the-directory-in-which-the-files-are-available
lcd 'Your-high-level-qualifier'
ls  *.TXT   (disk------- This will list all the files available with *.TXT extension
QUIT                                                                   
/* 



The logic behind this is that the FTP determines our user ID as the local directory and creates the listing in the flat file with extension ".FTP.LSOUTPUT". So I tried to change the local directory to another name (Your-high-level-qualifier) and executed the job. I got the listing in the PDS "Your-high-level-qualifier.FTP.LSOUTPUT". This should satisfy our requirement.

Re: FTP - Output of LS -l disk needs to trapped

PostPosted: Tue Jan 10, 2012 10:20 pm
by MrSpock
That's how I do it.