/
readingexternalrelated readingexternalrelated

readingexternalrelated - PDF document

olivia-moreira
olivia-moreira . @olivia-moreira
Follow
367 views
Uploaded On 2016-07-21

readingexternalrelated - PPT Presentation

F s G T s e f F D R T o F 1 pecified m G m u s a s e ATA all INFILE INPUT UN sho s a S ndat PIP ile indat TR ldt 1 4 o f b T w i NCOVER read F i g I h12 2 fls t n a n I iz 25 lere ID: 414340

F s G T s e f F D R T o F 1 pecified m G m u s a s e ATA all_ INFILE

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "readingexternalrelated" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

readingexternalrelated F s G T s e f F D R T o F 1 pecified m G m u s a s e ATA all_ INFILE INPUT UN; sho s a S ndat PIP ile; indat TR ldt $ 1- 4 o f b T w i NCOVER; read F i g I & h.12- 2 fls t n a n I iz $ 25- leref d o u n f x 8 flnm $ at 39-100; ‘ a S .a 2 2 r e 2 C A g d % % % D C F A s r d t % % ATA exce LENGT %DO B e os o l an_filen %EVAL(1+ t_files; flnm $6 i=1 %TO &LET _fln lnm= STRI UTPUT; datase m a o w a n SYSFUNC( .; numf.; = %SCAN(& P("&_flnm g ‘ C xcept_fi ||"&file contain & _f ‘cleaning’ w e e., &i, extensio some p r w ,'); "); e ss T h a t h h e a h macro R P C S F W Q % A 3 W f ‘ D UN; ROC SQL; REATE TA ELECT * ROM all_ HERE NOT S Q MEND Cle macro 3 T H W f f b e SET al FORMAT LENGTH CALL M ; LE all_f ile (INDEXC( RIP(flnm) n_filena %Clean_fi t o y _file_in file_dt filetime SSING(ne le_info ldt,'Che NOT IN ( es_Info; lenames_I t h E mm_Filen.t YMMDD10. $5. new_ _file_na S k','Dire ELECT fl n n F i g A t a a s x ile_name e, filet �tory') m FROM e named S T $50.; me, file 0 OR MISS cept_fil ‘ S ample_File ING(fldt) s); l_file_i .txt’. ) AND foi d m e(s) R F f IF IND fil ELSE fil fileti ARRAY DO i=1 fln new END; KEEP f UN; ile a t X(fltm,' _tm = INP _tm = INP e= COMPR lnames{& TO DIM(f mes(i)= SNPUT(flnaflnames file_name e_name= nm file_ save d a M') THEN UT(SUBSTR UT(SUBSTR SS(PUT(f ilename_ names); CAN(TRANW mes(i), ? i)=''; names); = CATX("& TRIP(STR t file_t ‘ m D ( fltm,1,5 le_tm, ?? arts} $20 D(flnm, YYMMDD10 elimiter P(new_fi new_fil file_info g ) , TIME5. TIME5.), .; &file_ex )= file_ , new_fi e_name)|| _name; ; ':'); ension", t OR fln e_name, "&file_e mes(i)= lnames(i xtension" iletime ); ); t e HEN N t t D R D D D N SET fi BY new IF FIR DO; ELSE DO; UN; ‘ ‘ ELETE f s t e_info; file_nam T.new_fi CALL SYMPOUTPUT re ame_file ete_file iles r flnm fi e_name N UT('exist name_file a l s ’a l S ) W n g e x e_dt fil LAST.ne ng_file' ; END; g l l g W _file_na '1'); O b g b g A d r i TPUT del a a w e f w te_files a i d f END; thereafter. a d W ‘ d % % % % % % % F f W e elete i % %IF %S %DO; %SY %I % % % % % % %END; MEND del MACRO de IF &exis DO; SET RUN; END; MEND del 7 les’ l SFUNC(FI EXEC DEL F &SYSRC= O; %PUT A ND; LSE O; %PUT S E UT ALERT te_old_f ete_exis ing_file ULL_; delete_fi EXECUTE( te_exist s o e x EEXIST(" "&filepa 0 %THEN ERT_I: F LERT_R: YSRC; R: &filep le; ing_file; 1 %THEN les; '%delete_ ng_file; t r o% d ; filepath. h.&file"; le &file ile &file th.&file o m F i g _ &file")) was succ was NOT NOT FOU ND ile='||s g t h ssfully uccessfu .; rip(flnm 8 h e ly delet displays h e d h o t = riginal R A c f m P B R D R P R ENAME Y new_fi UN; ATA to_r SET BY IF UN; ROC SQL; u ' DATA= re e_name f name_fil rename_fi ew_file_n AST.new_f ame_file nm file_ s; les; ame flnm ile_name; g s t file_t ile_dt f g g m le_tm; name n les m n w e l a e a n C S F W Q F l % D R % D R F i C ELECT * ROM to_r HERE new UIT; F e n % ATA _NUL rc= RE DO; CAL END; ELSE PUT UN; MEND fil ATA _NUL SET t CALL E UN; n f B name_fil file_nam a _; AME("&fi E 0 THEN "ALERT_" unsucces SYMPUT('"ALERT_" successf _rename; _; _rename_ ECUTE('% T L o f n s NOT IN ilable ( epath.&f ful." rc err','1')"I: Rena l."; iles2; ile_rena RIP(new_ SELECT f g e om_filen e of fil ; ; e of fil e(from_f ile_name)a l a me", "&fi &from_fi &from_f lename=' ||');'); o e pose e t lepath.&tlename to lename t |STRIP(f am e e dr e &to_file &to_fil nm)||', d e mber A e f m name name o_filena isplays A ile(s). ' text C T a o a S s R S S A C hisd a s e o b s t R EFERENCE chacherer, S L a A escribed w e o b d S w d c f erence: g F i g e p a m Statement: t ionary, g g external i a t h p sa a s ies. w r C S h e idea effic w e a c c ient o o S I n l a m c e apabilities o o a c a o f coworkerRanjandiscussingLLC.allserviceInstituteOtherregisteredtrademarksrespectiveauthor

Related Contents


Next Show more