Quote and Literal subcommands are implemented#34
Conversation
…rame response can be parsed later
|
The modifications in the pull request have been tested against an IBM z/OS Communications Server. The following code fragment uses FTP to submit a batch job to the mainframe, and collects the results. def parse_job_number_from(line)
tokens = line.split('JOB')
raise StandardError, "Error: The string 'JOB' was not found in the FTP response." unless tokens.length == 2
job_number = tokens[1].split.first
job_number.sub(/^0+/, '') # Remove leading zeros
end
Net::FTP.open(@ip_or_domain) do |ftp|
ftp.login @uid, @pwd
ftp.quote 'site filetype=jes'
job_info = ftp.puttextfile @local_jcl_filepath
job_number = parse_job_number_from job_info
ftp.gettextfile "J#{job_number}", @local_results_file
end |
|
It looks good. Thank you! |
net-ftp 0.3.6+ returns the response from `put` and `puttextfile`. See ruby/net-ftp#34
|
The version of the |
|
@mslinn |
|
@shugo Many thanks! |
net-ftp 0.3.6+ returns the response from `put` and `puttextfile`. See ruby/net-ftp#34
|
I noticed that the sample code I showed above from May 3 does not appear in the documentation. How might that be accomplished? |
What do you mean by the words "the sample code I showed above from May 3"? |
|
Here is the documentation again: The modifications in the pull request have been tested against an IBM z/OS Communications Server. The following code fragment uses FTP to submit a batch job to the mainframe, and collects the results. def parse_job_number_from(line)
tokens = line.split('JOB')
raise StandardError, "Error: The string 'JOB' was not found in the FTP response." unless tokens.length == 2
job_number = tokens[1].split.first
job_number.sub(/^0+/, '') # Remove leading zeros
end
Net::FTP.open(@ip_or_domain) do |ftp|
ftp.login @uid, @pwd
ftp.quote 'site filetype=jes'
job_info = ftp.puttextfile @local_jcl_filepath
job_number = parse_job_number_from job_info
ftp.gettextfile "J#{job_number}", @local_results_file
end |
Fixes #33