Hello
I want to export sas data set into txt file.
This data set is very big (200 million rows with 30 columns).
First I want to export only 100 rows in order to see if this export work well.
My question-
How can I know if my task was successfully export ?
Please see the Log
libname LS '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/';
proc export data=LS.lightSolver_sofi(obs=100)
outfile='/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt'
dbms = dlm;
delimiter = '||';
run;
Log
1 The SAS System 13:05 Tuesday, September 12, 2023
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='הכנה סופית של הקובץ לשליחה והתממת נתנים';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='M:\a.ריכוז תוכניות\CS\LightSolver\שליפת שני קבצים גדולים\הכנה סופית של הקובץ לשליחה והתממת
8 ! נתנים.sas';
9 %LET _SASPROGRAMFILEHOST='VST1H103A2030';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 FILENAME EGSR TEMP;
15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16 STYLE=HTMLBlue
17 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18 NOGTITLE
19 NOGFOOTNOTE
20 GPATH=&sasworklocation
21 ENCODING=UTF8
22 options(rolap="on")
23 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24
25 GOPTIONS ACCESSIBLE;
26
27 libname LS '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/';
NOTE: Libref LS was successfully assigned as follows:
Engine: V9
Physical Name: /usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards
28 proc export data=LS.lightSolver_sofi(obs=100)
29 outfile='/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt'
30 dbms = dlm;
31 delimiter = '||';
32 run;
33 /**********************************************************************
34 * PRODUCT: SAS
35 * VERSION: 9.4
36 * CREATOR: External File Interface
37 * DATE: 12SEP23
38 * DESC: Generated SAS Datastep Code
39 * TEMPLATE SOURCE: (None Specified.)
40 ***********************************************************************/
41 data _null_;
42 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
43 %let _EFIREC_ = 0; /* clear export record count macro variable */
44 file '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt' delimiter='||' DSD DROPOVER lrecl=32767;
45 if _n_ = 1 then /* write column names or labels */
46 do;
47 put
48 "MEZAHE_CARD"
49 '||'
50 "date_TAARICH_BITZUA_ISKA"
2 The SAS System 13:05 Tuesday, September 12, 2023
51 '||'
52 "date_TAARICH_IBUD_ISKA"
53 '||'
54 "date_TAARICH_CHIUV"
55 '||'
56 "date_CALC_TRCH"
57 '||'
58 "MEZAHE_TNUA"
59 '||'
60 "MLI_TEUR_SUG_CARD"
61 '||'
62 "MEZAHE_PART"
63 '||'
64 "KOD_CHEVRA"
65 '||'
66 "TEUR_CARD"
67 '||'
68 "KOD_CHEVRA_GLOBAL"
69 '||'
70 "CHEVRA"
71 '||'
72 "SHEM_SOCHER"
73 '||'
74 "MIS_SOCHER"
75 '||'
76 "MCC4"
77 '||'
78 "SHEM_MCC4"
79 '||'
80 "COMPANY_LEGAL_ID"
81 '||'
82 "SUG_ISKA"
83 '||'
84 "TEURSUG_ISKA"
85 '||'
86 "SCHUM_CHIUV"
87 '||'
88 "MIS_TASH_NOCH"
89 '||'
90 "MATBEA_CHIUV"
91 '||'
92 "MIS_TASH_MEK"
93 '||'
94 "MIS_TASH_NOTRU"
95 '||'
96 "SCHUM_ISKA_MAT_MAKOR"
97 '||'
98 "MATBEA_BITZUA_ISKA"
99 '||'
100 "ACHUZ_RIBIT"
101 '||'
102 "IND_ISKAT_CHUL"
103 '||'
104 "SCHUM_ISKA_MAT_CHUV"
105 '||'
106 "IND_HOCK"
107 '||'
108 "KOD_SOLECK"
3 The SAS System 13:05 Tuesday, September 12, 2023
109 '||'
110 "IND_ISKA_BERUR"
111 '||'
112 "IND_ISKA_MISMACH_CHASER"
113 '||'
114 "IND_ISKA_MEULETZET"
115 '||'
116 "IND_HALVAA"
117 '||'
118 "SUG_PLAN"
119 '||'
120 "TEUR_SUG_TOCHNIT"
121 '||'
122 "MAHUT_KARTIS"
123 '||'
124 "RIBIT_NOTAR"
125 '||'
126 "**bleep**AT_PERAON"
127 '||'
128 "SUG_RIBIT"
129 '||'
130 "SHIUR_RIBIT"
131 '||'
132 "MIRVACH_PRIME"
133 '||'
134 "COUNTRY_CODE"
135 '||'
136 "WhichFile"
137 '||'
138 "Date_HITZTARFUT"
139 '||'
140 "month_Nechonut"
141 '||'
142 "LAKOACH"
143 '||'
144 "groupk_base"
145 '||'
146 "misg_crd_base"
147 '||'
148 "Hativa_base"
149 '||'
150 "nr_FollowUpMonths"
151 '||'
152 "Ind_Touch11"
153 '||'
154 "nr_Months_With_Tnua_CC"
155 '||'
156 "Ind_HAve_ISkaCC_BaseMon"
157 '||'
158 "BITZUA_ISKA_TIME"
159 '||'
160 "Ind_Sinun_out"
161 ;
162 end;
163 set LS.LIGHTSOLVER_SOFI(obs=100) end=EFIEOD;
164 format MEZAHE_CARD $200. ;
165 format date_TAARICH_BITZUA_ISKA ddmmyy10. ;
166 format date_TAARICH_IBUD_ISKA ddmmyy10. ;
4 The SAS System 13:05 Tuesday, September 12, 2023
167 format date_TAARICH_CHIUV ddmmyy10. ;
168 format date_CALC_TRCH ddmmyy10. ;
169 format MEZAHE_TNUA $48. ;
170 format MLI_TEUR_SUG_CARD $12. ;
171 format MEZAHE_PART best12. ;
172 format KOD_CHEVRA best12. ;
173 format TEUR_CARD $9. ;
174 format KOD_CHEVRA_GLOBAL best12. ;
175 format CHEVRA $3. ;
176 format SHEM_SOCHER $39. ;
177 format MIS_SOCHER best12. ;
178 format MCC4 best12. ;
179 format SHEM_MCC4 $40. ;
180 format COMPANY_LEGAL_ID best12. ;
181 format SUG_ISKA best12. ;
182 format TEURSUG_ISKA $25. ;
183 format SCHUM_CHIUV best12. ;
184 format MIS_TASH_NOCH best12. ;
185 format MATBEA_CHIUV $3. ;
186 format MIS_TASH_MEK best12. ;
187 format MIS_TASH_NOTRU best12. ;
188 format SCHUM_ISKA_MAT_MAKOR best12. ;
189 format MATBEA_BITZUA_ISKA $3. ;
190 format ACHUZ_RIBIT best12. ;
191 format IND_ISKAT_CHUL best12. ;
192 format SCHUM_ISKA_MAT_CHUV best12. ;
193 format IND_HOCK best12. ;
194 format KOD_SOLECK best12. ;
195 format IND_ISKA_BERUR best12. ;
196 format IND_ISKA_MISMACH_CHASER best12. ;
197 format IND_ISKA_MEULETZET best12. ;
198 format IND_HALVAA best12. ;
199 format SUG_PLAN best12. ;
200 format TEUR_SUG_TOCHNIT $16. ;
201 format MAHUT_KARTIS $3. ;
202 format RIBIT_NOTAR best12. ;
203 format **bleep**AT_PERAON best12. ;
204 format SUG_RIBIT best12. ;
205 format SHIUR_RIBIT best12. ;
206 format MIRVACH_PRIME best12. ;
207 format COUNTRY_CODE $3. ;
208 format WhichFile best12. ;
209 format Date_HITZTARFUT ddmmyy10. ;
210 format month_Nechonut best12. ;
211 format LAKOACH 11. ;
212 format groupk_base best12. ;
213 format misg_crd_base 20.2 ;
214 format Hativa_base 11. ;
215 format nr_FollowUpMonths best12. ;
216 format Ind_Touch11 best12. ;
217 format nr_Months_With_Tnua_CC best12. ;
218 format Ind_HAve_ISkaCC_BaseMon best12. ;
219 format BITZUA_ISKA_TIME time5. ;
220 format Ind_Sinun_out bestx12. ;
221 do;
222 EFIOUT + 1;
223 put MEZAHE_CARD $ @;
224 put date_TAARICH_BITZUA_ISKA @;
5 The SAS System 13:05 Tuesday, September 12, 2023
225 put date_TAARICH_IBUD_ISKA @;
226 put date_TAARICH_CHIUV @;
227 put date_CALC_TRCH @;
228 put MEZAHE_TNUA $ @;
229 put MLI_TEUR_SUG_CARD $ @;
230 put MEZAHE_PART @;
231 put KOD_CHEVRA @;
232 put TEUR_CARD $ @;
233 put KOD_CHEVRA_GLOBAL @;
234 put CHEVRA $ @;
235 put SHEM_SOCHER $ @;
236 put MIS_SOCHER @;
237 put MCC4 @;
238 put SHEM_MCC4 $ @;
239 put COMPANY_LEGAL_ID @;
240 put SUG_ISKA @;
241 put TEURSUG_ISKA $ @;
242 put SCHUM_CHIUV @;
243 put MIS_TASH_NOCH @;
244 put MATBEA_CHIUV $ @;
245 put MIS_TASH_MEK @;
246 put MIS_TASH_NOTRU @;
247 put SCHUM_ISKA_MAT_MAKOR @;
248 put MATBEA_BITZUA_ISKA $ @;
249 put ACHUZ_RIBIT @;
250 put IND_ISKAT_CHUL @;
251 put SCHUM_ISKA_MAT_CHUV @;
252 put IND_HOCK @;
253 put KOD_SOLECK @;
254 put IND_ISKA_BERUR @;
255 put IND_ISKA_MISMACH_CHASER @;
256 put IND_ISKA_MEULETZET @;
257 put IND_HALVAA @;
258 put SUG_PLAN @;
259 put TEUR_SUG_TOCHNIT $ @;
260 put MAHUT_KARTIS $ @;
261 put RIBIT_NOTAR @;
262 put **bleep**AT_PERAON @;
263 put SUG_RIBIT @;
264 put SHIUR_RIBIT @;
265 put MIRVACH_PRIME @;
266 put COUNTRY_CODE $ @;
267 put WhichFile @;
268 put Date_HITZTARFUT @;
269 put month_Nechonut @;
270 put LAKOACH @;
271 put groupk_base @;
272 put misg_crd_base @;
273 put Hativa_base @;
274 put nr_FollowUpMonths @;
275 put Ind_Touch11 @;
276 put nr_Months_With_Tnua_CC @;
277 put Ind_HAve_ISkaCC_BaseMon @;
278 put BITZUA_ISKA_TIME @;
279 put Ind_Sinun_out ;
280 ;
281 end;
282 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */
6 The SAS System 13:05 Tuesday, September 12, 2023
283 if EFIEOD then call symputx('_EFIREC_',EFIOUT);
284 run;
NOTE: The file '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt' is:
Filename=/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt,
Owner Name=Udclk79,
Group Name=GR_IL_SAS_USERS_LabRet,
Access Permission=-rw-rw-r--,
Last Modified=12Sep2023:14:46:40
NOTE: 101 records were written to the file '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt'.
The minimum record length was 331.
The maximum record length was 866.
NOTE: There were 100 observations read from the data set LS.LIGHTSOLVER_SOFI.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
user cpu time 0.01 seconds
system cpu time 0.00 seconds
memory 12255.06k
OS Memory 36380.00k
Timestamp 09/12/2023 02:46:40 PM
Step Count 22 Switch Count 0
Page Faults 0
Page Reclaims 387
Page Swaps 0
Voluntary Context Switches 15
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
100 records created in /usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt from LS.LIGHTSOLVER_SOFI.
NOTE: "/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.82 seconds
user cpu time 0.04 seconds
system cpu time 0.05 seconds
memory 12255.06k
OS Memory 36636.00k
Timestamp 09/12/2023 02:46:40 PM
Step Count 22 Switch Count 8
Page Faults 0
Page Reclaims 4436
Page Swaps 0
Voluntary Context Switches 212
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
285
286 GOPTIONS NOACCESSIBLE;
287 %LET _CLIENTTASKLABEL=;
288 %LET _CLIENTPROCESSFLOWNAME=;
289 %LET _CLIENTPROJECTPATH=;
290 %LET _CLIENTPROJECTPATHHOST=;
7 The SAS System 13:05 Tuesday, September 12, 2023
291 %LET _CLIENTPROJECTNAME=;
292 %LET _SASPROGRAMFILE=;
293 %LET _SASPROGRAMFILEHOST=;
294
295 ;*';*";*/;quit;run;
296 ODS _ALL_ CLOSE;
297
298
299 QUIT; RUN;
300
Do you need more than this:
NOTE: The file '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt' is:
Filename=/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt,
Owner Name=Udclk79,
Group Name=GR_IL_SAS_USERS_LabRet,
Access Permission=-rw-rw-r--,
Last Modified=12Sep2023:14:46:40
NOTE: 101 records were written to the file '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt'.
Tells you the name of the file and the number of records written.
Or just not understanding that is what this means?
How can I know if my task was successfully export ?
Take look at the file you created, and see if it looks like you expected (open it in a text editor). If you can, test the output in whatever program is supposed to receive it.
Do you need more than this:
NOTE: The file '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt' is:
Filename=/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt,
Owner Name=Udclk79,
Group Name=GR_IL_SAS_USERS_LabRet,
Access Permission=-rw-rw-r--,
Last Modified=12Sep2023:14:46:40
NOTE: 101 records were written to the file '/usr/local/SAS/SASUsers/LabRet/Adhoc/creditCards/lightSolver_sofi.txt'.
Tells you the name of the file and the number of records written.
Or just not understanding that is what this means?
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.