Home » Applications » Oracle Fusion Apps & E-Business Suite » Concurrent Program fails with DATE_STANDARD value set (E-BUSINESS SUITE 11.5.10.2)
icon4.gif  Concurrent Program fails with DATE_STANDARD value set [message #537466] Wed, 28 December 2011 10:06 Go to next message
gliddenc
Messages: 5
Registered: December 2011
Junior Member
Hello,
I am having trouble with a concurrent program that is using the 'DATE_STANDARD' value set.

The concurrent program executes a unix script. This script uses CONCSUB to run another concurrent program. The output file of the 2nd concurrent program is then sent via ftp to an outside entity. The original concurrent program has worked for years until we upgraded our E-Business Suite to 11.5.10.2. The upgrade forced us to use the new 'DATE_STANDARD' value set. The application will not allow me to use another DATE value set.

What happens now that the new 'DATE_STANDARD' value set has been assigned is as follows:
* User runs the original concurrent program from E-Business Suite. They enter a date range for parameters. e.g.(START_DATE '22-DEC-2011'; END_DATE '22-DEC-2011')
* The unix script is run. It executed the 2nd concurrent program. The program fails. When looking at the log, I see that a Timestamp has been added to the entered Parameter Dates.

If completed normally, I expect to see:
Arguments
------------
P_START_CHECK_DATE='27-Dec-2011'
P_END_CHECK_DATE='27-Dec-2011'
P_RESELECT_FLAG='Y'
------------

The log details now read:
Arguments
------------
P_START_CHECK_DATE='2011/12/22'
P_END_CHECK_DATE='00:00:00'
P_RESELECT_FLAG='2011/12/22'
='00:00:00'
='Y'
------------

So, when the program is submitted to Concsub, the timestamp is added. Unix assumes that the timestamp is the second parameter instead of being part of the first parameter. This is because it uses the space between as a field separator. I have tried everything to try to make Unix ignore the Timestamp or to cut it before submission to Concsub. Nothing has worked.

How can I resolve this problem in the E-Business Suite or in Unix?

I welcome any help.
Thanks,
Corey
Re: Concurrent Program fails with DATE_STANDARD value set [message #537473 is a reply to message #537466] Wed, 28 December 2011 14:39 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
The conversion of date happens in all kind of executables.
The code has to be tweaked in the executable only.
Only you enter date as '27-Dec-2011' and submit the concurrent program it in turns changes to the default format "YYYY/MM/DD HH24:MI:SS".
As your unix script is reading the time stamp as second parameter, try to ignore it.
You may read it as second parameter only and append to the first parameter before passing to any other function.
What is the code you are using to call CONCSUB?

By
Vamsi
Re: Concurrent Program fails with DATE_STANDARD value set [message #537476 is a reply to message #537473] Wed, 28 December 2011 15:07 Go to previous messageGo to next message
gliddenc
Messages: 5
Registered: December 2011
Junior Member
I have tried to different ways to isolate the date and/or remove the timestamp. I am not sure where in the script the commands to do that should execute. Here is the portion of the script that calls CONCSUB:
# NOTE ON VARIABLES:  6 variables will be passed into this script
#       from LASR.  These variables are $0-$6 respectively.
# $0 - Shellscript name
# $1 - Oracle username/password
# $2 - User_id
# $3 - LASR(Oracle Applications) username
# $4 - Concurrent request id
# $5 - Parameter 1 (start date)
# $6 - Parameter 2 (end date)

# Send output to the log file
echo ---------------------
echo 'Program arguments: '
echo ---------------------
echo 'SDATE := '$5 >> `echo $lfil`
echo 'EDATE := '$6 >> `echo $lfil`

# Change directory to LASR output directory
cd $LASR_OUT

# Initiate CONCSUB
# The awk section of code is used to find the file
# name of the recently submitted file.  CONCSUB
# returns a message "Submitted Request x" where
# 'x' is the request id.  This request is
# appended to the fdx string and '.out' is
# appended to that to create the output file name
# that is send to National City.

RID=`CONCSUB $1 \
SQLAP \
"OAKLAND AP LOL USER" \
$USER_NAME \
WAIT=Y \
CONCURRENT \
LC \
LCAPXPOS \
PROGRAM_NAME='"Positive Pay Report for LASR"' \
IMPLICIT="YES" \
'""' '""' '""' '""' '""' '""' $5 $6 Y \
| /usr/xpg4/bin/awk '/Submitted/{print $3}'`


Thanks,
Corey
Re: Concurrent Program fails with DATE_STANDARD value set [message #537480 is a reply to message #537476] Wed, 28 December 2011 17:00 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
This is rather an UNIX question than Oracle apps.
By the way, Welcome to the Forum.
Please read the Forum Guide.Quote:
I have tried to different ways to isolate the date and/or remove the timestamp.
What are they?

Why can't you have your own variables to capture the extra time segment.
(Or)
Consider them as 8 inputs. Use 5th and 7th as dates to call the next command.

By
Vamsi
Re: Concurrent Program fails with DATE_STANDARD value set [message #537592 is a reply to message #537480] Thu, 29 December 2011 11:10 Go to previous messageGo to next message
gliddenc
Messages: 5
Registered: December 2011
Junior Member
Sorry about that. I wasn't sure where to post. Since Oracle Applications force you to use the new value set and the value set appends the 'OO:OO:OO' timestamp after the program is submitted to run, I assumed that this was the proper place to post. I can move this to the Unix area instead.

I have tried to add extra parameters and the result is the same.

I have added:
# $5 - Parameter 1 (start date)
# $6 - Parameter 2 (timestamp)
# $7 - Parameter 3 (end date)
# $8 - Parameter 4 (timestamp)


I still get this in the logs:
Original Concurrent Program (one that executes the script):
---------------------
Program arguments: 
---------------------
SDATE := 2011/12/22 00:00:00
EDATE := 2011/12/22 00:00:00

So, the timestamp is still not split off from the date there.

In the Concurrent Program run by CONCSUB:
Arguments
------------
P_START_CHECK_DATE='2011/12/22'
P_END_CHECK_DATE='00:00:00'
P_RESELECT_FLAG='Y'
------------

This program accepts the first Date and use its timestamp as the second parameter. I have changed the CONCSUB statement to accept $5 and $7 as parameters. It didn't treat the incoming parameters the way I thought. I welcome any ideas.

Thanks,
Corey

Re: Concurrent Program fails with DATE_STANDARD value set [message #537612 is a reply to message #537592] Thu, 29 December 2011 13:22 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Did you really changed that in all the places like below?
# NOTE ON VARIABLES:  6 variables will be passed into this script
#       from LASR.  These variables are $0-$6 respectively.
# $0 - Shellscript name
# $1 - Oracle username/password
# $2 - User_id
# $3 - LASR(Oracle Applications) username
# $4 - Concurrent request id
# $5 - Parameter 1 (start date)
# $6 - Parameter 2 (timestamp)
# $7 - Parameter 3 (end date)
# $8 - Parameter 4 (timestamp)

# Send output to the log file
echo ---------------------
echo 'Program arguments: '
echo ---------------------
echo 'SDATE := '$5 >> `echo $lfil`
echo 'EDATE := '$7 >> `echo $lfil`

# Change directory to LASR output directory
cd $LASR_OUT

# Initiate CONCSUB
# The awk section of code is used to find the file
# name of the recently submitted file.  CONCSUB
# returns a message "Submitted Request x" where
# 'x' is the request id.  This request is
# appended to the fdx string and '.out' is
# appended to that to create the output file name
# that is send to National City.

RID=`CONCSUB $1 \
SQLAP \
"OAKLAND AP LOL USER" \
$USER_NAME \
WAIT=Y \
CONCURRENT \
LC \
LCAPXPOS \
PROGRAM_NAME='"Positive Pay Report for LASR"' \
IMPLICIT="YES" \
'""' '""' '""' '""' '""' '""' $5 $7 Y \
| /usr/xpg4/bin/awk '/Submitted/{print $3}'`
I'm not clear on few things.
Why the numbering has started from $0 ?
From where the following variables are getting the values?
$LASR_OUT
$USER_NAME

Anyway, I'm moving this to UNIX forum, so that you may get more details.

By
Vamsi
Re: Concurrent Program fails with DATE_STANDARD value set [message #537617 is a reply to message #537612] Thu, 29 December 2011 14:14 Go to previous messageGo to next message
gliddenc
Messages: 5
Registered: December 2011
Junior Member
I did make all of the changes. Your code below looks just like mine. The variables $LASR_OUT and $USER_NAME are hardcoded above. These are the hardcoded output directory and the Oracle Applications(OA) Username. The comment section starting "# NOTE ON VARIABLES: " comes from a MetaLink note about running concurrent programs from Oracle Applications. The fndcpesr program parses the parameters that are being passed into the script from OA. This is why the numbering starts at $0.

In case I forgot to mention it, this program is not new. This program has worked since 2003 before Oracle required the use of the DATE_STANDARD value sets.

Thanks for moving the topic to the proper section.

Corey
Re: Concurrent Program fails with DATE_STANDARD value set [message #537744 is a reply to message #537617] Fri, 30 December 2011 14:30 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Looks like someone has pushed it back to this forum.
You may need to give me more details with debug messages and the output / log for both the CP's.
Try to print the values for 5 to 8 wherever it is possible.

By
Vamsi
Re: Concurrent Program fails with DATE_STANDARD value set [message #539388 is a reply to message #537744] Sat, 14 January 2012 11:23 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
I could see similar post in OTN.
https://forums.oracle.com/forums/thread.jspa?messageID=10068181&tstart=0
I think it is you only. Still don't see that you have used 7 and 8.
If at all you have tried it, please post the code again.

By
Vamsi
Re: Concurrent Program fails with DATE_STANDARD value set [message #539432 is a reply to message #539388] Sun, 15 January 2012 14:57 Go to previous message
gliddenc
Messages: 5
Registered: December 2011
Junior Member
Hi Vamsi,
The link that you sent is mine. I did try to use $7 and $8 without success.
I have solved my problem. I figured out how to cut the timestamp away from the parameter.
For others that are having the problem, this is my code BEFORE:
# NOTE ON VARIABLES: 6 variables will be passed into this script
# from LASR. These variables are $0-$6 respectively.
# $0 - Shellscript name
# $1 - Oracle username/password
# $2 - User_id
# $3 - LASR(Oracle Applications) username
# $4 - Concurrent request id
# $5 - Parameter 1 (start date)
# $6 - Parameter 2 (end date)

# Send output to the log file
echo
--------------------------------------------------------------------------------
 echo 'Program arguments: '
echo
--------------------------------------------------------------------------------
 echo '$5 := '$5 >> `echo $lfil`
echo '$6 := '$6 >> `echo $lfil`

# Change directory to LASR output directory
cd $LASR_OUT

# Initiate CONCSUB
# The awk section of code is used to find the file
# name of the recently submitted file. CONCSUB
# returns a message "Submitted Request x" where
# 'x' is the request id. This request is
# appended to the fdx string and '.out' is
# appended to that to create the output file name
# that is send to National City.

RID=`CONCSUB $1 \
SQLAP \
"OAKLAND AP LOL USER" \
$USER_NAME \
WAIT=Y \
CONCURRENT \
LC \
LCAPXPOS \
PROGRAM_NAME='"Positive Pay Report for LASR"' \
IMPLICIT="YES" \
'""' '""' '""' '""' '""' '""' $5 $6 Y \
| /usr/xpg4/bin/awk '/Submitted/{print $3}'`


This code, because of the new valueset and the way Oracle passes in the timestamp causes $5 = STARTDATE and $6 = TIMESTAMP instead of ENDDATE

This is the current working code:

# NOTE ON VARIABLES: 6 variables will be passed into this script
# from LASR. These variables are $0-$6 respectively.
# $0 - Shellscript name
# $1 - Oracle username/password
# $2 - User_id
# $3 - LASR(Oracle Applications) username
# $4 - Concurrent request id
# $5 - Parameter 1 (start date)
# $6 - Parameter 2 (end date)

# Modify the incoming parameter (date+timestamp)
# Set the incoming parameter to our variable
SDATE=$5
EDATE=$6

# Remove the timestamp from the parameter
echo 'Cutting now...'
SDATE="`echo $SDATE | cut -c1-11`"
EDATE="`echo $EDATE | cut -c1-11`"

# Send output to the log file
echo
--------------------------------------------------------------------------------
 echo 'Program arguments: '
echo
--------------------------------------------------------------------------------
 echo 'SDATE := '$SDATE >> `echo $lfil`
echo 'EDATE := '$EDATE >> `echo $lfil`

# Change directory to LASR output directory
cd $LASR_OUT

# Initiate CONCSUB
# The awk section of code is used to find the file
# name of the recently submitted file. CONCSUB
# returns a message "Submitted Request x" where
# 'x' is the request id. This request is
# appended to the fdx string and '.out' is
# appended to that to create the output file name
# that is send to National City.

RID=`CONCSUB $1 \
SQLAP \
"OAKLAND AP LOL USER" \
$USER_NAME \
WAIT=Y \
CONCURRENT \
LC \
LCAPXPOS \
PROGRAM_NAME='"Positive Pay Report for LASR"' \
IMPLICIT="YES" \
'""' '""' '""' '""' '""' '""' $SDATE $EDATE Y \
| /usr/xpg4/bin/awk '/Submitted/{print $3}'`


I appreciate all of the advice that you gave. I couldn't have figured this out without it.

Thanks,
Corey



Previous Topic: forms personalisation
Next Topic: Please correct the cash account assignment in AR_RECEIPT_API_PUB.Create_Apply_on_acc
Goto Forum:
  


Current Time: Mon Dec 23 08:59:35 CST 2024