Concurrent program with executable of type HOST
Hi,
I am having 11.5.10.2 on Red Hat Linux AS 4 . I have created a shell script and I wanted it to run as a concurrent program.For that I created executable of type HOST and created one concurrent program and added it to one request group.
This works fine. Concurrent program runs successfully.
Then I used command line parameter in script. This parameter was added in respective concurrent program. But the parameter is passed as $1 as part of the
the other standard parameters. So I have to extract my parameter from $1.
My question is how to use parameters in 11.5.10.2 release ?
Is there any solution so that we don't have to process $1 and extract user parameter? Can we pass the user parameter as $2 , $3 etc. ?
Hi Hsawwan,
Yeah I have already seen this document. It is not applicable to 11.5.10.2 because till 11.5.9 the $1 to $8 parameter were passed as standard parameters and user parameter was to be passed on as $9 onwards. This is fine.
But I have seen that in 11.5.10.2 all the standard parameters are passed in $1 itself concatenated along with the user parameters. So we have to extract user parameter. Is there any better solution. ?
Thanks .
Sagar.
Similar Messages
-
Create Host Concurrent Program with parameters
Hi All,
I have created a host concurrent program in Oracle APPS with one parameter. My shell script in unix is this :
cd $1
mv _oracle.txt Especificacion.txt
it is in $AC_TOP/bin directory.
When I execute the host concurrent program with oracle APPS with one parameters that is the path that I want to send it to shell script this error occurs.
/hogr-949-000/oracle/prodappl/ac/11.5.0/bin/xx_opm_cambio_nomarch_iweb: cd: bad argument count
mv: cannot rename _oracle.txt to Especificacion.txt:
No such file or directory
/hogr-949-000/oracle/prodappl/ac/11.5.0/bin/xx_opm_cambio_nomarch_iweb
Program exited with status 1
I have read many papers in metalink and I understand that at first parameter it includes many details programs such as, user id, concurrent program name, etc etc, and not only the value that I want to send.
So I know the problem, but my question is, how can I resolve it ?. I'm not a unix expert.
Please,
Thanks in advance
Mariano.-It doesn't work. But I finally find the solution. The point is this...
p1=`echo $1|cut -f9 -d " "|cut -f2 -d '"'`
In f1, f2, f3, etc you receive the information of the concurrent, and in f9 receive the first value of your parameter that you create in de concurrent program.
Regards,
Mariano.- -
Can we schedule a concurrent program with in a request set
HI,
I have a requirement that to schedule a concurrent program in a request set after completing the another request with in the set
ie i have request set with two concurrent programs and each concurrent program having two parameters for each
if i submit the request set once
the first programs completes successfully after completing the first program i need to schedule the second concurrent program with the same parameter values of the first parameter
is it possible if yes how it can be done
Regards
DRKRipendra durgam wrote:
HI,
I have a requirement that to schedule a concurrent program in a request set after completing the another request with in the set
ie i have request set with two concurrent programs and each concurrent program having two parameters for each
if i submit the request set once
the first programs completes successfully after completing the first program i need to schedule the second concurrent program with the same parameter values of the first parameter
is it possible if yes how it can be done
Regards
DRKI believe it is not possible.
Thanks,
Hussein -
Sqlloader concurrent program with multiple data files
I have a concurrent program with datafile_path/datafile_name as an input parameter registered for an Sql loader (ctl) program. My requirement is to add one more datafile_name to the control file. In that case what should be the syntax in control file? And can I just add one more datafile name to the concurrent program input? Will it pick from the control file.
My current syntax is as follows in my .ctl file:
LOAD DATA
INFILE *
APPEND
INTO TABLE <table_name>
abc_id SEQUENCE(MAX,1),
abc_type CONSTANT 'CONSTANT_VALUE',
Thanks,I have a concurrent program with datafile_path/datafile_name as an input parameter registered for an Sql loader (ctl) program. My requirement is to add one more datafile_name to the control file. In that case what should be the syntax in control file? And can I just add one more datafile name to the concurrent program input? Will it pick from the control file.
My current syntax is as follows in my .ctl file:
LOAD DATA
INFILE *
APPEND
INTO TABLE <table_name>
abc_id SEQUENCE(MAX,1),
abc_type CONSTANT 'CONSTANT_VALUE',
Thanks, -
Concurrent Program not executing
Hi All,
I have created new custom concurrent program of type SQL*Plus to purge the data. To my surprize when I submit the program, program is not getting executed, which I can confirm saying the data is not getting deleted. Also the log messages mentioned script is also not displayed in the LOG.
No debug message is displayed in neither LOG nor OUTPUT.
Executable File Name is correctly given and taken care of all other mandatory stuff while registration.
Bleow the script:
I am passing Number of Days ( 500 ) as parameter to this program.
So here &1 = 500:
DECLARE
L_deleted_rec_cnt NUMBER;
BEGIN
fnd_file.put_line ( fnd_file.LOG, ' Conc Program Starts');
DELETE
FROM xxX_TABLE_NAME
WHERE TRUNC (creation_date) < TRUNC (SYSDATE- &1);
L_deleted_rec_cnt := SQL%ROWCOUNT;
IF L_deleted_rec_cnt > 0 THEN
COMMIT;
fnd_file.put_line ( fnd_file.LOG, L_deleted_rec_cnt||' Records purged');
ELSE
fnd_file.put_line ( fnd_file.LOG, ' No Records to purge');
END IF;
fnd_file.put_line ( fnd_file.OUTPUT, ' Conc Program End');
EXCEPTION
WHEN OTHERS THEN
fnd_file.put_line (fnd_file.LOG, 'Error in purging '||SQLCODE||' '||SQLERRM);
END;
Please advise.
Regards,
RamIt is 11i and the LOG is showing as Concurrent Program executed succesfully. THere is not error reported in the LOG.
And also nothing writter to OUT file also.
Content in LOG file:
XXXX Customer Advocacy: Version : 1.0 - Development
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
XXCC module: XXXX Error Log Purge
Current system time is 28-DEC-2009 04:55:46
+-----------------------------
| Starting concurrent program execution...
+-----------------------------
Arguments
450
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
------------- 1) PRINT -------------
Printing output file.
Request ID : 52374634
Number of copies : 0
Printer : noprint
Finished executing request completion options.
Concurrent request completed successfully
Current system time is 28-DEC-2009 04:55:47
Content in Out FIle:
Input truncated to 2 characters
Regards,
Ram -
How to call a concurrent program with some parameters in a stored procedure
Hi All,
I have made two procedures, xx_nidhi_proc1 and xx_nidhi_proc2.
xx_nidhi_proc1 takes four parameters from front end and is registered as concurrent program in oracle apps and running fine alone.
xx_nidhi_proc2 calls the concurrent program of xx_nidhi_proc1 which is XX_NIDS_PROC1_PROG1.
But the problem in my code is , It runs the second concurrent program for xx_nidhi_proc2 but shows the Inactive- No Manager status for my first concurrent program XX_NIDS_PROC1_PROG1,
Please find out the error in my code...
CREATE OR REPLACE PACKAGE BODY NIDHI IS
procedure xx_nidhi_proc1 (errbuf OUT VARCHAR2,
retcode OUT VARCHAR2,
name_t varchar2,
empno varchar2,
doj date,
desig varchar2) is
begin
fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
fnd_file.PUT_LINE(Fnd_File.output, 'Name:'||name_t);
fnd_file.PUT_LINE(Fnd_File.output, 'Number:'||empno);
fnd_file.PUT_LINE(Fnd_File.output, 'DOJ:'|| to_char(doj, 'DD-MON-RRRR'));
fnd_file.PUT_LINE(Fnd_File.output, 'Designation:'||desig);
fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
errbuf:='SUCCESS';
retcode:='SUCCESS';
end xx_nidhi_proc1;
--calls the xx_nidhi_proc1 as concurrent program.
procedure xx_nidhi_proc21 (errbuf OUT VARCHAR2,
retcode OUT VARCHAR2)
is
v_request_id number;
begin
fnd_file.PUT_LINE(Fnd_File.output,'/**************Start of the output **********/');
fnd_file.PUT_LINE(Fnd_File.output, 'Deptartment Number:'||'Computer');
fnd_file.PUT_LINE(Fnd_File.output, 'Location:'||'TCS Towers');
fnd_file.PUT_LINE(fnd_file.output,'Starting XX_NIDS_PROC1_PROG1');
fnd_global.apps_initialize(user_id => 1318 ,resp_id => 50578, resp_appl_id => 201);
v_request_id := FND_REQUEST.SUBMIT_REQUEST('PO',
'XX_NIDS_PROC1_PROG1',
null,
null,
TRUE,
'Nidhi gupta',
138609,
'12-Dec-2003',
'ASE');
commit;
fnd_file.PUT_LINE(fnd_file.OUTPUT,'Request ID is '||to_char(v_request_id));
fnd_file.PUT_LINE(fnd_file.OUTPUT,'End XX_NIDS_PROC1_PROG1');
fnd_file.PUT_LINE(Fnd_File.output,'/**************End of the output **********/');
errbuf:='SUCCESS';
retcode:='SUCCESS';
end xx_nidhi_proc21;
Thanks
Nidhi
END NIDHI;Nidhi this might help u
v_num_request_load_id :=
fnd_request.submit_request (c_chr_application_short_name,
c_chr_apl_short_name,
NULL,
NULL,
FALSE,
p_chr_allocation_view,
p_chr_flow_type,
p_chr_operating_unit,
p_dte_planned_from,
p_dte_planned_to,
p_num_application_id,
p_num_loc_seg1_id,
p_num_loc_seg2_id,
p_num_organization_id,
p_num_responsibility_id,
p_num_session_id,
p_num_user_id,
p_chr_arrival_status,
p_chr_statuses,
p_chr_locations,
p_chr_transport_unit
COMMIT;
IF v_num_request_load_id = 0
THEN
o_num_stat := 2;
o_chr_err_msg := 'Report could not be submitted';
END IF;
o_chr_err_msg := 'Request Id :' || v_num_request_load_id;
v_boo_wait :=
fnd_concurrent.wait_for_request (v_num_request_load_id,
c_num_interval,
c_num_max_wait,
v_chr_phase,
v_chr_status,
v_chr_dev_phase,
v_chr_dev_status,
v_chr_err_buf
IF v_chr_dev_phase = 'COMPLETE' /* 1.1 */
THEN
IF v_chr_dev_status = 'NORMAL' /* 1.2 */
THEN
BEGIN
-- some your own logic
EXCEPTION
WHEN OTHERS THEN
o_chr_err_msg := o_chr_err_msg||' Unable to determine Report File Path.';
o_num_stat := 2;
END;
ELSIF v_chr_dev_status = 'WARNING' /* 1.2 */
THEN
o_chr_err_msg := o_chr_err_msg||' Report program completed with Warning.';
ELSE /* 1.2 */
o_chr_err_msg := o_chr_err_msg||' Report program completed with Error.';
END IF; /* 1.2 */
ELSE /* 1.1 */
o_chr_err_msg := 'Report program Timed Out.';
END IF; /* 1.1 */ -
Connecting a Local Java Program with a Mysql Database Hosted on the Interne
I need help. I want to connect a java program running on local user computers to read and write to a mysql database hosted in my domain by an internet service provider.
What code do i use?
How do i connect?http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html
You'll ned to downloda the JDBC driver file from MySQL, and check their docs for the format of the connection URL. -
Problem with .prog file and host Executable type
Hi All,
Please help as m stuck in some issue. Its related to Unix shell scrip FTP program registered to apps.
Requirement – Inbound program will run. It’s a request set. Last program in the set is FTP program that will MOVE the data file to archive folder.
Steps used by me are as below. Plz suggest if m doing anything wrong.
1) Wrote the FTP scrip as below
#default parameters for host concurrent program
shellnm=$0 #-Shell script name
usernmpw=$1 #- Oracle username/password
userid=$2 #- User_id
ora_user=$3 # - Oracle Applications username
cnreqid=$4 #- Concurrent request id
#Move the Data file to archive
mv -f/apps/prodappl/xxics/11.5.0/bin/inbound/po_file/ICS_PO_IMP.csv /apps/prodappl/xxics/11.5.0/bin/inbound/po_file/backup/ICS_PO_IMP"_"`date +%F``date +%R`".csv"
2) Saved it in notepad in .PROG file type. Then keep it in apps BIN directory.
3) Register it with apps as HOST executable program name.
4) Then created the concurrent program and added to request set.
5) While running the request set the FTP program is errored out.
Plz suggest if I am missing anything………
Thanks,
SamirSamir,
5) While running the request set the FTP program is errored out.What is the error?
Plz suggest if I am missing anything………Please see if these documents help.
Note: 156636.1 - How to Register a Host Concurrent Program in Applications
Note: 266268.1 - How To Create a Custom Concurrent program with Host Method and Pass Parameters to the shell script
Regards,
Hussein -
Concurrnet Program of Executable type Host
Hi All,
I am facing some problems with Oracle Concurrent Programs whose executable type is 'Host'.
The program is completing normal but not processing anything, it not even printing proper logs and even going in to shell script written in .prog file.
Is it because, i had modified the .prog file and recreated the soft link??
Can you please help.
Thanks,
SHi,
Please mention the application release and the OS.
Have you completed all the steps in these documents?
Note: 156636.1 - How to Register a Host Concurrent Program in Applications
Note: 266268.1 - How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script
Note: 170878.1 - How to Register a Host Concurrent Program for NT
Thanks,
Hussein -
Can we use Template(Rtf) to all Concurrent Program Type.other than Reports
Hi Frs,
i have created Concurrent program with Method as SQL*plus and output type as XML. but when i run the Report i get output has Text Format.
not getting XMl File.
i need to setup rtf for this Concurrent Program.
How to Get it.
whether it is possible to setup RTF for concurrent Program with method as SQL*plus or RTF is only supported for Method Report.
pls help
Message was edited by:
Badsha
Message was edited by:
BadshaI don think, this way you can get xml output,..
"i have created Concurrent program with Method as SQL*plus and output type as XML. but when i run the Report i get output has Text Format.
not getting XMl File."
use, the same query in datatemplate , and use the seeded XDO executable as the executable.
first get the xml out from Conc Pgm, then we can design the RTF and assign to it -
SQL*Loader-128: Error in Concurrent program of type SQL* Loader
Hi,
Am facing below error with CP of SQL*Loader execution format. Both Control and data files are placed under bin directory under CUSTOM TOP.
CP doesnt have any parameter. I believe we dont need to pass login details to a CP. So how can we default the DB Login to SQL Loader in CP?
Appreciate your quick help.
SQL*Loader-128: unable to begin a session
ORA-01017: invalid username/password; logon denied
SQL*Loader: Release 10.1.0.5.0 - Production on Wed Dec 14 02:03:59 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-01017: invalid username/password; logon denied
Program exited with status 1
Concurrent Manager encountered an error while running SQL*Loader for your concurrent request 1040692.
Review your concurrent request log file for more detailed information.
Here the Control and Data file for the same.
Control file:
LOAD DATA
INFILE 'XXX_Customer_Master.dat'
BADFILE 'Customer_bad.bad'
DISCARDFILE 'Customer_discard.bsc'
APPEND
INTO TABLE XXX_AR_CUSTOMERS_INT FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
ORIG_SYSTEM_PARENT_REF ,
ORIG_SYSTEM_CUSTOMER_REF,
CUSTOMER_NAME,
CUSTOMER_NAME_PHONETIC,
COUNTRY,
STATE,
CITY,
ADDRESS1,
POSTAL_CODE,
RECORD_NUMBER SEQUENCE(MAX, 1),
CREATED_BY CONSTANT -1,
CREATION_DATE CONSTANT SYSDATE,
CUSTOMER_TYPE CONSTANT 'R',
INSERT_UPDATE_FLAG CONSTANT 'I',
LAST_UPDATE_DATE CONSTANT SYSDATE,
LAST_UPDATE_LOGIN CONSTANT -1,
LAST_UPDATED_BY CONSTANT -1,
ORG_ID CONSTANT 102,
PRIMARY_SITE_USE_FLAG CONSTANT 'Y',
SITE_USE_CODE CONSTANT 'BILL_TO'
*Data file:*
'XXX_Customer_Master.dat'
50|792086|Test Customer |Test Customer |759843055|Australia|VIC|MELBOURNE|"Level 4 457 St Kilda Road"|3004
59|792232|Test Customer |Test Customer |751756404|Australia|ACT|Tuggeranong|PO Box 1035|2901Do we have to create soft link like we create for host program directory ?How to Register a Host Concurrent Program in Applications [ID 156636.1]
How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script [ID 266268.1]
How To Setup A Custom Concurrent Host Program [ID 147455.1]
Also, please see (How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]).
Thanks,
Hussein -
Changing concurrent program,executable short names
hi,
i created one report and registered in apps, with some executable short name and concurrent program short name.
now i want to create a new program with the same short names, and no need of the first report.
how can i do it?
can anybody plz give any clue.
with regards
kiranYou can not have two concurrent programs with the same short name but you probably already know that from trying it. Since you need a new program with the same short name and you don't need the old program, simply rename the program and description of your existing program. You will have to change the executable to point to the code of your new program.
-
Help with Defining a new Concurrent Program using Parameters
I wrote a very simple sql script and I want to register it as an Oracle Concurrent Program. I included a parameter field in the sql script to allow the entry of value to determine the number of days prior for the script. The script runs successfully in SQL*Plus, but when I try to register it as an Oracle Concurrent Program I get the following errors below:
This works in SQL* PLUS
SELECT emp_id, amount
FROM tblSalaries
WHERE hire_date > SYSDATE-&Days;
Enter value for Days: 7
old 3: hire_date > SYSDATE-&Days
new 3: hire_date > SYSDATE-7
And it provides my results....Although when I register this as a concurrent program and assign the parameter in the setup, and run the concurrent program and enter the number in the parameter field, the job completes in ERROR with the following:
Enter value for Days: EXEC FND_CONC_STAT.COLLECT;
hire_date > SYSDATE-EXEC FND_CONC_STAT.COLLECT; and
ERROR at line 3:
ORA-00933: SQL command not properly ended If I put single quotes around '&Days', in line 3, I get a different error:
ERROR at line 3:
ORA-01722: invalid number Do you know what could be the problem?
Thanks for reviewing!Duplicate post - Setup for Defined Concurrent Program with Parameters - SQL Script
Srini -
Running 11.5.10.2 on Linux
I have a .ctl file written for my linux environment but I am having trouble with the following.
Properly configuring the concurrent program executable. Is there documentation on this setup? I have looked through OTN, MetaLink and the database utils guide, but no luck.
How do you pass the variable of the control file to sqlldr using the executable/concurrent program approach?
How do you pass the variable of the username/password and database to sqlldr using the executable/concurrent program approach?
my sqlldr script is listed below. All other activity takes place in the .ctl file and this is working good.
sqlldr apps/password@dev control='/sea/apps/dev/ora/8.0.6/rates.ctl'Please see these docs.
11i FND:How to specify Record Terminator In Sql*Loader type of concurrent program [ID 252850.1]
How to Register a Host Concurrent Program in Applications [ID 156636.1]
How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script [ID 266268.1
How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]
Is there a Method for Returning a 'Warning' Status from Host Language Concurrent Program? [ID 866194.1]
Use Encrypt To Prevent Apps Pwd Being Displayed In Log/Sql Script [ID 377858.1]
Thanks,
Hussein -
Hi ,
I need to FTP the concurrent program Pdf output to a server. Please let me know if this can be done.
Thanks
GeethaI have just finished with something similar and used the following code just for the FTP, I created an executable of type host that used this file and it sends the FTP:
>
# +====================================================================+
# | $Revision: 1.0 $ |
# +====================================================================+
# | Customization Code: CUST466 |
# | name : XXFTP |
# | create by : Hilton Meyer |
# | Creation Date : 17/02/2011 |
# +====================================================================+
# | Process : put a file with FTP |
# | Retrun Status : 1 - failed building process |
# | : 0 - Success |
# | Depend On : |
# +====================================================================+
# | to register please do : |
# | ln -s $FND_TOP/bin/fndcpesr XXFTP |
# +====================================================================+
# | Parameters |
# | P_SERVER - IP Address |
# | P_USER - User |
# | P_PASSWORD - Password |
# | P_FOLDER - Folder |
# | P_FILENAME - File Name |
# +====================================================================+
# | Change History : |
# | |
# | Vers Author Date Description |
# | 1.0 Hilton Meyer 17/02/2011 initial Build |
# +====================================================================+
export P_SERVER=$7
export P_USER=$8
export P_PASSWORD=$9
export P_FOLDER=$10
export P_FILENAME=$11
echo "+===========================================================+"
echo "| Date Of Running : "`date +%B-%d`" |"
echo "+===========================================================+"
echo "|Parameters "
echo "|P_SERVER : $P_SERVER "
echo "|P_USER : $P_USER "
echo "|P_PASSWORD : $P_PASSWORD "
echo "|P_FOLDER : $P_FOLDER "
echo "|P_FILENAME : $P_FILENAME "
echo "+===========================================================+"
echo "Copy file"
echo "============================================================="
cd /share/folder
ftp -i -n $P_SERVER << EOF
user $P_USER $P_PASSWORD
pwd
put $P_FILENAME
ls -l
bye
EOF
echo "*** End ***"
Maybe you are looking for
-
Advice on External HDD for Mac & Windows
Hello I am looking for advice regarding using a external HHD for Mac & Windows. I searched the forum, but failed to find a updated thread on this subject matter. I will be using the drive on both platforms regularly. Should i use HFS+ with a small FA
-
My iPhone 4s keeps randomly prompting me for my iCloud password
I keep just getting random prompts for my icloud password the last 1.5 weeks yet it is in settings, anyone else
-
Update n80 v5.0719.0.2
where do i get the update for my n80
-
[***Solved***] Hal
Cannot obtain lock on /media/.hal-mtab I tried today my camera docking station. It was working fine before and now I get this error. I tried my USB Stick and got the same error. any ideas for a work around or fix this problem? Last edited by JaDa (20
-
I have sky+ hd connected to my tv via hdmi cable. The sound is fine with all channels except for all sky channels I don't have any sound even the picture fine. Any idea. Thanks for help