PRO printjoblines,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' OPENW,jobunit,job_name,/GET_LUN FOR i=0,n-1 DO BEGIN PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("ducall,",I2.2,",",I2.2,",",I2.2,",/script")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("reducecals,",I2.2,",",I2.2,",",I2.2,",0,r0,/notv")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("reducecals,",I2.2,",",I2.2,",",I2.2,",1,r1,/notv")' newql_cmd=STRING(year(i) MOD 100,month(i),day(i),fhour(i) $ ,FORMAT='("newql,",4(I2.2,","),"0,0")') newql_cmd=newql_cmd+',/batch,/intens,/diffbg,/save,/qlim' PRINTF,jobunit,newql_cmd PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("plot_ql,",I2.2,",",I2.2,",",I2.2,",/ps")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("storelogs,",I2.2,",",I2.2,",",I2.2,",/quiet")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("plot_tlog,",I2.2,",",I2.2,",",I2.2,",/ps"/)' IF fhour(i) GT 0 THEN BEGIN PRINTF,jobunit,STRING(year(i) MOD 100,month(i),day(i) $ ,FORMAT='("cleanup,",3(I2.2,","),"/force"/)') ENDIF ENDFOR PRINTF,jobunit,'exit' CLOSE,jobunit FREE_LUN,jobunit RETURN END