Sponsored Content
Full Discussion: FTP from AIX to Mainframe
Top Forums Shell Programming and Scripting FTP from AIX to Mainframe Post 303009886 by Corona688 on Thursday 21st of December 2017 03:00:38 PM
Old 12-21-2017
Quote:
Originally Posted by TechGyaann
Now how do I verify the transferred file to Mainframe
If you're using FTP, some FTP clients support ls -l, but it sounds like you need a lot more than that.

Quote:
Below are the scenarios:
1. FTP the currently available files(poll a directory to find the list) and put it to mainframe in one connection instance
2. Verify if all the files are copied to Mainframe successfully
3. If the FTP command fails due to some issue, try to resend the files and if the issue persist after 5 attempts to resend, inform particular user by email.
4.If the retry succeeds(send only those files that was not sent., this is in case of partially succeeded transfer; say 5 files , 2 transferred and command failed due to some issue and other 3 not sent... in that case send only those 3 files).
5. Now again verification of file(s) transferred to mainframe
If sftp's an option, have you considered rsync? You can consider it to be "cp on steroids". It's an extremely common UNIX utility which connects with ssh (same protocol as sftp) and does a lot of what you're asking for, especially the verification of files.

i.e. you can do rsync -c localfile1 localfile2 localfile3 localfile4 user@hostname:/path/to/remotefolder and it will copy and verify. It will even skip already-existing files based on checksum.

It would make your task very easy.

Code:
exec 2>errorlog
N=0
while ! rsync -c localfile1 localfile2 localfile3 localfile4 user@hostname:/path/to/remotefolder
do
        N=$((N+1))
        if [ "$N" -ge 5 ]
        then
                echo "rsync couldn't transfer files, see errlog" >&2
                exit 1
        fi
done

echo "rsync successfully transferred files"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mainframe FTP error

Hi when i am trying to ftp to a newly cretaed mainframe GDG for the first time,i am getting the following error... Verbose mode on. 200 Representation type is Ebcdic NonPrint 200 Port request OK. 550-SVC99 Return code=4 S99INFO=0 S99ERROR=38668 HEX=970C S99ERSN code X'00004379'). 550... (1 Reply)
Discussion started by: sam99
1 Replies

2. HP-UX

ftp from unix to mainframe

hi suppose i have a file named xyz(-1) and i have to transfer(ftp) it on a Mainframe from unix,how should i do it as whenever i try to do so it says use MVS naming conventions (1 Reply)
Discussion started by: ashishabhishek
1 Replies

3. UNIX and Linux Applications

ftp from unix to Mainframe

suppose i have a file named xyz(-1) and i have to transfer(ftp) it on a Mainframe from unix,how should i do it as whenever i try to do so it says use MVS naming conventions (1 Reply)
Discussion started by: ashishabhishek
1 Replies

4. UNIX for Advanced & Expert Users

ftp file from unix to mainframe

thanks (2 Replies)
Discussion started by: ashishabhishek
2 Replies

5. UNIX for Dummies Questions & Answers

FTP'ing EBCDIC Characters from Mainframe

