I have a requirement to FTP the multiple files into mainframe Dataset from one folder through JCL
filenames can be like below:
The problem is we dont know how many files will be there , some time it may be 10 or sometime it may be 20
Also , the file names are not fixed it may vary after time to time.
the only thing that is fixed is : the extension of file it will always be either ".TXT" or ".EDI"
Now , is there any way to FTP these files one by one from directory and process it
Mostly, there has to be agreement between the naming standards and they need to be constant.
For MGET and MPUT you and the other site need to agree on file names since they can't be renamed in transit. If you REALLY want to use MGET, then I'd suggest that your local dataset be a PDS, with each file retrieved via MGET as a unique member name.
Joined: 06 Jun 2008 Posts: 8117 Location: East Dubuque, Illinois, USA
Another option would be to FTP into an OMVS directory and use the programming language of your choice (C or Perl would both be good choices if Perl is installed on your machine) to parse the directory and process the files.