Create an interviewer production report that runs off of intvrlog files

The attached spec The columns that print on this report are defined as​ follows:

  • – This is all the time logged into the system. This includes all break/lunch/meeting, practice times, and coding/view mode times.
  • – # of interviews started
  • – # of interviews that became completes (status 1 in the phone file)

  • – Time spent on practice/training mode
  • – # of surveys started in practice mode

  • – Time spent in view/coding mode

  • – Time spent inbreak mode. Often used to track paid non-working time
  • – Time spent in lunch mode. Often used to track non-paid non-working time
  • – Time spent in meeting mode. Often used to track paid working, but non-interviewing time

  • – Amount of time they were monitored

  • – Time on Completes/# of completes
  • – (# of Completes/# of starts) * 100
  • -# of times session was not terminated normally by either the interviewer quitting out or the supervisor issuing a stop command

''Specify date range, default is all dates have''>define @dates 090101-991231 ''yymmdd - yymmdd''if want dialer info about study (SRVR records with statuses returned)''>define @dialer_info''Decide if want reports in minutes or hours, default is hours>define @hours     ''if want reports in hours''>define @minutes ''if want report in minutes>define @intv_reports ''if want a separate report for each interviewer>define @study_reports''if want a separate report for each study>purgesame>createdb logreport duplicate=quiet>cfmcextension prt=rpt>prtrep>quit errors=5000>longfilenames>casesensitive~set varnames maxvsize=1000000~input files="intvrlog.2012_*" ascii=10000select=: $T="!" [1.4^nb] and [1.16$]<>"ignore this line" & ''junk lines>ifdefine @Dialer_info>elseand [1.8$]<>"Srvrtnms" &>endif>ifdefine @datesand dates[40.6#@Dates] &>endif;~set -casesensitive>-casesensitive~freq [1.4$u]=Interviewer~freq [5.25$u]=Intv_name~freq [1601.30$u]=Study_Name~specfile logreport~define''***************************************************************************************''        DEFINITIONS FOR ALL DATA LOCATIONS IN THE INTERVIEWER LOG FILE.               *''***************************************************************************************'GENERAL INFORMATION:''Variable     Location    Info Recorded         Value/Notes''---------    -------   ----------------------- --------------------------------------------------------------------IntvID:       [1.4$]    ''Interviewer IDIntvName:     [5.25$]   ''Interviewer info      (ID, name)ShortStdyName:[30.8$]   ''Short Study name      (4-8 characters)StartTime:    [38.18$]  ''Session Start Time    (yyyymmddhhmmssjjjd)StartDate:    [!(StartTime) 3.6$] ''            (yymmdd)Last_Event:   [56.14$]  ''Time of last event    (yyyymmddhhmmss)Last_Date:    [!(Last_Event) 3.6$]  ''          (yymmdd)DeviceNum:    [70.4]    ''Device Number         (1-9999)DialrExtn:    [74.4]    ''Dialer Extension      (1-9999)SuprDevice:   [78.4]    ''Supervisor Device #   (1-9999)SoundExt:     [82.4]    ''SoundServer Extension (1-9999)Practice:     [86.1$]   ''Practice Mode         ("P"/" ") in v8.3+SpecialTypes: [87.9$]   ''Special Type Flags    (123456789)IntvType:     [96.1$]   ''Supervised(B),(W)ebcati,Web(S)urvent,(C)ati (B/W/S/C)ODBC_ver:     [97.1$]   ''Using ODBC Version    (Y/N)HowStopped:   [98.1$]   ''How Stopped           (A=Active/Bad Stop, B=Blow Error, C=Cleared,''                       I=Between Interviews, K=Killed, Q=Quit, S=Stop)DialerNum:    [100.2]   ''Dialer number used    (01-09)SiteCode:     [102.2]   ''Site code             (01-99)DialerType:   [103.1$]  ''E-(Eis),N-(Noble),P-(Msg/Proteus),S-(Stratasoft)DialerMode:   [104.1]   ''None/Predictive/Preview (0/1/2)IntvStatus:   [105.1$]  ''P-between/B-break/L-lunch/M-meeting/W-Wait for dialer/A-At start (before !phone,4/5)/''I-Main interview, After !phone,9/F-Got fone record, before phone,9/''D-During interview (after !spc,e,E)/E-At end (after !spc,e,F)/''R-In RDG (overrides other statuses)Monitored:    [106.1$]  ''Y/NViewMode:     [107.1$]  ''Y/NCodingMode:   [108.1$]  ''Y/N''TIMES IN MINUTES:''Variable     Location       Info Recorded      Notes (**All values In Seconds)''---------    -------   ----------------------- --------------------------------------------TmConnect:   [!121.5]  ''Total time on system   (stoptime-starttime)TmBetwIntv:  [!126.5]  ''Between Interviews     Time between but not on break/lunch/meetingTmOnBreak:   [!131.5]  ''Time on Break-paidTmAtLunch:   [!136.5]  ''Time on Lunch-unpaidTmMonitor:   [!141.5]  ''Time Monitored         All time monitoredTmActive:    [!146.5]  ''Total Active Time      All time In an interviewTmInView:    [!151.5]  ''Time in 'View' Mode    View mode/Including between interview timeTmActvView:  [!156.5]  ''Time Active-View Mode  View mode/In interviewTmWaitPhn:   [!161.5]  ''Time Waiting for Phn if use DialerTmB4phn:     [!166.5]  ''Time in Interview Before phone number retrievedTmOnComplete:[!171.5]  ''Time on Completes      Active time when Status 1 or CountasCompleteTmInScreener:[!176.5]  ''Time in Screener       Time After Phone number to Spc,e,ETmInMain:    [!181.5]  ''Time in Main           Time from Spc,e,E to Spc,e,FTmInEdit:    [!186.5]  ''Time in Review/Edit    Time after Spc,e,FTmOnResolved:[!191.5]  ''Time on Resolved       Resolved 2-99 not completeTmOnTimedCls:[!196.5]  ''Time on Timed Calls    Status 104-105,160-179TmOnStat105: [!201.5]  ''Time on Timed Notime   Status 105TmOnOthActv: [!206.5]  ''Time on Other Active   Status 102,106-159,180-199TmOnNoHist:  [!211.5]  ''Time on No History     Status 201-214TmOnSuspend: [!216.5]  ''Time on Suspends       Suspended InterviewsTmCompResume:[!221.5]  ''Time on Comp. Resumes  Resumes completedTmCoded:     [!226.5]  ''Time on coding/updatesTmRDG:       [!231.5]  ''Time on RDG modeTmMeeting:   [!236.5]  ''Time at Meetings''SUMMARY COUNTS:''Variable     Location       Info Recorded               Value/Notes''---------    --------  ----------------------- -----------------------------------NStarts:     [!301.4]  ''# of interview startsNCompletes:  [!305.4]  ''# of completed intvws  Status "1" or CountasCompleteNUpdateCase: [!309.4]  ''# Updated case         Completed with coding modeNSDbugMode:  [!313.4]  ''# Starts Debug modeNSRDGMode:   [!317.4]  ''# Starts RDG mode      Random Data Generation StartsNRDGComp:    [!321.4]  ''# RDG mode completes   Random Data Generation CompletesNSViewMode:  [!325.4]  ''# Starts View modeNViewComp:   [!329.4]  ''# View mode "completes"NRegStarts:  [!333.4] ''# Regular mode startsNRegComp:    [!337.4]  ''# Regular completesNCoded:      [!341.4]  ''# Regular updates      Regular updates/coding modeNIScrners:   [!345.4]  ''# Screeners doneNIEdtRev:    [!349.4]  ''# Editing/Review doneNMonitored:  [!353.4]  ''# Interviews monitoredNCompMon:    [!357.4]  ''# Completes monitoredNSuspnds:    [!361.4]  ''# SuspendsNRsmsCmp:    [!365.4]  ''# Resumes completedNPhnCalls:   [!369.4]  ''# Calls madeNPhone5:     [!373.4]  ''# Specific #s called   !Phone,5 executedNRslvdCalls: [!377.4]  ''# Resolved calls made  Status 1-99 but not completedNTimedCalls: [!381.4]  ''# Timed callsNOthActCalls:[!385.4]  ''# Other active callsNNoHistCalls:[!389.4]  ''# No History callsNChgPhnNum:  [!393.4]  ''# Times changed Ph. #NOwnedRtrvd: [!397.4]  ''# Owned #s retrieved   !Phone,5 executedNChngOwner:  [!401.4]  ''# Changed Ownership>Repeat $a=1,...,9;$b=405,409,...,437NSpclIntv$a: [!$b.4]  ''# Special Intv. #s>EndrepeatNBreaks:     [!441.4]  ''# Times did BreakNLunches:    [!445.4]  ''# Times did LunchNMonitored:  [!449.4]  ''# Times MonitoredNMeetings:   [!453.4]  ''# Times had Meetings''# OF NUMBERS GIVEN EACH STATUS 1-250:>Repeat $A=001,...,250; $B=501,505,...,1497NStat$A:     [!$B.4]   ''# of status $A calls>EndRepeat''OTHER INFO:QstFileName: [1501.80$] ''Full Questionnaire filenameBlowError:   [1581.20$] ''Blow number and text if blowStudyName:   [1601.30$] ''Long Study codePhoneNumber: [1633.20$] ''Phone number being calledIntvMessages:[1901.100$] ''Interview messages via !spc,e,1Usertextarea:[2001.1000$]''User info via !sys,I statement''**************  END OF INTVRLOG VARIABLE DESCRIPTIONS  ************************TotBetween: TmBetwIntv++TmOnBreak++TmAtLunch++TmMeeting ''Get total time between interviews''****************  INTERVIEWER TIME REPORTS ******************Tabset=Combined:Banner=:make_banner justify_level(1)=center[level=2 colspan=1]>ifdefine @minutes[ level=2 colspan=10] LIVE  INTERVIEWING (Minutes)>else[ level=2 colspan=10] LIVE  INTERVIEWING (Hours)>endif[level=2 colspan=2] TRAINING[level=2 colspan=2] CODING[level=2 colspan=3] BREAKS[level=2 colspan=2] MONITOR[level=2 colspan=3]''