Downloading file from mainframe to UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Downloading file from mainframe to UNIX
# 8  
Old 06-29-2015
Hi vbe ,
The script attached in the below url is below :
Code:
#!/bin/ksh
function ftp_files
{
ftp -n ${D2_SRVR} <<EOF
 quote user ${D2_UID}
 quote pass ${D2_PWD}
 cd ${D2_DIR}/${D2_NAME}
 lcd ${D1_DIR}/${D1_NAME}/dml/
 put file1
EOF
}

I am not totally clear on this.it seems putting the file in the destination server.Kindly explain this.

We need to download the file from mainframe to unix server.I got another script from the forum.Please find below.
Code:
#! /bin/bash
REMOTE_HOST=10.237.5.100        # Hostname of the remote Mainframe system
export USER=U213394     # Username on mainframe
export PASSWD=MUMBAI17  # Passsword on mainframe
REMOTE_FILE=FIXED.FLAT12.D15156.T66169 # Filename on remote mainframe system
LOCAL_FILE=/home/T66169_T.TXT      # Local filename to be created
/usr/lbin/secftpbatch $REMOTE_HOST ascii get $REMOTE_FILE $LOCAL_FILE
exit 0

when we are executing the above script like below :
./ftpscrpt ,we are getting below error :
Code:
./ftpscrpt
./ftpscrpt: line 7: /usr/lbin/secftpbatch: No such file or directory

It will be really helpful if you kindly help me in the above mentioned scenario.Thanks !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Downloading hdfs file to local UNIX through UNIX script

Hi All , I am very new to unix script.I am aware of unix commands but never put together in unix script level.If any one can suggest me technical guidance in the below scenario that will highly beneficial. Data have been already migrated from mainframe to Hadoop file system(HDFS).HDFS server... (15 Replies)
Discussion started by: STCET22
15 Replies

2. UNIX for Advanced & Expert Users

How to read variable length file on UNIX generated by Mainframe?

Hi All, We have variable block file generated on Mainframe. We have to process the file on unix. So we FTPed the file on binary (as it has packed decimal fields). but i don't know how to read the file on unix. As you know variable block file will have a data like record length followed by... (2 Replies)
Discussion started by: SundarGampa
2 Replies

3. UNIX for Dummies Questions & Answers

Vb file from UNIX to mainframe

Hi Everyone, Do I need to provide record length as Record length + 4 when I'm transferring a variable block files from unix to mainframe through ftp? For example, I have a file in unix (ebcidic converted) with maximum record length of 100. This works correctly, quote... (1 Reply)
Discussion started by: poova
1 Replies

4. UNIX for Dummies Questions & Answers

Mainframe to Unix. Huge file >5GB

Hi, The files are being zipped from mainframe to the UNIX server. I have to unzip huge files on AIX server which is too old. The UNZIP as well as gzip utility version is not able to handle it and if we have to install the latest version there is a lot of process which takes lot of process. Is... (4 Replies)
Discussion started by: Bijesh
4 Replies

5. UNIX for Dummies Questions & Answers

UNIX sftp from mainframe

I have the following UNIX script which copies a file from a UNIX server in Canada to a UNIX server in the UK. LOG=/data/proj/sftp/canada.log DAT=`date "+%d/%m/%y %H:%M"` HOMEDIR=/data/proj/sftp TGTFILE=P_DATA.csv cd $HOMEDIR echo "\nStarting retrieval of Canadian Data at $DAT" >> $LOG ... (1 Reply)
Discussion started by: mishnok
1 Replies

6. UNIX for Dummies Questions & Answers

Unix command used for downloading file from net

Hi, Which command I can use to download a file from website? I tried with wget and lwp-dowload but no gain. Can any one suggest me the good way to dowload? (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

7. UNIX for Advanced & Expert Users

ftp file from unix to mainframe

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

8. 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

9. Shell Programming and Scripting

mainframe assembler file into Unix

Hi, I have received a mainframe file ( VSAM file ) . I would like to handle that file in Unix. i.e I would like to take the last record of the file. I have given wc -l <file_name> , it gives 0 lines. Even though It has some lines , it is not giving count exactly. When I gave file <file_name>... (1 Reply)
Discussion started by: thambi
1 Replies

10. Shell Programming and Scripting

Moving file from Mainframe to Unix

Hi I m an absolute dummy on UNIX, I m basically a SAP guy. but I require a file which is stored on the mainframe to be moved to Unix application server. I got the following script to do it from someone #! /usr/local/bin/move_prom REMOTE_HOST=158.52.246.30 # Hostname of the remote Mainframe... (2 Replies)
Discussion started by: satyaj_99
2 Replies
Login or Register to Ask a Question