Skip to Content

Hello

We are relatively new to BODS and could use some guidance. Our request seems simple but we have not yet been successful in trying to pass a value from our CPS scheduler job to a BODS program. Was hoping someone might be able to suggest how to do this:

  • We created a job in BODs and have successfully run the Export Execution command which created our *.txt and *.bat file
  • Within the BODs job is a global variable $G_Sourceid. We would like to pass an external value to this parm prior to execution
  • We are using SAP’s CPS scheduler to kick off the job
  • In our CPS job we coded one command line that looks something like: “\\<server>\ProgramData\SAP BusinessObjects\Data Services\JB_test_our_program.bat”
  • We have tried the following with no success:
    • edited the *.txt file and set the -GV”$G_Sourceid=;”
    • edited the *.txt file and set the -GV”$G_Sourceid=&1;”
    • removed the -GV command from the *.txt file and tried to send it via the CPS command. EX:\\<server>\ProgramData\SAP BusinessObjects\Data Services\JB_test_our_program.bat” “-GV<G_Sourceid=oursourceidvalue>”
    • tried to send it via the CPS command. EX:\\<server>\ProgramData\SAP BusinessObjects\Data Services\JB_test_our_program.bat” “-GV<&1=oursourceidvalue>”

Any idea how can we send or replace the value in the variable $G_Sourceid from the CPS job? We are not sure if we need to fix this on the BODS side prior to running the Execute or if we need to provide something in the Global Variable at the time of the Execute or if need to provide something additional from the CPS job.

Has anyone tried this before and if so any chance you could share some coding examples?

Thanks in advance!

Mike

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Jim Egan

    The easy way?  Put the value in a text file.  The ETL job will read the value from the text file.  Hands down, this is the easiest, most straightforward way to pass a value.  Or, you could put the parameter into a database table.

    Changing global variables in the Export Execution Command is challenging.  I’ve had very little luck doing that.

    You could expose the ETL job as a Web Service.  Passing parameters that way is a bit easier, but if your scheduling tool can’t do Web Service calls then you’re out of luck.

    An alternative is to use the AL_ENGINE command to run a job.  I use that command for a lot of things but running jobs isn’t one of them. But it can run jobs.

    I don’t think an environment variable would work since the variable won’t be available to the job server’s session.

    (0) 
  2. Rick Mueller

    Hi Mike,

    I am a little late to this party. Did you ever find a solution?

    Your situation is similar to mine.  In my case, I want to pass in the value from another application, then fire-off the exported bat file.  If I hard code the value inside the txt file, it works fine.  I have tried everything you have tried.

    Jim – You mentioned passing the value to a text file.  Are you saying use another text file separate from the exported text file?

    Thanks for your time,

    Rick

     

    (0) 

Leave a Reply