One sleepless night (it’s 4 am!!!!) and I decided to write a sequel to “Run MaxL in Workspace“.
Year is 2023 and run maxl has new super hero skills 🙂 (reminds me of Neo’s superman flying skills….)
This is similar to running MaxLs in Workspace, trick is to create another generic job application.
Here is how it is done
Follow the steps given below, and you can run bat files in Workspace.
Step 1: Create a Job Application
Create a generic job application as shown below. (Navigate -> Administer -> Reporting and Analysis -> Generic Job Applications)
- Provide a Product Name (this is the name that shows up as Job Factory Application) when importing a job.
- Select Product Host. (This is the Workspace server)
- Type $PROGRAM $PARAMS, you can also click the buttons to insert Command Template. (this is where it is different from the MaxL job application)
- Provide the Executable as %WINDIR%System32cmd.exe
Step 2: Import a bat file
- Import a bat file into Workspace as a job. (Import file as job)
- Check “Import as Generic Job” check box.
- Select the newly created Job Application and click Finish.
Step 3: Run the job
You can now execute the bat file by double clicking on it or right click -> Run as Job
Provide a path for output and click “Run”
I’ve MaxL files kept on Workspace server, which was executed by the bat job.
HTH
This is awesome. Thanks for staying awake!
Ciao
Thank you Andrea 🙂
Thanks for sharing this content Celvin … Very informative
Very helpful, I was striking my head to achieve this…. Thank you..
Thanks Celvin for posting the info.. one Q. can we automate the batch/schedule it to run .. from workspace….
Yes you can run it in workspace itself. you can schedule it to run at a particular time or event.
http://docs.oracle.com/cd/E17236_01/epm.1112/raf_webuser/ch09s02.html
http://docs.oracle.com/cd/E17236_01/epm.1112/raf_webuser/tools_browser_jobscheduler.html
Links not working..
fantastic stuff, but i just got to the "Running …. job" and hangs there and nothing happens. Any ideas why this is so? also tested it with a simple echo Hello to a .txt file, but did not work. Appreciate any help on this.
Send me the screen shots of what you've done till now.
This is a great setup. Couple of questions:
I assume the Essbase client has to be installed on the Workspace server. Is there any way to do this if it's not?
How do you point the batch script to the MaxL script you uploaded to Workspace? Is there a specific format for the path?
Thanks!
@anon
It requires Essbase client on Workspace. If you are on 11.1.2.x you can just run EssbaseClient.exe. For earlier versions it is slightly different approach to install it.
I kept a folder with MaxL Scripts on Workspace server and they are referred in the bat file. Just give full path. (no specific format needed)
You can also look at https://orahyplabs.com/2013/03/run-maxl-in-workspace.html
Hi ,Could you please let me know how to perform step2, since i am not able to find import option, once i compelete step1, it says ok or cancel button only.
well @Bhavani, for Step 1 to complete you should say ok. Then start Step 2 which is import a bat file
Thanks. I am new to Planning. Could you please let me know where can I find import bat file option. I mean eg navigate ->administer like that. It will be very helpful.
@Bhavani File-> Import job (It should be done on Workspace)
Hi Celvin,
Thanks for this info.
However when I run from workspace error logs are not detailed. User had still need to login to server for detailed error logs(which IT doesn't give access to users). Is there any other alternative to achieve this.
Or is there any option to include email to user as an option in maxl scripting?
Thanks
Venkat
@Venkat You can create a mailing mechanism in the bat file to mail the error logs. Or create something in the bat file which opens the error file and echo it.
nice post Celvin!!! I have a quick question- my workspace(Report&Ananlysis) in a different server where as the Automation batch scripts in different(planning) server. i could not able to make it run- is it always true that the batch scripts/maxL scripts needs to be in workspace server
-KP
@KP yea it should be present on Workspace.
I'm also getting the "Running …. job" and hanging problem. Checking Essbase logs/sessions shows the script commands aren't being run. Did you figure out what caused it? I can run MaxL scripts as a job in Workspace.
@anon send me a mail with screenshots explaining what you did
Celvin,
after placing my batch files in Workspace , it works well.. excellent!!!. thanks.
I have a quick question – is there a way to generate a report from Workspace to get list of jobs attached to an event.
-KP
@kp I've not looked at it. Maybe in the relational database
I am on version 11.1.2.2 and workspace is installed on Linux. Can I still call bat files from workspace web interface.
Thanks for your answer.
@anon
You can use sh files to do it. When you create the job application the cmd will be /bin/sh
Thanks man…was looking for help on this topic and found it Right away.
Thanks Celvin for your great efforts. I want to run the batch in linux command line, not in workspace.I have question to execute it on the linux command line (by external scheduler). I did not find the schedulebatch.sh in the the bipusbin directory on my Linux server . Is that there is no such shell script in Linux?
@Ahmed check for a file called ScheduleBatch (I don't think it has an extension), if it is then that's the one that you are looking for.
Hi Celvin ,
One query : Suppose we are calling a shell script from the batch. How do you pass a parameter interactively ?
Rgds,
Saptarshi
Good article, but now the question is: what if I'd like to navigate the filesystem from the main batch. Let's assume making a "call" to a bat file which is not the same folder of the primary one? Is it possible?
Hi KP,
I have similar issue while executing generic job from workspace, R&A and planning are in different server, I even tried to place the bat file in R&A server but still I am getting the following error message "The system cannot find the path specified". Please let me know how you managed to do this. Your quick reply is really appreciated. Thanks Raj
Hi Celvin – When the Job is launched , if I want to kill the Job how do I do it ? ( say if the .BAT has a wait for another file etc and hence I want to end this process )
This is not working for us.I have not kept maxl on workspace.Also i am getting an error saying /opt/hyperion/Oracle/Middleware/user_projects/epmsystemapp01/ReportingAnalysis/data/JF1/tmp/JF1-0/HSLabor_Finstm_Load1.sh: line 2: exec: HSLabor_Finstm_Load.bat: not found
somehow its taking .sh from some where.Any help would be appreciated.Thanks
Are you running this on a *nix server. The path suggests that you are, what script are you trying to execute? Is it a bat file/she'll script? Is your workspace on windows?
Is that not showing up in schedule?
Great Article! – Do you know how to program an output directory so users do not have to specify a directory everytime the job is run?
I don't have an answer for you now. I'll look at it and will post an update here, if I find a way
Thanks Celvin, I checked with Oracle and they said the function was not available, they have logged a Bug 20938693
Implemented at my first client – thanks Celvin 🙂
Hi I need to execute a batch script which runs load data command on another server.
Batch script is running fine if executed manually but not working from workspace
It should exist on workspace server. Did you copy the script to workspace server?
Are you getting any errors?
great work done….
I have a question but don't know if its right place to ask but just taking my chances.
In a batch script I need to copy file from workspace folders to another server.Files stored in workspace folders are stored as unique Id's in RAF folders.
Is there a way/logic to recognise file name and folder name so that we can call that in batch script
If you are trying to move workspace objects by copying those objects it is not going to work. Workspace stores that information in two ways it gets stored relationally and also in the RAF folders.
If you are looking for the names then the you can look at V8_CONTAINER table
The post is helpful. The comments are also informative. Thanks. I'm picking up.
Hi all,
I am having a blat command inside the batch file , While running this batch file from Workspace, the email is not getting triggered.
Kindly Provide your inputs.
Thanks in Advance.
Does it work if you run the bat file from command prompt?
Yes , its working when i am running the bat file from Command Prompt.
Hi Celvin, in 11.1.2.4 on Solaris "ScheduleBatch.sh" is not available. I'm not sure if it is by "design". I traversed the whole file system but there is no trace of it. Financial Reporting was fully deployed an it is functional.
That comes with FRStudio in 11.1.2.4, I don't think you'll get that on Solaris
Thanks Celvin for the tip regarding the "ScheduleBatch.sh". Actually the file resides in the "bin" directory where FRS is installed without extension as "ScheduleBatch". Just copy it to the FR server and name it as "ScheduleBatch.sh" and give it execute permission.
Hi,Thank you for a wonderful post. It helped me a lot. Two things I just want to check here.
1) Can we fix the “Job Output” path while setting up the job.
2) Using Username command in script produces “$” username while running the file through workspace but if the same is run directly through batch file it will give the username correctly as required. Any setting/command/parameter we can set from our end to fetch the correct username instead of servername$.
Regards,Ayush
Hello, can someone help me please :
I'm Running a batch files from the Oracle EPM Workspace, I set up The parameters page for creating prompts but how can I send values to the batch files that are being called.
Thanks in advance
Regards
You send the parameters when you start the job.
Hi Celvin, this page has been really great help to me. One question though, if I update the batch script in its original location, the workspace job still runs the old version of the script. Any idea how to update? Do I need to reimport “File as a job” or something?
Yes you’ll have to import it as a job again.
Celvin, thank you for this insight. I am wondering, have you been able to successfully prompt the user for their Username and Password and pass it through? The thought of the user being able to see the admin password in the job output is frightening
I think you make that as a parameter, then it should ask for input. Also you can encrypt the maxl so that it won’t show the passwords.
Hi Celvin,
Thanks for sharing the Info, I have requirement to initiate the shell script from Workspace.
My requirement- .PushData.sh should be triggered by User, how can I achieve it thru workspace?
Please help.!
Please check the screenshot
Broswe the Batch file,
/Oracle/Middleware/user_projects/epmsystem1/ReportingAnalysis/data/JF1/tmp/JF1-0/C11.sh: line 2: exec: C1.bat: not found.
Please help,,!
If this is a shell script why a reference of bat file is there, you need to configure your generic job to call shell default shell can be located here “/usr/bin/sh” sometimes it could be in sbin. Check whether it is there?
Now from your script I could see (from what you posted) that you can trying to call a bat file from a shell. You really need to call a shell script not a bat file also keep in mind to write this on a *nix machine or using Notepad++ and change EOL conversion to Unix (LF)
How did you configure your generic job?
Generic Job Application setup:
Program Host: Planning Server name
Executable: /usr/bin/sh
Command Template: $PROGRAM $PARAMS
we have shell script that executes PushData.sh Planning utility able to achieve it.And this script is import as Job and once ran it executed with error:
Error:/Oracle/Middleware/user_projects/epmsystem1/ReportingAnalysis/data/JF1/tmp/JF1-0/HYP_APP_CPCH11.sh: line 2: exec: HYP_APP_CPCH1.sh: not found
How can we run the shell script from workspace?
Note:RA components & Planning component installed in one Linux server