Michael_DePew_8870

pass SQL job results to another job

Discussion created by Michael_DePew_8870 on Feb 3, 2017
Latest reply on Jun 1, 2017 by Wolfgang_Brueckler_1288

Hello,

I'm new here and after searching for a long time have had a hard time finding a similar question/answer, or maybe I'm just not understanding, so I apologize if this is obvious and has been asked before.  I just took over for our senior developer who suddenly left so I am scrambling.  =)

I have a SQL job object, it just does a "SELECT * FROM dbo.SmallTable" and I have this in the Post Process:

:SET &HND# = PREP_PROCESS_REPORT("JOBS", , "REP", )
:SET &ACTOBJ# = ACTIVATE_UC_OBJECT(JOBS.WIN.SQL_RESULTS_PRINT,,,,, PASS_VALUES)

Then, in my other job that gets activated, I have in the Process:

 

:PROCESS &HND#
:   SET &RET# = GET_PROCESS_LINE(&HND#)
:   PRINT &RET#
:ENDPROCESS

But it fails with the error:  Runtime error in object 'JOBS.WIN.SQL_RESULTS_PRINT', line '00003': Invalid handle ('') for data sequence specified.

Any help with this would be very much appreciated.

Thank you for your time.

Mike

 

 

Outcomes