cancel
Showing results for 
Search instead for 
Did you mean: 

xsjob error :how to pass input parameters to stored procedure call from .xsjob

Former Member
0 Kudos

Error : SQL exception 1281: wrong number or types of parameters in call: IN_KEY_DATE is not bound: line 1 col 6 (at pos 5) at ptime/query/checker/check_call.cc:505

My  xsjob

{

  "description": "My first SQLScript job",

  "action": "XXXX::XXXX" ,

 

  "schedules":

  [ {

    "description": "Will run every 59 seconds",

      "xscron": "* * * * * *  59" ,

      

   "parameter" : { "IN_KEY_DATE" :"20150715",

                    "VALUE1" :"1" ,

                    "VALUE2" : "ABC"

                    }

  

     }

    

      ]

      }

It works if I Call "_SYS_BIC"."xxx/procedure" ('20150715' , '1' , 'ABC');

If I schedule a job for other procedure without input parameters it works but now I have my new procedure with 3 input parameters

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

my problem is solved now.

patrickbachmann
Active Contributor
0 Kudos

What was the issue?

Former Member
0 Kudos

Hey Patrick ,

My .xsjob file was correct but my procedure was not .hdbprocedure. I have converted it to .hdbprocedure now

patrickbachmann
Active Contributor
0 Kudos

Ahhh that makes sense!  This never crossed my mind and I have done tons of the old deprecated procs!   

patrickbachmann
Active Contributor
0 Kudos

Can you try it like this below?   I have not tried this yet with my XSJOBS, none of mine are passing parameters yet but I will also test it soon.

{

  "description": "My first SQLScript job",

  "action": "XXXX::XXXX" ,

  "schedules":

  [ {

    "description": "Will run every 59 seconds",

      "xscron": "* * * * * *  59" ,

     

   "parameter" : { IN_KEY_DATE: "20150715",

                    VALUE1: "1" ,

                    VALUE2: "ABC"

                    }

 

     }

   

      ]

      }

patrickbachmann
Active Contributor
0 Kudos

Actually i'm finding conflicting documentation on this.  I find examples with your quotes and examples without.  So I will experiment.

patrickbachmann
Active Contributor
0 Kudos

Please try in either case to move the colon to the very right of the parameter instead of before the value you are passing.  Like

IN_KEY_DATE: "20150715",


or


"IN_KEY_DATE": "20150715",

Former Member
0 Kudos

Hi Patrick,

I tried but not working.