rem	Report to show what has been passsed/failed by dodo over a given time scale
rem
rem	mdf 3/9/2003
rem
rem
rem

rem:entry title=Email
rem:entry title=Date(DD/MM/YY)


set pause off
set recsep off
set linesize 120
set pagesize 32000
set feed off
set verify off

column clonename	heading "Clone"		format A12
column id_prep		heading "Prep ID"	format 999999
column prep_number	heading "Prep"	format 99
column description	heading "Status"	format A25
column statusdate	heading "Date"		format A10
column operator		heading "Email"		format A4
column remark		heading "Remarks"	format A30 word_wrapped

ttitle center "Dodo Pass/Fails by &1 on &2 - Summary" skip 2

select DSD.DESCRIPTION,COUNT(D.ID_PREP) as "Number updated"
from DNAPREP D, DNAPREP_STATUS DS, DNAPREPSTATUSDICT DSD
where D.ID_PREP = DS.ID_PREP
AND DS.STATUS = DSD.ID_DICT
AND DS.OPERATOR = '&1'
AND DS.STATUSDATE between to_date('&2:00-00-00','DD/MM/YY:HH24-MI-SS') and to_date('&2:23-59-59','DD/MM/YY:HH24-MI-SS')
group by DSD.DESCRIPTION;

ttitle center "Dodo Pass/Fails by &1 on &2   Details" skip 2

select D.CLONENAME, D.ID_PREP, D.PREP_NUMBER, DSD.DESCRIPTION, DS.STATUSDATE, DS.OPERATOR, DS.remark
from DNAPREP D, DNAPREP_STATUS DS, DNAPREPSTATUSDICT DSD
where D.ID_PREP = DS.ID_PREP
AND DS.STATUS = DSD.ID_DICT
AND DS.OPERATOR = '&1'
AND DS.STATUSDATE between to_date('&2:00-00-00','DD/MM/YY:HH24-MI-SS') and to_date('&2:23-59-59','DD/MM/YY:HH24-MI-SS')
order by description,clonename;

quit;
