pro cancel_dsn_fil,file_prefix,week,pass,fileout,cancel_type=cancel_type, $ spacecraft=spacecraft ;+ ; NAME: ; cancel_dsn_fil ; PURPOSE: ; Create the ascii file for cancel_dsn (deletion of DSN passes) ; CALLING SEQUENCE: ; cancel_dsn_fil, file_prefix, week, pass, fileout ; INPUTS: ; file_prefix = File prefix (string) ; week = Week number ; pass = Structure containing passes to delete ; OPTIONAL INPUTS: ; None. ; OUTPUTS: ; fileout ; OPTIONAL OUTPUTS: ; None. ; RESTRICTIONS: ; None. ; PROCEDURE: ; File name is of the type "strawman_del.w18" ; If spacecraft is ASCA, make the name "strawman_asca_del.w18" ; MODIFICATION HISTORY: ; 21-apr-93 JRL, Written. ; 1-may-93, JRL, Change the form of the name for ASCA ; 26-dec-97, HSH, write to temporary archive to handle Wallops ;- ; ------------------------------- ; Generate the file name / Open the file on orbit_raw directory ; ------------------------------- if strlowcase(strtrim(spacecraft,2)) eq 'asca' then $ name = file_prefix + '_asca_del.w'+string(week,format='(i2.2)') else $ name = file_prefix + '_del.w'+string(week,format='(i2.2)') ;fileout = concat_dir('$DIR_GEN_ORBIT_RAW', name ) fileout = concat_dir('/home/flare/com/yohkoh/wallops', name ) openw,lun,fileout,/get_lun if n_elements(spacecraft) eq 0 then spacecraft = 'YOHKOH' if n_elements(cancel_type) eq 0 then cancel_type = ' ' printf,lun,'DELETIONS FOR ',spacecraft,' ',cancel_type, $ ' Year = ',pass(0).year,format='(5a,i2)' printf,lun,'WEEK No.',pass(0).week, $ ' This file created ',fmt_tim(anytim2ex(!stime)), $ format='(a,i3,2a)' printf,lun,' ' for i=0,n_elements(pass)-1 do $ printf,lun,'DELETE',pass(i).doy,pass(i).user, pass(i).dss, pass(i).start, $ format='(a,i4.3,x,a,i3,i5.4)' free_lun,lun spawn,'chmod 666 ' + fileout ; Give world delete privilege print,' Cancellation info written to file = ',fileout end