Batch to catch spesific Case ID
-
- Posts: 32
- Joined: December 4th, 2016, 10:57 pm
Batch to catch spesific Case ID
Greeting All
Anyone can give me example of batch to catch only particular case base on case ID (as unique one) ?
My case id field name : Case_ID. I want to catch some cases for only some specific cases.
Ex Case_id 10,13,12,100 on output.dat
Your help very appreciate.
Thank you
Anyone can give me example of batch to catch only particular case base on case ID (as unique one) ?
My case id field name : Case_ID. I want to catch some cases for only some specific cases.
Ex Case_id 10,13,12,100 on output.dat
Your help very appreciate.
Thank you
Re: Batch to catch spesific Case ID
What do you mean by "catch"? Do you want to print out those cases? save them to the output file?
-
- Posts: 32
- Joined: December 4th, 2016, 10:57 pm
Re: Batch to catch spesific Case ID
Hi Josh
i mean I want to get the output of entry result with particular case Id, all fields within dictionary.
So if I have 100 cases on output.txt with case _I'd 1 - 100.:
What if I want only cases with case_id: ex 1 , 3, 10,50,97. The output on entry mode only that case.
Thanks Josh
i mean I want to get the output of entry result with particular case Id, all fields within dictionary.
So if I have 100 cases on output.txt with case _I'd 1 - 100.:
What if I want only cases with case_id: ex 1 , 3, 10,50,97. The output on entry mode only that case.
Thanks Josh
Re: Batch to catch spesific Case ID
You can use the skip case command to skip the cases that you don't want:
Code: Select all
if not case_id in 1, 3, 10, 50, 97 then
skip case;
endif;
-
- Posts: 32
- Joined: December 4th, 2016, 10:57 pm
Re: Batch to catch spesific Case ID
Brother Josh
Thx you very much. Can this such logic I add in batch to:
- delete the case
- Separate the case by other fields like demographic field ex city, age etc
So the logic would be like : if city in 1, 2 then skip case
Thx and very appreciate
Thx you very much. Can this such logic I add in batch to:
- delete the case
- Separate the case by other fields like demographic field ex city, age etc
So the logic would be like : if city in 1, 2 then skip case
Thx and very appreciate
-
- Posts: 32
- Joined: December 4th, 2016, 10:57 pm
Re: Batch to catch spesific Case ID
Brother Josh
>>You can use the skip case command to skip the cases that you don't want:
=============
if not case_id in 1, 3, 10, 50, 97 then skip case;
endif;
==============
Yes this logic perfectly well.
What if I want only case_id 1, 3, 10, 50, 97 ?
Thx
>>You can use the skip case command to skip the cases that you don't want:
=============
if not case_id in 1, 3, 10, 50, 97 then skip case;
endif;
==============
Yes this logic perfectly well.
What if I want only case_id 1, 3, 10, 50, 97 ?
Thx
Re: Batch to catch spesific Case ID
Remove the "not"
-
- Posts: 32
- Joined: December 4th, 2016, 10:57 pm
Re: Batch to catch spesific Case ID
Brother Josh
I have tried, but its not work.
I have attached the zip file. Would you please see it.
//In DATA_ALL.DAT has 10 cases with ID (RESP_ID): 1,2,3,10,22,99,97,56,21,50
//I want only this ID : 1, 3, 10, 50, 97 DATA_OUTPUT.dat
I have tried, but its not work.
I have attached the zip file. Would you please see it.
//In DATA_ALL.DAT has 10 cases with ID (RESP_ID): 1,2,3,10,22,99,97,56,21,50
//I want only this ID : 1, 3, 10, 50, 97 DATA_OUTPUT.dat
- Attachments
-
- ABC.zip
- (9.88 KiB) Downloaded 382 times
-
- Posts: 1803
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Batch to catch spesific Case ID
You put that code in the application-level PROC, which gets run only one for your whole run. You need to put the code in a PROC that gets run for every case. See below:
PROC ABC_QUEST
preproc
if not RESP_ID in 1, 3, 10, 50, 97 then
skip case;
endif;
preproc
if not RESP_ID in 1, 3, 10, 50, 97 then
skip case;
endif;
-
- Posts: 32
- Joined: December 4th, 2016, 10:57 pm
Re: Batch to catch spesific Case ID
Ahaa. Now it is worked. Thx my brother.
One question about this: in batch :
if I have a skewed data, I mean the data is unclean yet, ex bad record because off wrongly key in ; will effect to the output batch? thanx Gregory , .
One question about this: in batch :
if I have a skewed data, I mean the data is unclean yet, ex bad record because off wrongly key in ; will effect to the output batch? thanx Gregory , .