Bonjour , Pouvez-vous m'aider s'il vous plaît?
J'ai environ 11 FICHIERS CSV de même structure contenant les mêmes variables que je dois importer par une étape data.
J'aimerais savoir si quelqu'un peut m'aider à écrire une macro pour importer ces fichiers.
voici le nom des fichiersj'en ai mis 3 pour l'exemple)
RN205_CCG01_13580
RN205_CCG01_11978
RN205_CCG01_11790
et à la sortie voici les noms des fichiers SAS: CCG01_13580,CCG01_11978, CCG01_11790
Voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198 data CCG01; infile "tab.csv" DLM=';' firstobs=1 lrecl=2566 missover DSD; INFORMAT fich_data $12. iCB_CONTRAT $30. SFX $CHAR20. cod_prd $12. Scr_ent $12. DEV $3. Soldarr2_dec_sign $10. Devisol $3. Datousc best12. Datouv best12. Date_echeance best12. clo_top $1. clo_dat best12. tie_s_org $2. tie_s_role $12. tie_s_ref $12. tie_gorg $2. tie_grole $8. tie_gref $8. ccg1_num best12. ccg2_num best12. bal_rad $5. bal_ent best12. txd_cod numx3. txd_dif_5_dec_sign numx9. txd_vca_5_dec_sign numx8. txd_vcl_5_dec_sign numx8. dures_m best12. dures_j best12. nouctr $1. Sldmoy_pilot2_dec $10. ctx_etata $1. ctx_etatp $1. ctx_date best12. mnt_dev_ori2_dec $10. ctr_ven $25. tie_v_orf $2. tie_v_role $12. tie_v_ref $12. ctr_ven_fic $25. Enc_val2_dec_sign $10. sldmoy_val_dbt_2_dec_sign $10. sldmoy_val_cdt_2_dec_sign $10. codsoc best12. Num_ven best12. dat_ouv_ven best12. icb_ven $25. code_ach best12. grp_tie $25. num_grp_tie NUMX25. prd_fact best12. num_quit $12. top_fact $15. decl_tie $15. pci_gef $10. mnt_couv_n1 $10. mnt_couv_n2 $10. code_ass best12. inn_typ $3. inn_val best12. exi_typ $3. exi_val $30. Nbre_Jrs_retards best12. type_ste $15.; format fich_data $12. iCB_CONTRAT $30. SFX $Char20. cod_prd $12. Scr_ent $12. DEV $3. Soldarr2_dec_sign $10. Devisol $3. Datousc best12. Datouv best12. Date_echeance best12. clo_top $1. clo_dat best12. tie_s_org $2. tie_s_role $12. tie_s_ref $12. tie_gorg $2. tie_grole $8. tie_gref $8. ccg1_num best12. ccg2_num best12. bal_rad $5. bal_ent best12. txd_cod numx3. txd_dif_5_dec_sign numx9. txd_vca_5_dec_sign numx8. txd_vcl_5_dec_sign numx8. dures_m best12. dures_j best12. nouctr $1. Sldmoy_pilot2_dec $10. ctx_etata $1. ctx_etatp $1. ctx_date best12. mnt_dev_ori2_dec $10. ctr_ven $25. tie_v_orf $2. tie_v_role $12. tie_v_ref $12. ctr_ven_fic $25. Enc_val2_dec_sign $10. sldmoy_val_dbt_2_dec_sign $10. sldmoy_val_cdt_2_dec_sign $10. codsoc best12. Num_ven best12. dat_ouv_ven best12. icb_ven $25. code_ach best12. grp_tie $25. num_grp_tie numx25. prd_fact best12. num_quit $12. top_fact $15. decl_tie $15. pci_gef $10. mnt_couv_n1 $10. mnt_couv_n2 $10. code_ass best12. inn_typ $3. inn_val best12. exi_typ $3. exi_val $30. Nbre_Jrs_retards best12. type_ste$15.; INPUT fich_data $ iCB_CONTRAT $ SFX $ cod_prd $ Scr_ent $ DEV $ Soldarr2_dec_sign $ Devisol $ Datousc Datouv Date_echeance clo_top $ clo_dat tie_s_org $ tie_s_role $ tie_s_ref $ tie_gorg $ tie_grole $ tie_gref $ ccg1_num ccg2_num bal_rad $ bal_ent txd_cod txd_dif_5_dec_sign txd_vca_5_dec_sign txd_vcl_5_dec_sign dures_m dures_j nouctr $ Sldmoy_pilot2_dec $ ctx_etata $ ctx_etatp $ ctx_date mnt_dev_ori2_dec $ ctr_ven $ tie_v_orf $ tie_v_role $ tie_v_ref $ ctr_ven_fic $ Enc_val2_dec_sign $ sldmoy_val_dbt_2_dec_sign $ sldmoy_val_cdt_2_dec_sign $ codsoc Num_ven dat_ouv_ven icb_ven $ code_ach grp_tie $ num_grp_tie prd_fact num_quit $ top_fact $ decl_tie $ pci_gef $ mnt_couv_n1 $ mnt_couv_n2 $ code_ass inn_typ $ inn_val exi_typ $ exi_val $ Nbre_Jrs_retards type_ste $; run;
Partager