Hi Everyone, I am trying to parse all libnames and library paths from a log created with SCAPROC. I have been succesful parsing the dataset names using the following code: data output_files_&code_type.; infile scalog truncover; input @1 logline $256.; keep libname filename; retain prx_output_file; if _n_=1 then do; prx_output_file = prxparse("!\bJOBSPLIT: DATASET OUTPUT \b.*\b (\b.*\b) \*/!"); end; if prxmatch(prx_output_file, logline) > 0 then do; filename_full=prxposn(prx_output_file,1,logline); libname=scan(filename_full,1); filename=scan(filename_full,2); output output_files_&code_type.; end; run; However I am receiving no regular expression matches for the following code: data output_lib_&code_type.; infile scalog truncover; input @1 logline $256.; keep filepath libname; retain prx_output_lib; if _n_=1 then do; prx_output_lib = prxparse("!\bJOBSPLIT: LIBNAME (\b.*\b) ("('[^"]')*") \*/!"); end; if prxmatch(prx_output_lib, logline) > 0 then do; libname=prxposn(prx_output_lib,1,logline); filepath=prxposn(prx_output_lib,2,logline); output output_lib_&code_type.; end; run; I have succesfully tested the regular expression(in bold) in a browser based editor which returns the libname in capture group 1 and the pathname in capture group 2. An example of the SCAPROC logline I would like to parse is below: /* JOBSPLIT: LIBNAME LMCOMSYS "/team/Common/System/v1.00.3" access=readonly */ Would anyone be able to point out where I am going wrong in SAS? Thanks, Jordan
... View more