Type : EXTERNE
Interaction directe avec le système de fichiers via la commande X 'copy'. Aucune table SAS n'est lue ou créée.
| 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; |