dbo.QBM_PScheduleStartJob

SQL_STORED_PROCEDURE

Created 2025-06-27T17:57:29.407 · modified 2026-04-14T23:20:26.107 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@uid_JobAutoStartvarcharno

Referenced objects

SchemaObjectColumn/minorClass
DialogScheduleOBJECT_OR_COLUMN
dialogtableOBJECT_OR_COLUMN
JobAutoStartOBJECT_OR_COLUMN
QBM_PJobCreate_HOFireEvent_BOBJECT_OR_COLUMN
QBM_PJournalOBJECT_OR_COLUMN
QBM_PProcessCreateOBJECT_OR_COLUMN
QBM_PSessionContextSetOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
QBMEventOBJECT_OR_COLUMN
dboQBM_FCVStringToList_iOBJECT_OR_COLUMN
dboQBM_FGIConfigparmValueOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN
dboQBM_FGISessionErrorRethrowOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1     create   procedure QBM_PScheduleStartJob (@uid_JobAutoStart varchar(38)  ) as begin set nocount on declare @BasisObjectType nvarchar(255) declare
2 @UID_DialogTable varchar(38) declare @WhereClause nvarchar(max) declare @Name nvarchar(255) declare @Event nvarchar(255) declare @ScheduleName nvarchar
3(255) declare @MessageString nvarchar(1024) declare @GenProcID varchar(38) declare @XUser nvarchar(64) = object_name(@@procid) declare @StopTimeChar nvarchar
4(8) declare @StartTimeChar nvarchar(8) declare @StopTime datetime declare @StopTimeFull nvarchar(64)  declare @jetzt datetime   declare @ParameterList 
5nvarchar(max) declare @p nvarchar(4000) declare @v nvarchar(max) declare @p4 nvarchar (1024) , @v4 nvarchar (max) , @p5 nvarchar (1024) , @v5 nvarchar 
6(max) , @p6 nvarchar (1024) , @v6 nvarchar (max) , @p7 nvarchar (1024) , @v7 nvarchar (max) ,  @p8 nvarchar (1024) , @v8 nvarchar (max) , @p9 nvarchar 
7(1024) , @v9 nvarchar (max) , @p10 nvarchar (1024) , @v10 nvarchar (max) ,  @p11 nvarchar (1024) , @v11 nvarchar (max) ,  @p12 nvarchar (1024) , @v12 nvarchar
8 (max) , @p13 nvarchar (1024) , @v13 nvarchar (max) , @p14 nvarchar (1024) , @v14 nvarchar (max) , @p15 nvarchar (1024) , @v15 nvarchar (max) , @p16 nvarchar
9 (1024) , @v16 nvarchar (max) , @p17 nvarchar (1024) , @v17 nvarchar (max) ,  @p18 nvarchar (1024) , @v18 nvarchar (max) , @p19 nvarchar (1024) , @v19 
10nvarchar (max)  , @p20 nvarchar (1024) , @v20 nvarchar (max) , @p21 nvarchar (1024) , @v21 nvarchar (max) , @p22 nvarchar (1024) , @v22 nvarchar (max) 
11, @p23 nvarchar (1024) , @v23 nvarchar (max) , @p24 nvarchar (1024) , @v24 nvarchar (max) , @p25 nvarchar (1024) , @v25 nvarchar (max) , @p26 nvarchar 
12(1024) , @v26 nvarchar (max) , @p27 nvarchar (1024) , @v27 nvarchar (max) , @p28 nvarchar (1024) , @v28 nvarchar (max) , @p29 nvarchar (1024) , @v29 nvarchar
13 (max) , @p30 nvarchar (1024) , @v30 nvarchar (max) , @p31 nvarchar (1024) , @v31 nvarchar (max)  declare @DebugLevel char(1) = 'I' declare @GenProcID_R
14 varchar(38) = dbo.QBM_FGISessionContext('') declare @XUser_R nvarchar(64) = dbo.QBM_FGISessionContext('XUser') declare @para QBM_YCursorBuffer SET XACT_ABORT
15 OFF BEGIN TRY  select @jetzt = GetUTCDate() select @Name = j.Name, @UID_DialogTable = t.UID_DialogTable, @BasisObjectType = t.TableName, @WhereClause 
16= j.WhereClause, @Event = et.EventName, @StopTimeChar = j.StopTime, @StartTimeChar = case when s.StartTime = 'LB:ST' then '' else isnull(s.StartTime, ''
17) end, @ParameterList = j.ParameterList, @ScheduleName = isnull(s.Name, j.Name) from JobAutoStart j with (readpast) join QBMEvent et with (readpast) on
18 et.UID_QBMEvent = j.UID_QBMEvent join dialogtable t with (readpast) on et.UID_DialogTable = t.UID_DialogTable left outer join DialogSchedule s with (readpast
19) on j.uid_DialogSchedule = s.uid_dialogSchedule where j.uid_JobAutoStart = @uid_JobAutoStart  if isnull(@WhereClause, N'') = N'' begin select @WhereClause
20 = N'1=1' end  if isnull(@StoptimeChar, '') > ' ' and isnull(@StartTimeChar, '') > ' ' begin if isnumeric(@StoptimeChar) = 1 begin select @StopTime = dateadd
21(hh, convert(int, @StoptimeChar), @jetzt)  if @stoptime = @jetzt begin select @Stoptime = convert(datetime, '2200-01-01', 121) end end else begin select
22 @Stoptime = convert(datetime, '2200-01-01', 121) end  end else  begin select @Stoptime = convert(datetime, '2200-01-01', 121) end select @StopTimeFull
23 = convert(nvarchar(64), @Stoptime, 121)  select @MessageString = concat('#LDS#Starting job : {0}.|' , @Name , '|' ) exec QBM_PJournal @MessageString, 
24@@procid, 'I', @DebugLevel    select @GenProcID = newid() exec QBM_PSessionContextSet 'GenProcID', @GenProcID exec QBM_PSessionContextSet 'XUser', @XUser
25 if '1' = dbo.QBM_FGIConfigparmValue('Common\ProcessState') begin exec QBM_PProcessCreate @GenProcID, 'QBM_PScheduleStartJob', @DisplayName = @ScheduleName
26 end if @Stoptime > GetUTCDate() begin  insert into @para (Int1  , ContentShort  , ContentFull  ) select s.OrderNumber, left(s.Parameter1,400), s.Parameter2
27 from dbo.QBM_FCVStringToList_i(@parameterList, nchar(7), 1,0, N'=') as s   select @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull
28 from @para pa where pa.Int1 = 1 if @p > ' '  begin select @p4 = N'_paramName2' select @v4 = @p select @p5 = N'_paramValue2' select @v5 = @v end  select
29 @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para pa where pa.Int1 = 2 if @p > ' '  begin select @p6 = N'_paramName3'
30 select @v6 = @p select @p7 = N'_paramValue3' select @v7 = @v end  select @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from
31 @para pa where pa.Int1 = 3 if @p > ' '  begin select @p8 = N'_paramName4' select @v8 = @p select @p9 = N'_paramValue4' select @v9 = @v end  select @p=null
32, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para pa where pa.Int1 = 4 if @p > ' '  begin select @p10 = N'_paramName5' select
33 @v10 = @p select @p11 = N'_paramValue5' select @v11 = @v end  select @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para
34 pa where pa.Int1 = 5 if @p > ' '  begin select @p12 = N'_paramName6' select @v12 = @p select @p13 = N'_paramValue6' select @v13 = @v end  select @p=null
35, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para pa where pa.Int1 = 6 if @p > ' '  begin select @p14 = N'_paramName7' select
36 @v14 = @p select @p15 = N'_paramValue7' select @v15 = @v end  select @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para
37 pa where pa.Int1 = 7 if @p > ' '  begin select @p16 = N'_paramName8' select @v16 = @p select @p17 = N'_paramValue8' select @v17 = @v end  select @p=null
38, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para pa where pa.Int1 = 8 if @p > ' '  begin select @p18 = N'_paramName9' select
39 @v18 = @p select @p19 = N'_paramValue9' select @v19 = @v end   select @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para
40 pa where pa.Int1 = 9 if @p > ' '  begin select @p20 = N'_paramName10' select @v20 = @p select @p21 = N'_paramValue10' select @v21 = @v end  select @p=null
41, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para pa where pa.Int1 = 10 if @p > ' '  begin select @p22 = N'_paramName11' select
42 @v22 = @p select @p23 = N'_paramValue11' select @v23 = @v end  select @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para
43 pa where pa.Int1 = 11 if @p > ' '  begin select @p24 = N'_paramName12' select @v24 = @p select @p25 = N'_paramValue12' select @v25 = @v end  select @p=null
44, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para pa where pa.Int1 = 12 if @p > ' '  begin select @p26 = N'_paramName13' select
45 @v26 = @p select @p27 = N'_paramValue13' select @v27 = @v end  select @p=null, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para
46 pa where pa.Int1 = 13 if @p > ' '  begin select @p28 = N'_paramName14' select @v28 = @p select @p29 = N'_paramValue14' select @v29 = @v end  select @p=null
47, @v=null select top 1 @p = pa.ContentShort , @v = pa.ContentFull from @para pa where pa.Int1 = 14 if @p > ' '  begin select @p30 = N'_paramName15' select
48 @v30 = @p select @p31 = N'_paramValue15' select @v31 = @v end    exec QBM_PJobCreate_HOFireEvent_B @BasisObjectType,  @WhereClause,   @EventName = @event
49,   @GenProcID = @GenProcID, @AdditionalObjectKeysAffected = DEFAULT, @p2 = N'_paramName1', @v2 = N'StopTime', @p3 = N'_paramValue1', @v3 = @StopTimeFull
50, @p4 = @p4, @v4 = @v4 , @p5 =@p5 , @v5 = @v5 , @p6 = @p6, @v6 = @v6 , @p7 = @p7, @v7 = @v7 , @p8 = @p8, @v8 = @v8 , @p9 = @p9, @v9 = @v9 , @p10 = @p10
51, @v10 = @v10 , @p11 = @p11, @v11 = @v11 , @p12 = @p12, @v12 = @v12 , @p13 = @p13, @v13 = @v13 , @p14 = @p14, @v14 = @v14 , @p15 = @p15, @v15 = @v15 , 
52@p16 = @p16, @v16 = @v16 , @p17 = @p17, @v17 = @v17 , @p18 = @p18, @v18 = @v18 , @p19 = @p19, @v19 = @v19 ,  @p20 = @p20, @v20 = @v20 , @p21 = @p21, @v21
53 = @v21 , @p22 = @p22, @v22 = @v22 , @p23 = @p23, @v23 = @v23 , @p24 = @p24, @v24 = @v24 , @p25 = @p25, @v25 = @v25 , @p26 = @p26, @v26 = @v26 , @p27 =
54 @p27, @v27 = @v27 , @p28 = @p28, @v28 = @v28 , @p29 = @p29, @v29 = @v29 , @p30 = @p30, @v30 = @v30 , @p31 = @p31, @v31 = @v31,  @Priority = 12,    @checkForExisting
55 =1  end else  begin select @MessageString = N'Job ' + @Name + N' not started, Time exceeded : ' + @StopTimeFull exec QBM_PJournal @MessageString, @@PROCID
56, 'W', @DebugLevel end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R exec QBM_PSessionContextSet
57 'XUser', @XUser_R declare @Rethrow varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende:  exec QBM_PSessionContextSet
58 'GenProcID', @GenProcID_R exec QBM_PSessionContextSet 'XUser', @XUser_R return end 
59

