In the EBS development process, you sometimes need to call host files through concurrent requests, such as FTP file transmission and transmission. The process of defining Host-Based Concurrent requests is as follows:
1. Define the execution method as: Concurrent executable of the host
2. Define concurrencyProgram(Parameters can be defined)
3. Compile a shell script file, for example, ftp_test.prog. Note: If the suffix is prog, whether it must be prog has not been studied.
4. Upload ftp_test.prog to $ cux_top/bin /.
5. Add the executable permission chmod 777 ftp_test.prog,
Create a connection ln-S $ fnd_top/bin/fndcpesr $ cux_top/bin/ftp_test
In this way, the ftp_test script can accept the parameters passed in by concurrent requests.
The first four parameters are accepted by the system. If you want to add the parameters
Ora_user_pass = $1
Userid = $2
Username = $3
Requestid = $4
$4 is the parameter passed in by the host concurrent program.
6. An example of FTP file transfer is provided.
#! /Bin/KSh
######################################## ###################################
# Shell Name: ftp_test.prog
# Parameters: None
# Purpose this shell put the created files to FTP Server
#
######################################## ###################################
Ora_user_pass = $1
Userid = $2
Username = 3 $
Requestid = $4
Ftpdir = $5
Lcldir = $6
Filename = $7
Echo $ ftpdir
Echo $ lcldir
Echo $ filename
Status = 'ftp-N 192.168.1.1 <!
Quote user oracle
Quote pass Oracle
ASCII
CD $ ftpdir
Prompt
LCD $ lcldir
Mput $ filename
Quit
! '
# If [$ {# status}-GT 0]
If [$? ! = 0]
Then
Echo "$ {status }"
Echo ""
Exit 1
Fi