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' 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(jobunit,year(i) MOD 100,month(i),day(i),fhour(i) $ ,FORMAT='("newql",4(",",I0),",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(jobunit,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,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("plot_ql",3(",",I0),",/ps")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("storlogs",3(",",I0),",/quiet")' PRINTF,jobunit,year(i) MOD 100,month(i),day(i) $ ,FORMAT='("plottlog",3(",",I0),",/ps"/)' ENDFOR PRINTF,jobunit,'exit' CLOSE,jobunit FREE_LUN,jobunit RETURN END