Disable a test socket during execution (Batch Mode)
We are running a Batch Model with Batch Synchronization. I am wondering if it is at all possible to totally disable one or more of the test socket during execution. I know that the opening screen allows you to choose which sockets are active, but in the event that something goes astray like the RS-485 communication is non-responsive, I would like to disable one or more at anytime during the test. Thank you in advance for any ideas you come up with.
Regards
Scott
Environment: TestStand 2010
Solved!
Go to Solution.
I am not aware of how to stop a socket which is already running and facing an error midway.
But this setting will ensure that the socket is disabled for the next runs.
1) Override the preBatch callback.
2) Call this statement in the current executing thread to stop the socket from next run. ( precondition = on error)
RunState.Caller.Parameters.ModelData.TestSockets[RunState.TestSockets.MyIndex].Disabled=True
Similar Messages
-
Getting Test Socket status in batch mode
Hi!
I´m running multiple UUT´s in the standard batch model.
I need to find a way to get a teststep running in one test socket to know the current status (passed, failed, terminated etc.) for all other test sockets.
Is this possible?
One solution might be to have each test socket to store the context pointer (CAObjHandle seqContextCVI when using LabWindows) to an array at the beginning of each test socket and then access each others test socket context. This way it might be possible if there is a context value or string to look for. Is this a good idea at all or are there better solutions?
/ RoineHi,
this would in fact be better in the TestStand discussion group.
However, there are several options available to you.
The first is to use queues. They're in the synchronisation menu. That way you can make sure you don't write to the same variable from two different threads before a third one has read it.
The second option is to store the seqContext pointer, however, this pointer is only a reference to where you currently are, i.e. if you start flying around launching other threads, then your seqContext might not be correct at that time
The third option is the hardest to implement. In the batch process model, the execution handles that are involved in the launching of Test UUT -- Test Socket Entry Point, are stored in a FileGlobal to the processmodel : FileGlobals->TestSocketExecutions. However, when you're in your sequence file, and you look at Runstate.Root.FileGlobals.TestSocketExecutions, it's empty. This is because that array hasn't been set as shared. So the top level Test UUT's can see it, but since we're launching executions, we cannot see it. So in the processmodel, you have to find the fileglobals, find the TestSocketExecutions, go to it's properties, and then hit the advanced button. Go down that list, and look for the property flag for shared at run-time.
That way, Runstate.Root.FileGlobals.TestSocketExecutions will have an array of execution reference handles.
From this handle, there's a method of the execution object to get a thread. This is where it's difficult, since you might not know which thread you're trying to get hold of. Once you have one of those, you can get the seqeuence context for that thread, and then you can (get using that as a property object), the number, string etc, from the other thread.
The last option is simply to share (as in option 3, but in the client sequence file) a variable, however, you can easily run into the problem you see in option 1 since the resource is like using station globals. There's no marshalling system to make sure things are written to before they're read from.
Hope that helps
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer -
Loading test steps during execution
Hello,
I am using the operator interface from the example. I have modified to suit my application. I run the test using the Single Pass entry point. I have 46 steps in my main sequence. When I press the Single pass execution, Initially it takes a lot of time (I think it compiles all the steps) to start the actual execution.
Why does it take long time to start execution? Is it possible to configure test stand such that it compiles each step as and when it reaches it?
Regards
GopalHey Gopal,
As Ray said, TestStand does not actually compile your modules. That being said, most likely this load time that you're seeing at the beginning of execution is due to your load options set to load the module when execution begins. If you go to the step properties, notice under "Run Options" there's a "Load Option" drop-down. You can look at the help for a description of this property, but in general this setting refers to when the module is loaded into memory. For time-critical tests, you would want to load either at the beginning of execution or when the sequence file is loaded (as this would extract the load time from the step so that the step could be executed quickly); this is especially important if you are looping on a particular step. There is an option to "Load dynamically" as well. With this option, you would see a slight delay before each step during which its module is loaded - rather than a longer delay at the beginning (in which all step modules are loaded).
Note that the default is "Preload when execution begins"; that is why I'm guessing that this is responsible for the delay that you're seeing.
Thanks,
Andy McRorie
NI R&D -
Disabling Test Sockets in SinglePass.
I am new to TestStand and LabWindows and am trying to figure out how to
pass serial number and socket status to a sequence file from a
LabWindows application. I have an application that successfully opens a
sequence file and executes it via the TestStand API. I can probably
figure out a way to pass serial numbers and socket status via the
Parameters.ModelData.TestSockets[x] sub property. The problem is that
it appears that SinglePass is waiting for all the test sockets to
complete whether they are enabled or not. It seems to never get out of
the step "Wait For TestSockets" under the SinglePass entry point.
Is there an easy way to do this? I really don't want to use the
TestUUT's entry point. Should I just customize the SinglePass entry
point with logic in the "Wait For TestSockets" loop or is there a
much easier way to do this?
Thanks,
JohnHello John,
To answer your first question, generally to pass information
back and forth between an operator interface and a sequence you should have
your sequence post a UIMessage, and your operator interface reads the message
and responds. If you look at the
PostUIMessage help you see the following definition:
Thread.PostUIMessageEx ( eventCode, numericDataParam,
stringDataParam, activeXDataParam, synchronous)
You can pass data with the message, and since the
activeXDataParam is passed by reference you can update the value and use it in
your sequence file. This is how you
could send a serial number between the Operator interface and the sequence
file.
Next, you mention that you are having problems with test
sockets waiting for disabled test sockets. I think this is probably due to
how the disabled flag is being set. We
have been able to disable a test socket if the user does not type in a serial
number (in the batch process), by modifying the batchuutdlg.c in the
modelsupport2.prj. We first declared a
variable static char string[200]; and in the goCallback we added the following
instead of the statement at line 932.
GetCtrlVal(childPanel,
panelData->testSocketDataArray[i].ctrls[kTSCtrl_SerialNum], string);
if (!strcmp(string, ""))
tsErrChkMsgPopup(
TS_PropertySetValBoolean (panelData->testSocketDataArray[i].testSocket,
&errorInfo, TEST_SOCKET_DISABLED, 0, (VBOOL)(VTRUE)));
I hope you find this example helpful.
Regards,
Jesse O
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D -
How to change Number of test socket in Model option during run-time
I wanna be able to change the the number of test sockets(in the Model Options menu) during runtime. I have overriden the Prebatch callback and used my own instead. I have a LabView program in my Prebatch where I would select the test script each time before running the batch. I wann be able to also modify the number of test sockets each time before I run the batch again. I tried setting the "Parameters.ModelData.ModelOptions.NumTestSockets" from the Labview program which is in my Prebatch before running each batch, but get into errors. Please help?
Hello Kumar,
The Batch process model shipped with TestStand does not handle this scenario, but you can still do this. Attached is a sequence file that utilizes the Batch Model's ProcessCleanup callback to reset the next execution point. It still uses the method of setting the Parameters.ModelOptions.NumTestSockets variable in the PreBatch callback. The change I added was three steps to a different callback (the ProcessCleanup callback):
Message Popup - prompts Yes or No to continue testing with a new batch size.
Statement 1 - based on the response to the message popup (via precondition), resets the Batch Model's next step to be executed and the ContinueTesting flag:
RunState.Root.RunState.StepGroup = "Setup"
RunState.Root.RunState.NextStepIndex = 0
RunState.Root.Locals.ModelData.ContinueTesting = True
Statement 2 - based on the response to the message popup (via precondition), loops to reset each TestSocket's ContinueTesting flag:
RunState.Root.Locals.ModelData.TestSockets[RunState.LoopIndex].ContinueTesting = True
These two statement steps force the next step to be executed in the Batch Process Model to be the first step in the "Setup" step group, and reset all necessary flags for the batch itself and the individual TestSockets. I discovered the flags that had to be reset by trial-and-error (that was the time-consuming part).
You can run continuous batches of the same size you first chose (for as long as you like), but when stop the batch execution this new message popup will prompt (yes/no) whether you want to continue testing with a new batch size. If no, then processing terminates. If yes, then the next two statement steps are run and execution resumes back at the beginning of the Batch Process Model's Setup step group. This forces the ModelOptions callback to be executed again, so your VI (in my example here it's just a Message Popop) can then set NumTestSockets appropriately.
Thanks for contacting National Instruments!
David Mc.
NI Applications Engineering
Attachments:
kumar.seq 27 KB -
Get individual test socket execution reference
Hi All,
Versions used: LV 2014, TS 2014, Parallel model with each DUT independently tested, Custom OI built as per need
I have an application where at most 8 test sockets can run at a time, independent of each other. Each DUT must be independently started, paused or aborted from LabVIEW custom OI. How do I get the individual test socket execution reference so that I can send the pause/abort command from LabVIEW Operator Interface? I tried using the FileGlobals.TestSocketExecutions array from the Parallel model (by setting "Shared at Run-time" flag), but these references seems to be changing constantly.
What I want to do is have a unique execution reference for each testsocket that can be obtained when the DUT is started/ even when the testsocket is spawned, store that reference in my LabVIEW code and use this execution reference when I want to pause/abort the testing in that particular socket from LabVIEW OI.
Thanks in advance,
SaranyaSaranya,
I assume (hope) that you are using the "Test UUTs" execution entry point in the parallel model. So it seems to me that you already disabled the "UUT Info Dialog", otherwise you would have blocking functionality which requires user interaction on the UI dialog.
Please look into the Parallel Model as well as the modelsupport2.dll sources (available as CVI project in TS model folder) how the synchronization is done there.
Hint: There is a queue....
Also, i hope that you mixed abort with termination. I highly recommend you to never abort executions.
Norbert -
ORA-04088: error during execution of trigger
Error Description :
We have more than 100 of records in a csv file which we are processing through a script. At the first execution let
say it generates trigger exception for five records ... when I execute the script second time those five records
are not throwing any exception but may be some other records. But consecutive trigger exception is not happening for any record . If a particular record is throwing exception at first attempt then in the second attempts it's not throwing the trigger exception.
Input file
PROPRTY_ID,NAME,OLD STREET,CITY,STATE,ZIP,NEW STREET,NEW CITY,NEW STATE,NEW ZIP
88527091,SAM PAUL SUMMU ,1061 XYZ,CITY1,ST,95626,5512 XX YY ZZ,TOWN,PA,12345-9812
Error :
88527091,SAM PAUL SUMMU ,1061 XYZ,CITY1,ST,95626,5512 XX YY ZZ,TOWN,PA,12345-9812 - PROPERTY Update Error : ORA-00001: unique constraint (PROD.PK_AUDIT_LOG) violated
ORA-06512: at "PROD.PROPERTY_AUD", line 159
ORA-04088: error during execution of trigger 'PROD.PROPERTY_AUD'
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> desc property
Name Null? Type
PROPERTY_ID NOT NULL NUMBER(20)
TYPE_CODE VARCHAR2(10)
TYPE_PREFIX VARCHAR2(10)
DWELLING_TYPE_CODE NOT NULL VARCHAR2(10)
DWELLING_TYPE_PREFIX NOT NULL VARCHAR2(10)
STREET_NUMBER VARCHAR2(25)
STREET_DIRECTION CHAR(2)
STREET_NAME NOT NULL VARCHAR2(45)
UNIT_NUMBER VARCHAR2(15)
CITY_CODE VARCHAR2(10)
STATE NOT NULL CHAR(2)
ZIP_CODE VARCHAR2(10)
UNIT_TYPE VARCHAR2(10)
UNIT_PREFIX VARCHAR2(10)
COUNTY_CODE VARCHAR2(10)
COUNTRY_CODE NOT NULL VARCHAR2(10)
SQUARE_FEET NUMBER(6)
NUMBER_MOTHER_LAW_UNITS NUMBER(6)
YEAR_BUILT DATE
PROPERTY_VALUE NUMBER(12)
ZIP_PLUS_4 VARCHAR2(4)
SFI_REQ_FLAG CHAR(1)
LAST_MODIFIED NOT NULL DATE
LAST_MODIFIED_BY VARCHAR2(31)
STANDARDIZED_STATUS VARCHAR2(10)
STANDARDIZED_DESC VARCHAR2(200)
SQL> desc audit_log
Name Null? Type
SEQ_NO NOT NULL NUMBER(20)
TABLE_NAME VARCHAR2(31)
USER_STAMP VARCHAR2(31)
TIME_STAMP DATE
TRAN_CODE CHAR(2)
RECORD1 VARCHAR2(2000)
RECORD2 VARCHAR2(2000)
FLAG_FLD CHAR(1)
SFI_FLAG_FLD CHAR(1)
ERROR_NUMBER NUMBER
Update Query which is getting executed :
UPDATE PROPERTY
SET DWELLING_TYPE_CODE = 'SFR',
DWELLING_TYPE_PREFIX = 'DWELLING',
STREET_NUMBER = NULL,
STREET_DIRECTION = NULL,
STREET_NAME = ln_new_street_name, -- <From input file>
UNIT_NUMBER = NULL,
CITY_CODE = ln_city_code, -- <From other Table>
STATE = ln_new_state, -- <From input file>
ZIP_CODE = ln_new_zip_code,
UNIT_TYPE = NULL,
UNIT_PREFIX = NULL,
COUNTY_CODE = ln_county_code, -- <From Other table>
COUNTRY_CODE = 1,
ZIP_PLUS_4 = ln_zip_plus_4 -- <From Input file>
WHERE PROPERTY_ID = ln_property_id; -- <From Other table>
*NOTE :* Property.LAST_MODIFIED field is auto populate through other trigger. It does not causing any problem.
This might be helpful :
SQL> select OWNER, CONSTRAINT_NAME, TABLE_NAME,COLUMN_NAME from dba_cons_columns where CONSTRAINT_NAME='PK_AUDIT_LOG';
OWNER CONSTRAINT_NAME TABLE_NAME COLUMN_NAME
PROD PK_AUDIT_LOG AUDIT_LOG SEQ_NO
PROD_ARCH PK_AUDIT_LOG AUDIT_LOG SEQ_NO
SQL> select SEQ_NO, trim(RECORD1), trim(RECORD2),TIME_STAMP
from audit_log where RECORD1 like '%BUTTE%' order by TIME_STAMP;
SEQ_NO
1675677212
TRIM(RECORD1)
00000000000031814095...SFR .DWELLING ...5512 BUTTE VIEW CT ..15532
.CA.95765 ...1377 .1 .....5000..20100922.SUSMSAHA ..
TRIM(RECORD2)
00000000000031814095...SFR .DWELLING ...5512 BUTTE VIEW CT ..15532
.CA.95765 ...1377 .1 .....5000..20100922.SUSMSAHA ..
TIME_STAMP
22-sep-2010
Trigger Body which is fired and throwing the exception :
create or replace trigger PROPERTY_AUD
before insert or update on PROPERTY
for each row
declare
rec1 varchar2(2000);
rec2 varchar2(2000);
tcode char(1);
ln_seq_id NUMBER:=Null;
ls_sql VARCHAR2(2000):=Null;
begin
select temp_audit_seq.nextval into ln_seq_id from dual;
rec1 := null;
rec2 := null;
if user = 'NONREP_USER' then
return;
end if;
if (dbms_reputil.from_remote = FALSE) then
:NEW.last_modified := sysdate;
if (user = 'SALESFORCE_SYNC') then
:new.last_modified_by := NVL(:new.last_modified_by,USER);
else
:new.last_modified_by := user;
end if;
end if;
if inserting then
rec1 :=
LPAD(:new.PROPERTY_ID, 20, '0' ) || '.' ||
RPAD(:new.TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:new.TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:new.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.STREET_NUMBER, 25, ' ' ) || '.' ||
RPAD(:new.STREET_DIRECTION, 2, ' ' ) || '.' ||
RPAD(:new.STREET_NAME, 45, ' ' ) || '.' ||
RPAD(:new.UNIT_NUMBER, 15, ' ' ) || '.' ||
RPAD(:new.CITY_CODE, 10, ' ' ) || '.' ||
RPAD(:new.STATE, 2, ' ' ) || '.' ||
RPAD(:new.ZIP_CODE, 10, ' ' ) || '.' ||
RPAD(:new.UNIT_TYPE, 10, ' ' ) || '.' ||
RPAD(:new.UNIT_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.COUNTY_CODE, 10, ' ' ) || '.' ||
RPAD(:new.COUNTRY_CODE, 10, ' ' ) || '.' ||
LPAD(:new.SQUARE_FEET, 6, '0' ) || '.' ||
LPAD(:new.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
LPAD(:new.PROPERTY_VALUE, 12, '0' ) || '.' ||
RPAD(:new.ZIP_PLUS_4, 4, ' ' ) || '.' ||
RPAD(:new.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
RPAD(:new.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
RPAD(:new.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
RPAD(:new.STANDARDIZED_DESC, 200, ' ' );
tcode := 'I';
elsif deleting then
rec1 :=
LPAD(:new.PROPERTY_ID, 20, '0' ) || '.' ||
RPAD(:new.TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:new.TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:new.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.STREET_NUMBER, 25, ' ' ) || '.' ||
RPAD(:new.STREET_DIRECTION, 2, ' ' ) || '.' ||
RPAD(:new.STREET_NAME, 45, ' ' ) || '.' ||
RPAD(:new.UNIT_NUMBER, 15, ' ' ) || '.' ||
RPAD(:new.CITY_CODE, 10, ' ' ) || '.' ||
RPAD(:new.STATE, 2, ' ' ) || '.' ||
RPAD(:new.ZIP_CODE, 10, ' ' ) || '.' ||
RPAD(:new.UNIT_TYPE, 10, ' ' ) || '.' ||
RPAD(:new.UNIT_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.COUNTY_CODE, 10, ' ' ) || '.' ||
RPAD(:new.COUNTRY_CODE, 10, ' ' ) || '.' ||
LPAD(:new.SQUARE_FEET, 6, '0' ) || '.' ||
LPAD(:new.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
LPAD(:new.PROPERTY_VALUE, 12, '0' ) || '.' ||
RPAD(:new.ZIP_PLUS_4, 4, ' ' ) || '.' ||
RPAD(:new.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
RPAD(:new.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
RPAD(:new.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
RPAD(:new.STANDARDIZED_DESC, 200, ' ' );
tcode := 'D';
else
rec1 :=
LPAD(:old.PROPERTY_ID, 20, '0' ) || '.' ||
RPAD(:old.TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:old.TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:old.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:old.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:old.STREET_NUMBER, 25, ' ' ) || '.' ||
RPAD(:old.STREET_DIRECTION, 2, ' ' ) || '.' ||
RPAD(:old.STREET_NAME, 45, ' ' ) || '.' ||
RPAD(:old.UNIT_NUMBER, 15, ' ' ) || '.' ||
RPAD(:old.CITY_CODE, 10, ' ' ) || '.' ||
RPAD(:old.STATE, 2, ' ' ) || '.' ||
RPAD(:old.ZIP_CODE, 10, ' ' ) || '.' ||
RPAD(:old.UNIT_TYPE, 10, ' ' ) || '.' ||
RPAD(:old.UNIT_PREFIX, 10, ' ' ) || '.' ||
RPAD(:old.COUNTY_CODE, 10, ' ' ) || '.' ||
RPAD(:old.COUNTRY_CODE, 10, ' ' ) || '.' ||
LPAD(:old.SQUARE_FEET, 6, '0' ) || '.' ||
LPAD(:old.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
LPAD(:old.PROPERTY_VALUE, 12, '0' ) || '.' ||
RPAD(:old.ZIP_PLUS_4, 4, ' ' ) || '.' ||
RPAD(:old.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
RPAD(:old.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
RPAD(:old.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
RPAD(:old.STANDARDIZED_DESC, 200, ' ' );
rec2 :=
LPAD(:new.PROPERTY_ID, 20, '0' ) || '.' ||
RPAD(:new.TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:new.TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.DWELLING_TYPE_CODE, 10, ' ' ) || '.' ||
RPAD(:new.DWELLING_TYPE_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.STREET_NUMBER, 25, ' ' ) || '.' ||
RPAD(:new.STREET_DIRECTION, 2, ' ' ) || '.' ||
RPAD(:new.STREET_NAME, 45, ' ' ) || '.' ||
RPAD(:new.UNIT_NUMBER, 15, ' ' ) || '.' ||
RPAD(:new.CITY_CODE, 10, ' ' ) || '.' ||
RPAD(:new.STATE, 2, ' ' ) || '.' ||
RPAD(:new.ZIP_CODE, 10, ' ' ) || '.' ||
RPAD(:new.UNIT_TYPE, 10, ' ' ) || '.' ||
RPAD(:new.UNIT_PREFIX, 10, ' ' ) || '.' ||
RPAD(:new.COUNTY_CODE, 10, ' ' ) || '.' ||
RPAD(:new.COUNTRY_CODE, 10, ' ' ) || '.' ||
LPAD(:new.SQUARE_FEET, 6, '0' ) || '.' ||
LPAD(:new.NUMBER_MOTHER_LAW_UNITS, 6, '0' ) || '.' ||
TO_CHAR(:new.YEAR_BUILT, 'YYYYMMDD') || '.' ||
LPAD(:new.PROPERTY_VALUE, 12, '0' ) || '.' ||
RPAD(:new.ZIP_PLUS_4, 4, ' ' ) || '.' ||
RPAD(:new.SFI_REQ_FLAG, 1, ' ' ) || '.' ||
TO_CHAR(:new.LAST_MODIFIED, 'YYYYMMDD') || '.' ||
RPAD(:new.LAST_MODIFIED_BY, 31, ' ' ) || '.' ||
RPAD(:new.STANDARDIZED_STATUS, 10, ' ' ) || '.' ||
RPAD(:new.STANDARDIZED_DESC, 200, ' ' );
tcode := 'U';
end if;
ls_sql :='
INSERT INTO AUDIT_LOG
( seq_no,
table_name,
user_stamp,
time_stamp,
tran_code,
record1,
record2)
VALUES
( :id,
:s_table_name,
:s_user_name,
:d_sysdate,
:s_tcode,
:s_rec1,
:s_rec2
EXECUTE IMMEDIATE ls_sql
USING ln_seq_id,
'PROPERTY',
user,
sysdate,
tcode,
rec1,
rec2;
end;
Your suggestion is highly appreciated ..
Edited by: Bipul on Sep 23, 2010 12:40 AMTEMP_AUDIT_SEQ generates number with the increment of +1
Although there seems other sequence populating the AUDIT_LOG table through a different sequence with the increment of +10. So till now there are already 1179 different numbers residing in audit_log.seq_no and yet to be generated by the TEMP_AUDIT_SEQ sequence. I will look into more details.
SQL> select max(seq_no) from audit_log;
MAX(SEQ_NO)
1675689121
SQL> select TEMP_AUDIT_SEQ.nextval from dual;
NEXTVAL
1675677285
SQL> select count(*) From audit_log where seq_no>1675677285;
COUNT(*)
1179
SQL> select count(*) from audit_log where seq_no>1675677283 and mod(seq_no,2)=1;
COUNT(*)
1179
SQL> select seq_no from audit_log where seq_no>1675677283 and mod(seq_no,2)=1 and rownum<12;
SEQ_NO
1675677291
1675677301
1675677311
1675677321
1675677331
1675677341
1675677351
1675677361
1675677371
1675677381
1675677391
11 rows selected.
Thank you Lee and Herald ten Dam ... -
Photoshop CS3 Actions Batch mode bug?
I posted this in the Mac forum but received no responses after a couple of days, so I am trying it here.
Photoshop CS3 Actions seem to have a bug such that when used in Automate > Batch mode it will use the name of the first file opened in the batch session for every file processed in that session. Since that name is used in Save step, this means having to deal with the "File Already Exist" dialog for every file in the batch because it is attempting to save at the designated location with the same file name. If the continue option is chosen each time, the final result is one file with the first opened file name, but with the contents of the last processed file.
To confirm that this is a problem particular to the opening step, I have disabled all processing steps as well as the saving step by toggling them in the Actions panel. I then ran the action in batch mode on a folder containing 4 files. This resulted in 4 opened files all with the same name but different image content.
This was with the "Override 'Open' Action Commands" checked/not checked, and the "Suppress File Open Options Dialogs" checked/not checked. The problem described also occurs when using a Droplet.
By comparison, Photoshop CS exhibits the expected behavior: when an action is used in batch mode to process an entire folder of files, the name of each file is retained after opening and used after processing in the save or export step.
The above described behavior of CS3 is a change acquired along the way to the CS3 version (I do not have the CS2 version to test). But more importantly, can someone please report if the CS4 version behaves as I described for CS3, or if it has been returned to the CS behavior?
OS X 10.4.11
G4 800 MHz 2 MB L3/processor 1.25 GB SDRAM
Is this a known bug?
AlHello Miguel,
I was going to come back to post some of my findings, one of which relates to your staement:
"- The open command created by Photoshop 6 doesn't keep the file's name, it is a much simple open command, and so it opens the file with the own file's name."
In my case I found that my CS version of the "same" action worked, while the CS3 version failed, precisely because the earlier one records less detail for the open step.
My need is to convert dozens of Quark pdf files to GIF and JPEG files for the web. What I found after several days of testing is that it is best to record the opening step in CS3 NOT using a pdf file, so that the "Open As Generic Pdf with 'Name____' " would not be coded into the opening step. Instead I recorded the whole action using a PSD file. Then I can proceed to run it in Batch mode choosing a folder of Quark pdf files as the source location with "Override 'Open' Action Commands" checked, and the "Suppress File Open Options Dialogs" checked, and it opens all the pdf files just fine in some background process, not getting stuck in the details of the file name, and proceeds to cary out the flattening, saving, and closing steps to my chosen target location and uses the finder file name of each pdf files in the source folder to save a filename.ext in the Target folder.
Contrary to what I stated in my original post, "Override 'Open' Action Commands" checked/not checked does indeed make a difference. If it is not checked, the files do open in batch mode, but the other steps are not performed. There is much more about this that I would like to know, and this may not be a general solution for all types of files that a user may wish to process in batch mode, but it works for my case. The main trick is to use as simple an opening step as possible when recording the action, and then letting Photoshop use whatever background process it requires to open a particular file type. I tested this by manually saving a pdf file to each of the twenty some odd formats available in the save as dialog to a Source folder, and then proceeded to batch process that folder with the action described above, and it worked for all except one.
So while there may not be a bug involved in this problem, there certainly is a lack of documentation about how the "improvements" in the opening step in newer versions of Photoshop affect using Actions in Batch mode.
Please comment if you can further explain any of the reported results. In particular, what is the situation in CS4?
Thanks,
Al -
Sharing a communication object between test sockets
Hi everyone, I am having some trouble using teststand in batch mode as it is my first time doing so. Here is my question:
I am creating a test sequence that uses multiple test sockets. I am using a switching matrix that is controlled over ethernet to allow me to connect different loads to the hardware under test. I only have one load, but I have several different devices that need to connect to that load for the tests to be run, and they can only be connected one at a time.
My approach was to initilaze the connection to the switching matrix and store the resulting object reference as a global variable, which allows me to send commands to the switch matrix from any sub-sequence. I then created another sub sequence for the load tests called "External Load Tests". In this step, the load is connected to the hardware via the switching matrix, and tests are run. I am using batch mode, so I put a lock on the "External Load Tests" sub sequence so that only one thread can enter at a time.
This sequence works if there is only one active test socket. If there is more that one, the first thread will get inside the external "External Load Tests" step and try to send a command to the switch matrix using the object reference that I mentioned. However, when this happens, the step hangs indefinitely until the other threads are manually stopped. It seams like the thread isnt being given access to the switch matrix object, becuase usually if there is an error the switch matrix driver throws an exception, but in this case it just hangs.
Any ideas on how I can fix this? I don't have a lot of experience with multi threading, so any advice would be greatly appreciated.
Thanks!For the batch model you could use a serialized batch synchronization section rather than a lock. A lock should also work though, it just doesn't guarantee that all threads get to the section before any of them continue and doesn't guarantee the order like batch synchronization does. Typically you should use all default settings for the batch model (other than perhaps number of sockets). Which setting did you change? The 'Default Batch Synchronization' setting? You should typically leave this as "Don't Synchronize". Setting this to Parallel makes it synchronize at every step which requires all sockets to get to each step before any of them to continue. This is not the behavior that people typically want. In most cases you should use the default of "Don't Synchronize" and then set synchronization manually in your sequence where you want it, either using the step synchronization settings, or the batch synchronization step types, or other synchronization step types such as locks.
Hope this helps,
-Doug -
How can I terminate ALL test sockets from API
I want to terminate all my test sockets (Batch model).
Manually I do it by "Debug -> Terminate All".
Is there any way to terminate all sockets through NI TestStand API Automation Server ?
I succecced to terminate only one socket (object class RunState.Execution), but I didn't find any way to terminate all test sockets.
Thank's to someone that will answer.Hi,
Yes, use Engine.TerminateAll
You will find reference to it in the TestStand Help
regards
Ray Farmer
Regards
Ray Farmer -
Outlook iCloud add in - data execution protection mode
I am using Windows 7 with MS Office 2010. This is a corporate laptop.
I want to integrate my view of the Apple Calendar with the Outlook calendar so I can see all personal and professional calendar events without integrating the two into a single calendar. I am able to initiate the integration, during which, the initial calendar is downloaded and all current scheduled items will appear in the Calendars window in Outlook. However, no updates will be pushed.
I went through a long series of trouble shooting activities to get the iCloud Outlook add-in properly set up as recommended on various Apple trouble shooting pages. Ultimately, I installed the lastest version of iCloud, reset all aspects of enabling it and all appears in order. That is, I can see the add in in the Outlook Add-Ins Center.
However, the situation has not changed. The reason why is, the Add-In has been disabled with the following message:
Add-In was disabled by the user after a Data Execution Prevention failure
Upon further investigation on the Microsoft site, it appears that the iCloud Add-In is somehow not compliant with the Data Execution Prevention mode. This mode is turned on in the Trust Center and it is strongly recommended that it not be turned off in order to protect the PC. According to the information on Microsoft, it was disabled after an error occured. However, I received no error messages during the enablement process.
I don't know where to look from here. Please help!I've conducted further research on this issue and found the following Microsoft article on DEP. According to this, the iCloud add-in is running executable code from pages marked by Windows as non-executable. In essence, this is the kind of behavior viruses exhibit and are, therefore, worth stopping.
Can someone tell me, are you experiencing this problem? Am I alone in this or are lots of people not protecting themselves from the very fundamental virus hole?
http://blogs.technet.com/b/office2010/archive/2010/02/04/data-excecution-prevent ion-in-office-2010.aspx -
PreparedStatement in batched mode gives Exception
Hi
I have a problem.
I am running PreparedStatement in batched mode, actually I am using Springs BatchSQLUpdate component.
Now i am creating a batch of about 10000 inserts / updates. However if any single of these inserts / updates fails, it gives exception with DataIntegrityViolation, BadSQLGrammer etc.
I am also maintaining a parallel cache of the values that I am using to bind the preparedstatements.
So for statement 1 in the batch, i know what values are being used.
My question is when the batch update fails, how can we identify which SQL statement, i mean which index in the batch caused the issue?
Please help me as I am stuck and need to build some robust exception handling for PreparedStatement batch loads.
NikiNiki-Nono wrote:
The insertPreparedStatements.get() in my code returns a BatchSqlUpdate object which has already been assigned a statement and also have passed the array of object values to it.
I have done this using batchSqlUpdate.update(objects); where objects is an array of values.
THe code block that I executes the flush(). This throws an exception. In some cases it is a BadSQLGrammerException for cases where we try to insert alphabets in integer columns or in some cases DataIntegrityViolation where the batch has 2 sets of values with same primary key.
The results array is null when i check the value in the catch block.
And the flush() does not proceed with execution of the complete batch in fact it aborts when even 1 statement fails.
I hope it is clearer now.
However, if all the statements go through, I have seen that the results array has correct values as to how many rows were updated / inserted.
Please let me know.OK, I really wasn't sure about what it did on flush, as there's no explicitly stated exception and nothing in the method description. The array will be null since it hasn't been set with the return value from flush since an exception was thrown.
From what I can tell this Spring class uses, under the hood, the batch functionality from JDBC. So the particular exceptions you;re getting will have started life as SQLExceptions...which themselves will be of the BatchSQLException I mention in my first post. I'm wondering if the Spring exceptions contain the SQLException. I would hope so, and I have a vague recollection that the original is wrapped so you should be able to do something along the lines of:
catch (DataAccessException ex)
SQLException ex = ex.getCause();
if (ex instanceof java.sql.BatchUpdateException)
// Get the info from here.
}Now, this is only a concept, and I haven't tested it or anything, but I would hope something along these lines should get you to the data you're after. -
I want my Test Sockets will run in loop
I want my Test Sockets will run in loop. I use BatchModel, sequential batch mode.
Now it works so:
process setup
main sequence of Socket 1...
main sequence of Socket 2...
main sequence of Socket N...
process cleanup
I want to do so:
process setup
loop 1
main sequence of Socket 1...
main sequence of Socket 2...
main sequence of Socket N...
loop 2
main sequence of Socket 1...
main sequence of Socket 2...
main sequence of Socket N...
loop N
main sequence of Socket 1...
main sequence of Socket 2...
main sequence of Socket N...
process cleanup
How can I do it ?Marta,
Try using the PreUUTLoop and PostUUTLoop callbacks instead of ProcessSetup and ProcessCleanup.
Allen P.
NI -
Issues during Component Batch Determination for Process Orders
Hi,
I am encountering a strange issue during component batch determination of process order.
1. During creation of process order, when I execute batch determination, systems does determination based on strategies we have set and when I click on Copy it gives an error
"Log cannot be saved: Object/subobject not specified"
Message no. BL201
*Diagnosis
Log save cancelled because at least one log contains no object or subobject.
Object and subobject are needed to classify application logs because there are several log types. Only a few logs are managed in main memory at runtime, so this classification is not needed.
If the logs are to be saved in the database, object/subobject must be specified for later retrieval.
Procedure for System Administration
Object/sub object can be passed when a log is created (function module BAL_LOG_CREATE) and changed with BAL_LOG_CHANGE.
The possible values for object and sub object must be configured in transaction SLG0.*
If I save the order with CRTD status and come back again in change mode and do determination, It works fine.
Again when the order is in REL status and do the determination, It gives the same error.
This happens only for a specific plant, In other plants batch determination works in all scenarios.
I checked for all plant related Config for batch determination and coudn't find any discrepancies.
Please advise how to resolve this issue. Thanks in advance for your help
Regards,
AheeshThere Is no direct solution for your requirement just try this work around.
While defining the batch determination search strategy for process order in COB1, there is one column Quantity proposal where you can attach the Routines (This is written in ABAB code ) make use of this, define New Routines with ABAB help to fulfill your requirement. Try this if found useful award full points.
Regards,
Ajay Nikte -
Help needed in consuming BTQueryAUI query in batch mode
Hi Friends,
I am trying to consume BTQueryAUI in a custom function module. I have a requirement where in when i receive a external ref nbr, i need to update the status of crm service request to completed. We have already built logic to store the external nbr info in AET field on Service request and enhance inbox search to take give the results accordingly. now when i try to consume the query service with standard query parameters in batch mode..its not working..
REPORT ZTEST_CSOCRM.
DATA : ob_oref TYPE REF TO zcl_im_z_badi_inbox_search,
C_ITEM_1O TYPE CRMT_AUI_MAP_ITEM_TYPE VALUE 'ONEORDER',
l_param1o_tab TYPE crmt_name_value_pair_tab,
is_name type standard table of CRMT_NAME_VALUE_PAIR,
wa_name like line of is_name,
l_sort_1o_tab TYPE crmtt_aui_sorting,
lv_result_1o TYPE REF TO cl_crm_bol_entity_col.
data QUERY_1O type ref to CL_CRM_BOL_QUERY_SERVICE.
CONSTANTS:
abap_true TYPE abap_bool VALUE 'X',
abap_false TYPE abap_bool VALUE ' '.
data: c_BTQueryAUI TYPE crmt_ext_obj_name
VALUE 'BTQueryAUI',
c_query1o TYPE crmt_ext_obj_name VALUE 'BTQueryAUI',
ob_query TYPE REF TO
cl_crm_bol_query_service,
ob_result TYPE REF TO if_bol_bo_col,
ob_core TYPE REF TO cl_crm_bol_core,
lr_aui_dq TYPE REF TO cl_crm_aui_advquery_service,
lr_aui type ref to cl_crm_aui_query_service.
wa_name-name = 'ASSIGNEDTYPE'.
wa_name-value = '0000'.
append wa_name to is_name.
wa_name-name = 'DATETYPE'.
wa_name-value = '0001'.
append wa_name to is_name.
wa_name-name = 'MAINCATEGORY'.
wa_name-value = 'ZBGW'.
append wa_name to is_name.
wa_name-name = 'SORTEDBY'.
wa_name-value = '0000'.
append wa_name to is_name.
wa_name-name = 'SORTEDBY2'.
wa_name-value = '0000'.
append wa_name to is_name.
wa_name-name = 'TIMEPERIOD'.
wa_name-value = '0000'.
append wa_name to is_name.
wa_name-name = 'ZZFLD000006'.
wa_name-value = '0000012345'.
append wa_name to is_name.
wa_name-name = 'DESCRIPTON'.
wa_name-value = '*test*'.
append wa_name to is_name.
l_param1o_tab = IS_NAME.
ob_core = cl_crm_bol_core=>get_instance( ).
ob_core->start_up( 'ALL' ).
TRY.
query_1o = cl_crm_bol_query_service=>get_instance( c_query1o ).
CATCH: cx_crm_unsupported_object.
ENDTRY.
query_1o->set_query_parameters( EXPORTING it_parameters = l_param1o_tab
iv_convert = abap_false ).
lv_result_1o ?= query_1o->get_query_result( ).
ob_query = cl_crm_bol_query_service=>get_instance( c_BTQueryAUI ).
ob_query->set_query_parameters( EXPORTING it_parameters = l_param1o_tab
iv_convert = abap_false ).
lv_result_1o ?= ob_query->get_query_result( ).Tried obtaining the output using SQL and the result is as follows:
SQL> WITH T AS
2 (
3 SELECT 1 COL1 FROM DUAL
4 UNION
5 SELECT 2 COL1 FROM DUAL
6 UNION
7 SELECT 3 COL1 FROM DUAL
8 UNION
9 SELECT 4 COL1 FROM DUAL
10 UNION
11 SELECT 5 COL1 FROM DUAL
12 UNION
13 SELECT 8 COL1 FROM DUAL
14 UNION
15 SELECT 9 COL1 FROM DUAL
16 UNION
17 SELECT 10 COL1 FROM DUAL
18 UNION
19 SELECT 13 COL1 FROM DUAL
20 UNION
21 SELECT 14 COL1 FROM DUAL
22 UNION
23 SELECT 15 COL1 FROM DUAL
24 UNION
25 SELECT 16 COL1 FROM DUAL
26 UNION
27 SELECT 23 COL1 FROM DUAL
28 UNION
29 SELECT 24 COL1 FROM DUAL
30 )
31 SELECT OUTPUT FROM
32 (
33 SELECT DECODE(COL3,NULL,COL1, COL2) || '-' || LEAD(DECODE(COL3,NULL,COL3, COL1)) OVER (ORDER BY DECODE(COL3,NULL,COL1, COL2)) OUTPUT FROM
34 (
35 SELECT COL1, LEAD(COL1) OVER (ORDER BY COL1) COL2, LAG(COL1) OVER (ORDER BY COL1) COL3 FROM T
36 )
37 WHERE
38 (COL2 - COL1 > 1 OR COL2 IS NULL OR COL3 IS NULL)
39 )
40 WHERE OUTPUT != '-';
OUTPUT
1-5
8-10
13-16
23-24
Maybe you are looking for
-
I recently changed from my old Iphone 5 to a new one. The Apple ID that comes up when signing into iCloud is my old Apple ID, yet the correct one is shown on iTunes and apps. I can't change the Apple ID to the correct one, and am unable to restore my
-
Azure Batch - What is the enumeration of OSFamily?
Hi there, I am looking through the Azure Batch example code: http://azure.microsoft.com/en-us/documentation/articles/batch-dotnet-get-started/ And I see: ICloudPool newPool = pm.CreatePool( PoolName, osFamily: "3", vmSize: "small", targetDedicated: N
-
SXPG_COMMAND_EXECUTE issue
Hello Experts, We have this issue in client server.One of the batch job is frequently failing while executing this function module SXPG_COMMAND_EXECUTE with error as command_not_found.This error occurs frequently on a particular application server bu
-
[SOLVED] Asus P8P67 Pro motherboard missing eth0
Hey everyone I'm setting up my new box and haven't got very far, this has to be the first time Arch hasn't automatically loaded the network driver on one of my boxes. As the title suggests, I have an Asus P8P67 Pro (Sandybridge) which has some intel
-
Applet not starting in web browser
I'm trying to get a "hello world" applet to work in a web page. I can compile it with javac and run the resulting clas with java just fine. System, Windows XP Pro SP1, Netscape 7.1, Java SDK J2RE1.4.2_05. Any help is greatly appreciated! Thanks, Mark