Module relation graph

Loading module relation graph…

Source-derived context

Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.

provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:26.107

creates object-layer jobs via QBM_PJobCreate* fires object-layer event via HOFireEvent uses session context values has TRY/CATCH error handling

Summary: calls QBM_PJournal, QBM_PSessionContextSet, QBM_PProcessCreate, QBM_PJobCreate_HOFireEvent_B, QBM_PSessionErrorAdd; writes INSERT into; reads/joins JobAutoStart, QBMEvent, dialogtable, DialogSchedule, QBM_FCVStringToList_i; uses config Common\ProcessState; uses session context XUser, GenProcID

Declared parameters

ParameterTypeDirection
@uid_JobAutoStartvarchar(38)input

DML targets

INSERT into

Config/session

Config: Common\ProcessState

Session: XUser GenProcID

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #LDS #Starting

Variables: @uid_JobAutoStart @BasisObjectType @UID_DialogTable @WhereClause @Name @Event @ScheduleName @MessageString @GenProcID @XUser @procid @StopTimeChar @StartTimeChar @StopTime @StopTimeFull @jetzt @ParameterList @p @v @p4 @v4 @p5 @v5 @p6 @v6 @p7 @v7 @p8 @v8 @p9 @v9 @p10 @v10 @p11 @v11 @p12 @v12 @p13 @v13 @p14

Referenced by / reverse dependencies

Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.

Referencing objectRelationEvidence
dbo.QBM_ZScheduleStartJobSQL expression dependencyOBJECT_OR_COLUMN
dbo.QBM_ZScheduleStartJobsource text referencehas TRY/CATCH error handling