Hi All, I am new to this site, I have a requirement where in i have to FTP a file from mainframe to Unix box. The catch here is there are few Spanish characters like N with tilde(~) and a with ` etc., all other characters are coming fine but those mentioned above are not coming in a proper... (1 Reply)
Discussion started by: harikiranr
1 Replies

6. Shell Programming and Scripting

FTP files to target Mainframe system

Hi Experts... Greetings for the day..! I just want to FTP the files to mainframe system.. my code is not working..and also i need to put the files in a particular directory in a specific naming format... ftp -i -n ${HOST_NAME} << END_FTP user ${USER_NAME} ${PASSWORD} put ${FILE_NAME}... (3 Replies)
Discussion started by: spkandy
3 Replies

7. AIX

Problems with SSH/SFTP between AIX and Mainframe

Hi, I'm not sure if this has been solved in this forum already but please do help me out if possible. Basically, I've already setup a passwordless SSH connection between 2 AIX IDs (say ID-1 and ID-2) with a Mainframe server ID (say MVSID). I'm able to successfully do an SSH from the AIX server to... (1 Reply)
Discussion started by: sambeet
1 Replies

8. UNIX for Advanced & Expert Users

FTP issues between mainframe and UNIX

Hi All, The issue is that, we have a dataset in mianframe whose record length is 153 characters. And a batch job ftpies it to the unix server(SunOS) as a test file. But the ftpied file in unix does not have a record length of 153 chars. Each record of 153 chars gets splited into two line of... (8 Replies)
Discussion started by: hareeshkumaru
8 Replies

9. AIX

ODBC Connectivity between Oracle10g on AIX and Mainframe

Hi, I have a task of setting up connectivity between Oracle 10g (AIX) and Mainframe (1 library). Went through couple of documents, forums, blogs etc. MY understanding is ODBC Generic Connectivity is free from Oracle side. Question: (may be dumb to you) 1. Has anybody done this and would... (3 Replies)
Discussion started by: jvmani_1
3 Replies

10. AIX

AIX Forum: FTP from AIX to Mainframe

This discussion thread is an extension to what was discussed in Shell scripting section. Please refer the post for the requirement: Requirement Post - Click Here The whole thread - Click Here I would like to know how I can use NDM to transfer file from AIX to Mainframe and to verify the... (3 Replies)
Discussion started by: TechGyaann
3 Replies
DUPLOAD(1)							  Debian Project							DUPLOAD(1)

NAME
dupload - utility to upload Debian packages SYNOPSIS
dupload [options] [changes_file | dir] ... DESCRIPTION
dupload is a tool that enables Debian developers to easily upload their packages to the Debian archive. At least for chiark the upload procedure is somewhat error prone (upload to Incoming/, move it to queue/). dupload checks each non-option argument to find readable files or directories. It parses the files as .changes files, or tries to find such files in the given directories. dupload will warn if the name of the file doesn't end with ".changes". Further processing is done chdir'ed into the directories of the changes files. dupload tests the available checksums and size for each file listed in the .changes file, and fails if it finds a mismatch. If all this goes well, dupload checks if there is an .upload file with the basename of the .changes file. If the file to be uploaded is recorded to have already been uploaded to the specified host, it is skipped. dupload will stop and verify if it sees you try to upload a package with a non-US Section field to a host that is neither non-us.debian.org, security.debian.org nor has the "nonus" option set to 1. After the list of files to upload is finished, dupload tries to connect to the server and upload. Each successfully uploaded file is recorded in the .upload log file. If all files of a package are processed, the .changes file is mailed to the announcement address specified in the configuration file. If files with package.announce, package_UPSTREAMVER.announce, or package_UPSTREAMVER-DEBIANREV.announce exist, these files get prepended to the announcement. UPSTREAMVER and DEBIANREV are to be replaced with actual version numbers. For example, if your package is called foobar, has upstream version 3.14, and Debian revision 2: If you only want the announcement to be made with only ONE upload, you name it foobar_3.14-2.announce. If you want it to be made with every upload of a particular upstream version, name it foobar_3.14.announce. If you want it made with every upload of a given package, name it foobar.announce. Please note: Some mail readers (like elm w/ PGP extensions) don't show mail contents outside of the signed part of a message. Login and password If no login (username) is defined in the configuration file, "anonymous" is used. The password is derived from your login name and your hostname, which is common for anonymous FTP logins. For anonymous logins only, you can provide the "password" in the configuration file. For logins other than "anonymous", you're asked for the password. For security reasons there's no way to supply it via the commandline or the environment. FTP / scp / rsync The default transfer method is FTP. Alternative methods are scp/SSH and rsync/SSH. For scp and rsync, the default login is taken from your local user name. The scp/SSH method only works properly if no password is required (see ssh(1)). When you use scp, it is recommended to set the "method" keyword to "scpb", which will transfer all files in a batch. If you are using an upload queue, use FTP because it's fast. If you are using an authenticated host, always use scp or rsync via SSH, because FTP transmits the password in clear text. OPTIONS
-d --debug [level] Enable more verbose output from the FTP module. -f --force Upload regardless of the transfers logged as already completed. -k --keep Keep going, skipping packages whose checksums don't match. -c --configfile Read the file ./dupload.conf (if it exists). Warning: this is a security risk if you are in a directory where other people can write. That's why it is not the default (unlike the previous versions). --no Dry run, no files are changed, no upload is attempted, only tell what we would do. --nomail Supress announcement for this run. You can send it later by just calling dupload again w/o this option. Note that this option is by default implied for all hosts with the "dinstall_runs" option set to 1. --mailonly Acts as if --no has been specified and but sends the announcements, unconditionally. --noarchive Adds a "X-No-Archive: yes" header so that the announcement will not be archived. You can use the per-host "archive" option in the configuration file. -p --print Print the "database" as read from the config files and exit. If a host is specified via option --to, only this host's entry is displayed. -q --quiet Be quiet, i.e. supress normal output. -t --to nickname optional Upload to nickname'd host. nickname is the key for doing lookups in the config file. You can use the "default_host" configuration option to specify a host without --to. -V --Version Prints version and exits. FILES
Configuration The configuration files are searched as follows (and read in this order, overriding each other): /etc/dupload.conf ~/.dupload.conf Other Various Debian package files are used by dupload: .dsc, .changes, .deb, .orig.tar.gz, .diff.gz dupload itself writes the log file package_version-debian.upload, and the additional announcement files package.announce, package_upstreamver.announce, and package_upstreamver-debianrev.announce. Announcement addresses By default, the announcement addresses are unset because dinstall sends mails instead. BUGS
dupload is tested on Debian systems only. It shouldn't require too much effort to make it run under others systems, though, it's written in Perl. AUTHOR
/COPYRIGHT Copyright 1996 Heiko Schlittermann, 1999 Stephane Bortzmeyer dupload is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is no warranty. SEE ALSO
dupload.conf(5) dupload 2.7.0 February 2011 DUPLOAD(1)
All times are GMT -4. The time now is 06:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy