![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
without having a manually controlled external value set to test, is there a global property or something that can be tested to let the scripts control flow, even just whether or not to issue MsgBox statements? doug |
#3
| |||
| |||
|
|
So, you want to be able to tell if the dts package is being run interactively or by a scheduled job? So if it is interactively you can issue a message box, but if by a job, you don't want to issue the message box because there is no user intervention to get rid of the box? Is that correct? I don't know of a way off the top of my head, but you could use a global variable to do the check. Set the variable to one value if run by a job, or keep it set the to the default value if interactively run. But that conflicts somewhat with your requirement of "without having a manually controlled external value set to test", although, it wouldn't be external. Simon Worth doug wrote: without having a manually controlled external value set to test, is there a global property or something that can be tested to let the scripts control flow, even just whether or not to issue MsgBox statements? doug |
#4
| |||
| |||
|
|
I'm already setting global variables. The msg box is just a CYA display OF the global variables being set via INI file to anyone subsequently who runs it interactively to make sure they know what values were set the last time. doug "Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message news:ONTlIC7MFHA.568 (AT) TK2MSFTNGP09 (DOT) phx.gbl... So, you want to be able to tell if the dts package is being run interactively or by a scheduled job? So if it is interactively you can issue a message box, but if by a job, you don't want to issue the message box because there is no user intervention to get rid of the box? Is that correct? I don't know of a way off the top of my head, but you could use a global variable to do the check. Set the variable to one value if run by a job, or keep it set the to the default value if interactively run. But that conflicts somewhat with your requirement of "without having a manually controlled external value set to test", although, it wouldn't be external. Simon Worth doug wrote: without having a manually controlled external value set to test, is there a global property or something that can be tested to let the scripts control flow, even just whether or not to issue MsgBox statements? doug |
#5
| |||
| |||
|
|
right, so what I meant was, set a global variable if run by a job, and do a check in your code to see what the variable is set to. IF gvVariable = "Interactive" MSGBOX "some values" END IF Simon Worth doug wrote: I'm already setting global variables. The msg box is just a CYA display OF the global variables being set via INI file to anyone subsequently who runs it interactively to make sure they know what values were set the last time. doug "Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message news:ONTlIC7MFHA.568 (AT) TK2MSFTNGP09 (DOT) phx.gbl... So, you want to be able to tell if the dts package is being run interactively or by a scheduled job? So if it is interactively you can issue a message box, but if by a job, you don't want to issue the message box because there is no user intervention to get rid of the box? Is that correct? I don't know of a way off the top of my head, but you could use a global variable to do the check. Set the variable to one value if run by a job, or keep it set the to the default value if interactively run. But that conflicts somewhat with your requirement of "without having a manually controlled external value set to test", although, it wouldn't be external. Simon Worth doug wrote: without having a manually controlled external value set to test, is there a global property or something that can be tested to let the scripts control flow, even just whether or not to issue MsgBox statements? doug |
#6
| |||
| |||
|
|
That doesn't help me much. I'm looking for a system variable that knows. Like in VB you can check the unattended execution status variable App.unattendedapp. "Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message news:ubkEBsGNFHA.1176 (AT) TK2MSFTNGP12 (DOT) phx.gbl... right, so what I meant was, set a global variable if run by a job, and do a check in your code to see what the variable is set to. IF gvVariable = "Interactive" MSGBOX "some values" END IF Simon Worth doug wrote: I'm already setting global variables. The msg box is just a CYA display OF the global variables being set via INI file to anyone subsequently who runs it interactively to make sure they know what values were set the last time. doug "Simon Worth" <REMOVEFIRST_simon.worth (AT) gmail (DOT) com> wrote in message news:ONTlIC7MFHA.568 (AT) TK2MSFTNGP09 (DOT) phx.gbl... So, you want to be able to tell if the dts package is being run interactively or by a scheduled job? So if it is interactively you can issue a message box, but if by a job, you don't want to issue the message box because there is no user intervention to get rid of the box? Is that correct? I don't know of a way off the top of my head, but you could use a global variable to do the check. Set the variable to one value if run by a job, or keep it set the to the default value if interactively run. But that conflicts somewhat with your requirement of "without having a manually controlled external value set to test", although, it wouldn't be external. Simon Worth doug wrote: without having a manually controlled external value set to test, is there a global property or something that can be tested to let the scripts control flow, even just whether or not to issue MsgBox statements? doug |
![]() |
| Thread Tools | |
| Display Modes | |
| |