Wednesday 21 September 2016

Shell script to FTP file from oracle apps server to another windows/unix based server

Below given script one can use to FTP file from oracle apps server to unix/windows based client server. kindly register host program in oracle apps by giving executable file name as XXCUST_FTP_SH.prog. This program will FTP file from Oracle EBS source file path to another client server destination path which is defined in variable.

Shell script
====================================================================
# @(#) XXCUST_FTP_SH.prog
# ===================================================================
# PURPOSE: This program will FTP file from oracle EBS server to other
# windows/Unix based server
# ===================================================================
# -------------------------------------------------------------------
# PARAMETERS
# $0 = Shell Script Name
# $1 = username/password
# $2 = userid
# $3 = username
# $4 = request_id
# ===================================================================
#!/bin/bash
HOST='xxcust.host.com'
USER='ftpuser'
PASSWD='ftp1234'
SOURCE_PATH='/tmp/erpdev1/xxftp/outbox'
DEST_PATH='/xxcust/ftp/inbox'
FILE_NAME='xxtestftp.txt'
ftp -n $HOST << END_SCRIPT
user $USER $PASSWD
put $SOURCE_PATH'/'$FILE_NAME $DEST_PATH'/'$FILE_NAME
END_SCRIPT
==================================================================


Kindly note this script will only work if FTP port is opened for both source and destination server.
One can easily check by login to putty and check by using ftp command if he can able to connect to ftp server.

command:
ftp xxcust.host.com

it will ask for username
Name : ftpuser
331 Please specify the password.
Password:ftp1234
230 Login successful.




How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>

 How to resolve issue for BIP RTF template XML tags showing value as <?ref: 0000xx?>  Sometime these xml data tags automatically chang...