I want to get a file from mainframe server(text mode or ascii mode) to the datastage server via a shell script using FTP.
Is there a sample FTP script available?
Thanks for your help.
Getting file from mainframe server
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 71
- Joined: Mon Jul 09, 2007 1:12 pm
You have two main ways of getting the file - using FTP from your system or using DataStage FTP. In the former, you should google your OS name and "ftp script" because each flavor of UNIX is a bit different in how it allows scripting the commands and you might find an example for your mainframe OS connectivity strings as well. If you intend on using the DataStage FTP to do a line-by-line transfer of data the options in the stage should be pretty clear, as are the error messages when it doesn't work.
Alternatively, you could post the OS information for both ends and perhaps someone who has already gone through that might post their script.
Alternatively, you could post the OS information for both ends and perhaps someone who has already gone through that might post their script.
If you are planning to get the data from mainframe and load it in DS server, you can use the usual FTP command like
ftp <domain name for mainframe server>
mget the filename
You can use the shell script in prescript in job sequencer.
But if you just want to read the data, then either use FTP plugin for either parallel or server job. I have seen that FTP plug in and FTP enterprise may sometimes gives different results when trying to read file that has COMP fields / Signed numeric. I would suggest do some research before using Datastage FTP although in most of the cases it should work just fine.
ftp <domain name for mainframe server>
mget the filename
You can use the shell script in prescript in job sequencer.
But if you just want to read the data, then either use FTP plugin for either parallel or server job. I have seen that FTP plug in and FTP enterprise may sometimes gives different results when trying to read file that has COMP fields / Signed numeric. I would suggest do some research before using Datastage FTP although in most of the cases it should work just fine.