;+ ; Contains the make_cnes_lis procedure ; ; :Author: ; Baptiste Cecconi ; ; :History: ; 2005/12/14: Created ; ; 2005/12/14: Last Edit ;- ; ;+ ; make_cnes_lis is a procedure that <behavior desc here> ; ; :Uses: ; make_dir_tab ; ; :Params: ; aj1: in, required, type=sometype ; A parameter named aj1 ; aj2: in, required, type=sometype ; A parameter named aj2 ;- pro make_cnes_lis, aj1, aj2 datapath=getenv("NAS_RPWS") print, datapath openw, unit0, getenv('ROOT_RPWS')+"/pro/script_file", /get_lun printf, unit0, "u rpwsCnes KrOnOs04" printf, unit0, "prompt" printf, unit0, "ascii" for aj=aj1, aj2 do begin year=aj/1000L ddday=aj-1000L*year dir=make_dir_tab(year, ddday, year, ddday) openr, unit1, datapath+*dir[0]+'/lis/'+strtrim(string(aj), 2)+'.lis', /get_lun openw, unit2, "lis", /get_lun a='' while not eof(unit1) do begin readf, unit1, a if strmid(a, 0, 1) ne "K" then begin print, "error in format" endif a="P"+strmid(a, 1, strlen(a)-1) printf, unit2, a endwhile close, unit1 close, unit2 free_lun, unit1 free_lun, unit2 ; printf, 1, "lcd "+datapath+dir[0]+'/lis/' printf, unit0, "put lis" printf,unit0, "rename lis "+strtrim(string(aj), 2)+'.lis' endfor printf, unit0, "bye" close, unit0 free_lun, unit0 ;spawn, "ftp calypso < " + getenv('ROOT_RPWS')+'/pro/file_script' end