PRO prjoblin,n,year,month,day,fhour,fminute,fsecond ; This little procedure opens a file for writing, writes IDL commands ; to process Polar Camera data from a particular date or several ; dates, and then closes the file. ; Initialize OS-specific items @isitdos job_name=sroot+dd+'idl_job.pro' cond="IF GETENV('ACTION') NE 'skip' THEN " OPENW,jobunit,job_name,/GET_LUN FOR i=0,n-1 DO BEGIN PRINTF,jobunit,expand_cmd,year(i) MOD 100,month(i),day(i) $ ,FORMAT='(A,3(",",I0),",/script")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("reducals",3(",",I0),",0,r0,/notv")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("reducals",3(",",I0),",1,r1,/notv")' ; IF fhour(i) GT 0 THEN BEGIN newql_cmd=STRING(year(i) MOD 100,month(i),day(i) $ ,FORMAT='("newql",3(",",I0),",0,0,0")') newql_cmd=newql_cmd+',/batch,/intens,/diffbg,/save,/qli' newql_cmd=newql_cmd+',wlsave=[558,608,630,714,785,820,829,835]' ; ENDIF ELSE BEGIN ; newql_cmd=STRING(year(i) MOD 100,month(i),day(i),fhour(i) $ ; ,FORMAT='("newql",4(",",I0),",0,0")') ; newql_cmd=newql_cmd+',/batch,/intens,/diffbg,/save' ; ENDELSE PRINTF,jobunit,newql_cmd PRINTF,jobunit,cond,year(i) MOD 100,month(i),day(i) $ ,FORMAT='(A,"plot_ql",3(",",I0),",/ps")' PRINTF,jobunit,cond,year(i) MOD 100,month(i),day(i) $ ,FORMAT='(A,"storlogs",3(",",I0),",/quiet")' PRINTF,jobunit,cond,year(i) MOD 100,month(i),day(i) $ ,FORMAT='(A,"plottlog",3(",",I0),",/ps"/)' PRINTF,jobunit,"$df | grep cnsr3" IF fhour(i) GT 0 THEN BEGIN PRINTF,jobunit,STRING(year(i) MOD 100,month(i),day(i) $ ,FORMAT='("cleanup,",3(I2.2,","),"/force"/)') PRINTF,jobunit,"SETENV,'ACTION='" ENDIF ENDFOR PRINTF,jobunit,'exit' CLOSE,jobunit FREE_LUN,jobunit RETURN END