Type : EXTERNE
Interacción directa con el sistema de archivos a través del comando X 'copy'. No se lee ni se crea ninguna tabla SAS.
| 1 | %macro backuptoh(file,h=h:); |
| 2 | %local dt hfile hdir; |
| 3 | %AHGfiledt(&file,into=dt,dtfmt=mmddyy10.); |
| 4 | |
| 5 | %let hfile=&h\%sysfunc(PRXCHANGE(s/(\\\\+)?(:)?//,-1,&file)); |
| 6 | %let hdir=%sysfunc(PRXCHANGE(s/(.*)\\*.*/\1/,-1,&hfile)); |
| 7 | |
| 8 | %AHGmkdir(&hdir); |
| 9 | x "copy &file &hfile..&dt..txt /y"; |
| 10 | |
| 11 | %AHGpm(hdir hfile dt); |
| 12 | %mend; |