-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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