Batch file execution using user defined activity
Can anyone please explain me what is the structure of the user defined activity in order to execute batch file. I've read like 10 post about this problem in this forum but nothing seems to work. So to finally clear it out...
I have simple batch file d:\test_dir\test.bat that has only one line in it "echo this is test>>test.txt"
what should i put in the user defined activity setting?
COMMAND = ?
PARAMETER_LIST = ?
RESULT_CODE = ?
SCRIPT = ?
SUCCESS_THRESHOLD = ?
i have the setting in the runtime.properties file to:
property.RuntimePlatform.0.NativeExecution.FTP.security_constraint = DISABLED
property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
property.RuntimePlatform.0.NativeExecution.SQLPlus.security_constraint = NATIVE_JAVA
property.RuntimePlatform.0.NativeExecution.OMBPlus.security_constraint = DISABLED
Did you read this blog?
https://blogs.oracle.com/warehousebuilder/entry/how_to_use_user_defined_activity_in_owb_process_flow
What error do you get? Did you stop/start the runtime service after changing the parameter file?
Cheers
David
Similar Messages
-
User Defined Activity Process Flow Help
Hello,
I'm trying to create a process flow that will rename a file. I'm using the User Defined Activity, but I've ran into a couple problems. First some background info, Oracle 10G is the DB, and it's ran on a Unix system, the Oracle user account does have read/write access to the directories used.
For the Activity Parameters I've set
Command > I've tried everything here
Parameter > Blank
Script >
filefullname=ip_xref.dat
filename=${filefullname%.*}
fileext=${filefullname##*.}
DATE=`date +%Y%m%d`
newfilename="${filename}_${DATE}.${fileext}"
mv $filefullname $newfilename
mv $newfilename backup/
in the command section, I've tried every possible thing I can think of from : /usr/bin/ksh, /bin/ksh, ksh, /bin/bash, made a script outside owb with the same thing, and pointed it at that and still all I get is "/bin/bash: not found" or "/usr/bin/ksh: not found"
Ideas/suggestions, I'm open to anything.
As a side note I tried to do it with UTL_FILE, but I was informed by our DBA that it was disabled for security, so that's out.What type of execution is configured for user defined activity (this type is defined in file Runtime.properties on server side, available types for UDA - SCHEDULER or NATIVE_JAVA)?
For SCHEDULER type ask your DBA about Uinux user used for executing external jobs (usually nobody user used with very limited rights - maybe this user doesn't have rights for executing any program/scripts).
Regards,
Oleg -
User Defined Activity "hangs" Process Flow if it runs for more than 10mins
I have been using OWB (10g r2) for a while and have used "User Defined" activities in production process flows successfully before.
However my problem now is that the activity (shell command) I want to perform, takes more than 10 minutes to complete. If I run the process flow with a parameter that generates a shell command that executes in two or three minutes, the process flow continues past the sucessfully executed user defined activity to the next activity.
BUT
If I run the same process flow (without modification or even redeployment) with a different parameter , the user defined acivity sucessfully executes (after about 11 minutes or so) but the process flow , doesnt seem to know that it is finished and just says it is still executing.
my "user defined" activity has
COMMAND: /usr/bin/ksh
PARAMETER_LIST bound to a variable which is set earlier in the process flow.
RESULT_CODE:
SCRIPT :
SUCESS_THRESHOLD : 0
by examining (RUNTIME CONTROL CENTER SCHEMA).all_rt_audit_execution_params
I can see that the variable contents assigned to RESULT_CODE look like this
'/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_SHORT'
or this
'/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_LONG'
I put the -n in because I thought that may have been the problem, but I think its more likely that there is come sort of ".properties" in a runtime file that needs to be set to control the "timeout" of user defined activities.
(like in Runtime.properties
property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
except maybe
.........Nativeexecution.timeout = .....?????
Has anybody had a problem like this? Found a document describing available configuration properties for PF activites?
Can anyone help?I have been using OWB (10g r2) for a while and have used "User Defined" activities in production process flows successfully before.
However my problem now is that the activity (shell command) I want to perform, takes more than 10 minutes to complete. If I run the process flow with a parameter that generates a shell command that executes in two or three minutes, the process flow continues past the sucessfully executed user defined activity to the next activity.
BUT
If I run the same process flow (without modification or even redeployment) with a different parameter , the user defined acivity sucessfully executes (after about 11 minutes or so) but the process flow , doesnt seem to know that it is finished and just says it is still executing.
my "user defined" activity has
COMMAND: /usr/bin/ksh
PARAMETER_LIST bound to a variable which is set earlier in the process flow.
RESULT_CODE:
SCRIPT :
SUCESS_THRESHOLD : 0
by examining (RUNTIME CONTROL CENTER SCHEMA).all_rt_audit_execution_params
I can see that the variable contents assigned to RESULT_CODE look like this
'/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_SHORT'
or this
'/usr/bin/rsh -n WINSRV1 dtsrun /usa /ppw /S WINSQLSRV /N JOBNAME_LONG'
I put the -n in because I thought that may have been the problem, but I think its more likely that there is come sort of ".properties" in a runtime file that needs to be set to control the "timeout" of user defined activities.
(like in Runtime.properties
property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
except maybe
.........Nativeexecution.timeout = .....?????
Has anybody had a problem like this? Found a document describing available configuration properties for PF activites?
Can anyone help? -
How to configure "User defined" activity in a process flow
I want to start a shell script from a workflow process in an Unix environment. I use owb 10.2.0.1
Name of shell_script: verify_infile.sh
Location of shell_script: /ASW/dw
3 parameters to the script: X X /local/db/import/rain/finans.dat
First parameter is the letter X
Second parameter is the letter X
Third parameter is the path and file name I want to verify
I assume it's the User defined activity I should use and the parameters of the user defined activity are as follows
4 IN PARAMETERS
COMMAND
PARAMETER LIST
SUCCESS THRESHOLD
SCRIPT
1 OUT PARAMETERS
RESULT_CODE
So my question is what shall I have as in parameters in the User defined activity?
Kind regards
JanHere is the solution to the case
First make sure parameter in (owb_home)\owb\bin\admin\Runtime.properties is not disabled.
If it is, change the parameter to the value NATIVE_JAVA as described in the file:
property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
Second
COMMAND: /bin/sh
PARAMETER LIST: ?/ASW/dw/verify_infile.sh?X?X?/local/db/import/rain/finans.dat?
RESULT_CODE: 0
SCRIPT:
SUCESS_THRESHOLD: 0
Regards
Jan -
User Defined Activity: Run OS Command with OS parameters
OS: OELR5 U3 x64
DB: 11.1.0.7
OWB: 11R1
I would like to be able to run an os command from a user defined activity within a process flow. I am trying to make use of VMWare's vmrun to control a virtual machine. From the OS command line I enter:
/usr/bin/vmrun -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "[standard] VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
How many I duplicate this OS command from within a user defined activity in a process flow?
I create a user defined activity:
COMMAND: /usr/bin/vmrun
PARAMETER_LIST:
RESULT_CODE:
SCRIPT: -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "[standard] VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
SUCCESS_THRESHOLD: 0
The process runs without error in the log, but the os command is not being run.
I tried again with:
COMMAND: /usr/bin/vmrun
PARAMETER_LIST: ?-T?server?-h?https://server:port/sdk?-u?user?-p userpassword?-gu?guest?-gp guestpassword?runProgramInGuest "[standard] VM/Virtual Machine.vmx"?-activeWindow?-interactive?"c:\path_to_program\program.exe"?/switch?
RESULT_CODE:
SCRIPT:
SUCCESS_THRESHOLD: 0
with the same result.
And I also tried calling sh:
COMMAND: bin/sh
PARAMETER_LIST:
RESULT_CODE:
SCRIPT: /usr/bin/vmrun -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "[standard] VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
SUCCESS_THRESHOLD: 0
also with the same result.
The process runs in each case, and ends with: "Log file is available", but when I look in the log, I don't see errors or any information that might help me adjust the user defined activity.This method works:
COMMAND: bin/bash
PARAMETER_LIST:
RESULT_CODE:
SCRIPT: /usr/bin/vmrun -T server -h https://server:port/sdk -u user -p userpassword -gu guest -gp guestpassword runProgramInGuest "standard VM/Virtual Machine.vmx" -activeWindow -interactive "c:\path_to_program\program.exe" /switch
SUCCESS_THRESHOLD: 0
The issue seems to be caused on an upgrade to OWB 11R2. Our installation does not always update the VALUE entry when a user types in a value, meaning that our entry changes were not reflected into the deployed process package. -
Problems using user defined activitys in Process Flows
Hi everybody,
i have problems using an user defined activity in my owb process flow.
I did the following according to https://blogs.oracle.com/warehousebuilder/entry/how_to_use_user_defined_activity_in_owb_process_flow.
1. create a script in /tmp called test.sh
2. chmod +x on the script so it can be executed
3. Changed the Runtime.properties file under ORACLE_HOME/owb/bin/admin
property.RuntimePlatform.0.NativeExecution.FTP.security_constraint = NATIVE_JAVA
property.RuntimePlatform.0.NativeExecution.Shell.security_constraint = NATIVE_JAVA
property.RuntimePlatform.0.NativeExecution.SQLPlus.security_constraint = NATIVE_JAVA
property.RuntimePlatform.0.NativeExecution.OMBPlus.security_constraint = NATIVE_JAVA
4. Creating an Process Flow with just the user defined activity
5. Deploying the Process flow was successfull
But everytime i execute the pf i get the following error in my Job Details.
TEST_PF:USER_DEFINED
Parameters
Log file is available. Click Information button to view.
It says Log file is available. But i can't find this file. Also i don't know what the problem is.
Can anybody help me out of this?
Thanks a lotHi,
solved the problem by myself.
I had problems with my script. So i insert set -x into the script an executed the pf again. Know i can see whats happening in a log. You can find this log in the job detail window by pressing the blue ! Button when the whole PF (the first entry) is marked.
Greetings -
User Defined activity does not log messages
I have created a User Defined activity which calls a unix shell script.
This script writes messages to standrard output ("echo") that I want
the process flow to catch in its log, so I can see the messages in
Control Center Manager.
This was actually the behaviour of my User Defined activity until recently.
I must have changed, unintentionally, some parameter/configuration that
I cannot remember. Maybe some "suppress script-messages" parameter? :-)
Anyone in this forum who knows which paramater I might have changed
and/or how I can get back the old behaviour of my activity?
// PontusI had the same experience recently: I was trying to log a message to a Unix file, but the process flow would always fail, even though the script executed well from the Unix prompt.
The problem in my case was that redirection is not supported from within an OWB version 9.0.4 process flow. Once I eliminated the "echo My message > logfile" everything was fine. You can even keep "echo My message" with no redirection and it's still ok.
The above holds regardless of where you put your script -- external Unix file, or as part of an "external process" icon in the flow.
If things are the same in your case, you'll need to figure out an alternative way of logging messages when executing the script. I decided to use external files as flags, by renaming them from the script.
Santiago -
How to use user-defined packages in JAX-RPC web service
I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
package supercomputer;
import Hello.*;
public class SuperImpl implements SuperIF
public String sendParam(String data)
Temp ob=new Temp();
int i=ob.get1(10000);
return data+"returned by supercomputer";
Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
[echo] Running the supercomputer.SuperClient program....
[java] java.rmi.ServerException: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
[java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
[java] at supercomputer.SuperClient.main(Unknown Source)
I dont know if it deploys why it gives error on client side.
Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
Please guide me in doing that.
Thanks,
FarrukhFarrukh,
I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
As I already said, I have doubts that your error should be originated from a missing class from your package, but:
-try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
-try to see if you can access your endpoint through your browser to see if there is a online status
-display your config/WSDL file, and the steps you did to build your web service.
regards,
Pedro Salazar. -
Using User Defined Function is SQL
Hi
I did the following test to see how expensive it is to use user defined functions in SQL queries, and found that it is really expensive.
Calling SQRT in SQL costs less than calling a dummy function that just returns
the parameter value; this has to do with context switchings, but how can we have
a decent performance compared to Oracle provided functions?
Any comments are welcome, specially regarding the performance of UDF in sql
and for solutions.
create or replace function f(i in number) return number is
begin
return i;
end;
declare
l_start number;
l_elapsed number;
n number;
begin
select to_char(sysdate, 'sssssss')
into l_start
from dual;
for i in 1 .. 20 loop
select max(rownum)
into n
from t_tdz12_a0090;
end loop;
select to_char(sysdate, 'sssssss') - l_start
into l_elapsed
from dual;
dbms_output.put_line('first: '||l_elapsed);
select to_char(sysdate, 'sssssss')
into l_start
from dual;
for i in 1 .. 20 loop
select max(sqrt(rownum))
into n
from t_tdz12_a0090;
end loop;
select to_char(sysdate, 'sssssss') - l_start
into l_elapsed
from dual;
dbms_output.put_line('second: '||l_elapsed);
select to_char(sysdate, 'sssssss')
into l_start
from dual;
for i in 1 .. 20 loop
select max(f(rownum))
into n
from t_tdz12_a0090;
end loop;
select to_char(sysdate, 'sssssss') - l_start
into l_elapsed
from dual;
dbms_output.put_line('third: '||l_elapsed);
end;
Results:
first: 303
second: 1051
third: 1515
Kind regards
TaoufikI find that inline SQL is bad for performance but
good to simplify SQL. I keep thinking that it should
be possible somehow to use a function to improve
performance but have never seen that happen.inline SQL is only bad for performance if the database design (table structure, indexes etc.) is poor or the way the SQL is written is poor.
Context switching between SQL and PL/SQL for a User defined function is definitely a way to slow down performance.
Obviously built-in Oracle functions are going to be quicker than User-defined functions because they are written into the SQL and PL/SQL engines and are optimized for the internals of those engines.
There are a few things you can do to improve function
performance, shaving microseconds off execution time.
Consider using the NOCOPY hints for your parameters
to use pointers instead of copying values. NOCOPY
is a hint rather than a directive so it may or may
not work. Optimize any SQL in the called function.
Don't do anything in loops that does not have to be
done inside a loop.Well, yes, but it's even better to keep all processing in SQL where possible and only resort to PL/SQL when absolutely necessary.
The on-line documentation has suggested that using a
DETERMINISTIC function can improve performance but I
have not been able to demonstrate this and there are
notes in Metalink suggesting that this does not
happen. My experience is that DETERMINISTIC
functions always get executed. There's supposed to
be a feature in 11g that acually caches function
return values.Deterministic functions will work well if used in conjunction with a function based index. That can improve access times when querying data on the function results.
You can use DBMS_PROFILER to get run-time statistics
for each line of your function as it is executed to
help tune it.Or code it as SQL. ;) -
Performance restrictions using User-Defined Message Search in PI 7.1 EhP1
Hi Gurus,
We want to apply the User-Defined Message Search in our productive system.
We also want to set the extractors to run during Message Processing .
Do you have any inputs on how this might affect the system performance?
Any best practices, previous experiences or thoughts on that?
Some of my questions:
How many Filters/Extractors would be a limit to not affect too much the messaging processing performance?
Running the extractors during message processing would greatly affect the performance? When to run the extractors in a batch job instead of runtime?
Any input is greatly appreciated.
Regards,
José OmarHi José ,
We are also planning to use User-Defined Search feature in our PI system. Could you please let me know whether or not were you able to use this in your PI productive environment?
Additionally , if you were able to use it can you please let me know the performance?
Thanks in advance
Edited by: Ravindra Hegde on Jun 3, 2011 11:26 AM -
User defined activity problem in process flow
Hi ,
any one can help me out
I have added a user defined activity in process flow , and given command values as \\windows\system32\cmd.exe
and parameter list : ${input.value}
and in script : kpi.bat
where i written
cd \kpi_sap
for /f "tokens=1-5 delims=/ " %%d in ("%date%") do copy "c:\kpi_sap\kpi_sap.csv" %%e-%%f-%%g.dat
but its not working ...
can any one give me direction to get success in this activity
best regards,
mahiHi Mahi,
I see that your post is a few days old and you might have resolved this issue, but if you haven't you might want to change the command value to c:\windows\system32\cmd.exe instead. Its been a while since I worked with commands, but I remember that I had a lot of problems when I defined paths with '\\'. What I found out was that OWB jobs was run under the windows system account and the system account don't have access to networkshares (even if its really not on the network).
I can't say whether the script in the kpi.bat is wrong, but as long as you can run it manually using cmd.exe you should be ok.
If this doesn't help it might be helpful with some more specific error messages.
regards Ragnar -
DSC powershell xwindowsprocess to execute batch file under different user account
DSC powershell run under "NT AUTHORITY\SYSTEM".
I am trying to execute a batch file under different user account using xwindowsprocess in DSC resource kit.
I created a custom dsc resource with 3 parameters namely Exepath, Arguments, Credential.
I received those parameter values in settargetresource method.
CallPInvoke
[Source.NativeMethods]::CreateProcessAsUser(("$ExePath "+$Arguments), $Credential.GetNetworkCredential().Domain, $Credential.GetNetworkCredential().UserName, $Credential.GetNetworkCredential().Password)
I tested it by invoking a batch file and writing username under which it executes to a text file.
After executing, the output text file still contains the "Systemname$".Configuration Sample_xService_ServiceWithCredential
param
[string[]]
$nodeName = 'localhost',
[System.String]
$Name,
[System.String]
[ValidateSet("Automatic", "Manual", "Disabled")]
$StartupType="Automatic",
[System.String]
[ValidateSet("LocalSystem", "LocalService", "NetworkService")]
$BuiltInAccount="LocalSystem",
[System.Management.Automation.PSCredential]
$Credential,
[System.String]
[ValidateSet("Running", "Stopped")]
$State="Running",
[System.String]
[ValidateSet("Present", "Absent")]
$Ensure="Present",
[System.String]
$Path,
[System.String]
$DisplayName,
[System.String]
$Description,
[System.String[]]
$Dependencies
Import-DscResource -Name MSFT_xServiceResource -ModuleName xPSDesiredStateConfiguration
Node $nodeName
xService service
Name = $Name
DisplayName = $DisplayName
Ensure = $Ensure
Path = $Path
StartupType = $StartupType
Credential = $credential
$Config = @{
Allnodes = @(
Nodename = "localhost"
PSDSCAllowPlainTextPassword = $true
#Sample Scenarios
$credential = Get-Credential
Sample_xService_ServiceWithCredential -ConfigurationData $Config -Name "Sample Service" -DisplayName "Sample Display Name" -Ensure "Present" -Path "C:\DSC\TestService.exe" -StartupType Automatic -Credential $credential
¯\_(ツ)_/¯ -
Which text editor can use User Defined Languages?
On Windows, Notepad++ is able to use User Defined Languages. On a mac, I know of no text editors that can use them. Not only that, my mac stubbornly refuses to acknoledge the existence of .ecl, .dnh, and other scripting languages. I bundled Notepad++ and used AppleScript to make an executable, but it is not funny when you have to manually open Notepad++, then search for your file, then open it, then do things with it rather then clicking the file for it to open.
I would like to know if there are ANY text editors that can run User Defined Languages on a mac. Please do not tell me to use Winebottler to package Notepad; I already have Notepad++Or, put your text file on DropBox, using the iPad app and email a link to others, or put it on MobileMe (iDisk app) or sharevvia iWork (online sharing for Pages documents).
Besides the word processing apps like Pages, there are a ton of notes and notebook apps which have various file sharing capabilities. Plain Text is a free plain text editor which links to a DropBox folder, e.g. And the Elements app will sync to DropBox and also let you email. There are many others.
The trick is figuring out what you need--how much formatting, e.g.--and what type of access by your PC is most convenient. I use apps that sync to DropBox or MobileMe, so that those files are always accessible. Much as I love MobileMe for syncing my calendars, contacts and to do lists, I prefer DropBox for document access and I've found iWork unreliable. -
Test Stand seq w/ dll batch file execution not working
I am using Test Stand 4.1, running a seq that calls a dll. The dll contains a batch file execution function that has not been working properly. I am not 100% sure what the function is as I do not have access to the direct code from which the dll was created. I believe I have a file, however please remember this is a guess that I am looking at the correct function/file.
This is a Pass/Fail test step that calls a batch file. The batch file runs properly without the use of Test Stand and called by the dll. In the code that I believe is running, I see there is a step that I am guessing does not run (see below for test steps). It seems as though these steps are being "stepped over" and not running, however the test does seem to be entering this function. The test reports a pass/fail status as the data is reported into a txt file. If the txt file contains the correct data, the test step reports PASS, even though the batchfile does not run.
:Note: [batchfile.bat] is the name of the batch file being called; the [ ] are not present
// Run Batch File
ChkErr(LaunchExecutableEx([batchfile.bat] ,windowState,&handle));
// Wait for batch file to complete task
do{
ProcessSystemEvents();
}while(!ExecutableHasTerminated (handle));
RetireExecutableHandle (handle);
Any one have any suggestions as to why the batch file is not being called and running properly?
Thank you
Jason_CThanks for the feed back. I have realized and it seems as though sometimes the CWD varies. The current working directory when the batch file does not run seems to be set to the desktop, not to the specified directory. The batch file is used to program a chip, calling the exe to run using commands. The file are speciifed by an absolute path, however the exe is not. The batch file is as below and seems to match up with a problem with the CWD. How can change though? I will have to check in the Start in field, but where can I find that property?
Thank You
--Jason
del ..\misc\mplab.txt
echo C:\Program Files\JTRS\01_P55461U\bin\uutsw\CR1_T2V3L_PMM_STUB_LOAD.hex
..\misc\pm3cmd /5 /BLCC:\Program Files\JTRS\01_P55461U\misc\t2v3l_pmm_stub_load\t2v3l_pmm_stub_load.pm3 /k /m /y /e >> ..\misc\mplab.txt >> ..\misc\mplab.txt
..\misc\pm3cmd /5 /BVCC:\Program Files\JTRS\01_P55461U\misc\t2v3l_pmm_stub_load\t2v3l_pmm_stub_load.pm3 >> ..\misc\mplab.txt -
Using user defined variables in SAP BPC 7.0 NW
Hi,
I am using BPC 7.0 SP2 NW version. I want to do some calculatioins and/or comparision in the script logic by using user defined variables.
For Ex: I want to assign the property TIMEID of TIME dimension to a variable and then use this variable in my IIF statement.
I have tried a lot but not getting any solution.
Can anyone guide me in how to use user defined variables in Script Logic.
Your valuable reply is appreciated.
Thanks & Regards
Manoj DamleHi,
Thanks for the valuable reply.
But i want to define variables in the Script Logic and not in the Data Manager.
The scenario is like this:
I want to check the value of the DUMMYACC1 member of GL_ACCOUNT dimension with a constant and depending on the condition i want to update a user defined variable. This variable will further be used in the *SELECTCASE statement for decision making.
The Code is as follows:
*XDIM_MEMBERSET COMP_CODE = COMP_CODE_1
*XDIM_MEMBERSET BUS_AREA = BUS_AREA_1
*XDIM_MEMBERSET VERSION = VERSION_1
*XDIM_MEMBERSET CURRENCY = AUD
*XDIM_MEMBERSET DATASRC = DATASOURCE_1
*XDIM_MEMBERSET GL_ACCOUNT = SALESREVENUE,PRICE,QUANTITY,DUMMYACC1
*XDIM_MEMBERSET TIME=2009.MAY,2009.JUN
*XDIM_MEMBERSET CUSTOMERCATEGORY = CUSTOMER_CAT_1
*XDIM_MEMBERSET PROFIT_CTR = PROFIT_CTR_1
*XDIM_MEMBERSET SEGMENT = SEGMENT1
*XDIM_MEMBERSET MEASURES = PERIODIC
*FUNCTION PRO(%VAR1%,%VAR2%)
[%VAR1%].CURRENTMEMBER.PROPERTIES("%VAR2%")
*ENDFUNCTION
*FOR %GL_ACC% = DUMMYACC1
*FOR %CV_TIM% = 2009.MAY,2009.JUN
#CUR_MTH = IIF(([GL_ACCOUNT].[%GL_ACC%],[TIME][%CV_TIM%]) = 1.,1,NULL)
*NEXT
*NEXT
*SELECTCASE #CUR_MTH
*CASE 1
#CURRENTMTH = PRO(TIME,TIMEID)
*ENDSELECT
The errors which system gives is:
1. Duplicate formula found
2. Invalid MDX statement
3. #CUR_MTH & #CURRENTMTH is not a valid member
Please give your valuable suggestion.
Thanks and Regards
Manoj Damle
Maybe you are looking for
-
Performance Issues in Win 7 (Pro to Ultimate)
I use Avast as my virus protection. I have recently tried to uninstall Unity Web Player, but I can't get it out, no matter what I do (which includes removing all "unity" info in the registry, all folders with the player info, and through the control
-
9 Beeps (3 short, 3 longer, 3 short)
I have a mid-2010 Macbook Pro and just downloaded the latest Mac OS update. My computer will not start since downloading the latest update. My Mac will start with a black screen and 3 short beeps, 3 longer beeps, and 3 short beeps. Then a gray scree
-
I have an application with hundreds of small movies so i need to put them into a folder (called dswmedia) and an .exe and macintosh app to launch the application, outside the folder. I'm using MX2004 and working on a PC XP2 to develop my app. I have
-
TestStand 2012 Report File Location variable
Hi, In TestStand 2010 SP1, I have the "report file path" as one of the column into the database using the RunState.Report.Location. This has been working until I upgraded to TestStand 2012. The RunState.Report.Location is always empty. I also trie
-
My organizer won't open on photoshop 10 elements
organizer wont open