Identifying Active/Open Cases

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Identifying Active/Open Cases

DKUKEC
* After consulting N and Google (my friend), I have come up short.  I am trying to identiy cases (ids) that are "active" or open during a specific period of time.  In this case, October 1, 2009 and September 30, 2012.  Blank dates at the time of extract from the database indicate that the case is active or open.  Can anyone suggest any syntax to correct my sad syntax so it would include ID 6 & 7?

Thank you
Damir


** IDENTIFYING ACTIVE CASELOAD...
** DATE OF EXTRACT TODAY .

DATA LIST FREE/ ID (A2) STARTDATE (DATE11) ENDDATE (DATE11).
BEGIN DATA
01 04-JAN-2004 05-MAY-2005
02  05-FEB-2006 .
04  04-JUL-2003  06-DEC-2003
05  01-APR-2011 01-APR-2012
06  04-APR-2012 01-JUL-2013
07  30-SEP-2012 31-OCT-2013
08 18-NOV-2013 19-NOV-2013
END DATA.

IF STARTDATE LE DATE.DMY (30,09,2012) AND
      RANGE (ENDDATE, DATE.DMY (01,10,2009),DATE.DMY.(30,09,2012)) OR MISSING (ENDDATE) ACTIVE2=1 .
EXECUTE.

Reply | Threaded
Open this post in threaded view
|

Re: Identifying Active/Open Cases

David Marso
Administrator
The ENDDATE value are out of range for those 2 cases!

DKUKEC wrote
* After consulting N and Google (my friend), I have come up short.  I am trying to identiy cases (ids) that are "active" or open during a specific period of time.  In this case, October 1, 2009 and September 30, 2012.  Blank dates at the time of extract from the database indicate that the case is active or open.  Can anyone suggest any syntax to correct my sad syntax so it would include ID 6 & 7?

Thank you
Damir


** IDENTIFYING ACTIVE CASELOAD...
** DATE OF EXTRACT TODAY .

DATA LIST FREE/ ID (A2) STARTDATE (DATE11) ENDDATE (DATE11).
BEGIN DATA
01 04-JAN-2004 05-MAY-2005
02  05-FEB-2006 .
04  04-JUL-2003  06-DEC-2003
05  01-APR-2011 01-APR-2012
06  04-APR-2012 01-JUL-2013
07  30-SEP-2012 31-OCT-2013
08 18-NOV-2013 19-NOV-2013
END DATA.

IF STARTDATE LE DATE.DMY (30,09,2012) AND
      RANGE (ENDDATE, DATE.DMY (01,10,2009),DATE.DMY.(30,09,2012)) OR MISSING (ENDDATE) ACTIVE2=1 .
EXECUTE.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Identifying Active/Open Cases

Melissa Ives-3
Asking for
IF STARTDATE LE DATE.DMY (30,09,2012) AND ENDDATE GE DATE.DMY (01,10,2009).
  would include those two cases and still exclude #8

Logic: open before the end date and ended after the start date.

Melissa


On Wed, Nov 20, 2013 at 4:57 PM, David Marso <[hidden email]> wrote:
The ENDDATE value are out of range for those 2 cases!


DKUKEC wrote
> * After consulting N and Google (my friend), I have come up short.  I am
> trying to identiy cases (ids) that are "active" or open during a specific
> period of time.  In this case, October 1, 2009 and September 30, 2012.
> Blank dates at the time of extract from the database indicate that the
> case is active or open.  Can anyone suggest any syntax to correct my sad
> syntax so it would include ID 6 & 7?
>
> Thank you
> Damir
>
>
> ** IDENTIFYING ACTIVE CASELOAD...
> ** DATE OF EXTRACT TODAY .
>
> DATA LIST FREE/ ID (A2) STARTDATE (DATE11) ENDDATE (DATE11).
> BEGIN DATA
> 01 04-JAN-2004 05-MAY-2005
> 02  05-FEB-2006 .
> 04  04-JUL-2003  06-DEC-2003
> 05  01-APR-2011 01-APR-2012
> 06  04-APR-2012 01-JUL-2013
> 07  30-SEP-2012 31-OCT-2013
> 08 18-NOV-2013 19-NOV-2013
> END DATA.
>
> IF STARTDATE LE DATE.DMY (30,09,2012) AND
>       RANGE (ENDDATE, DATE.DMY (01,10,2009),DATE.DMY.(30,09,2012)) OR
> MISSING (ENDDATE) ACTIVE2=1 .
> EXECUTE.





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Identifying-Active-Open-Cases-tp5723206p5723209.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: Identifying Active/Open Cases

DKUKEC
In reply to this post by DKUKEC
Thank you Melissa and David...

Damir