I apologize for the delay as I got caught up with something else. I have attached the sample data file and the output file being generated. As you would see that this is not the expected output. I am also pasting the log. What am I missing here? ========LOG ================ 47650 /* Fixing CR LF */ 47651 %let dsin= "X:\studies.txt"; 47652 %let dsout="X:\links.txt"; 47653 %let repA=''; /* replacement character for LF */ 47654 %let repD=''; /* replacement character for CR */ 47655 data _null_; 47656 infile &dsin recfm=n ; 47657 file &dsout recfm=n; 47658 input a $char1.; 47659 retain open 0; 47660 if a = '"' then open = ^(open); 47661 if open then do; 47662 if a = '0D'x then put &repD; 47663 else if a = '0A'x then put &repA; 47664 end; 47665 run; NOTE: UNBUFFERED is the default with RECFM=N. NOTE: The infile "X:\studies.txt" is: Filename=X:\studies.txt, RECFM=N,LRECL=256,File Size (bytes)=2100, Last Modified=23Nov2020:10:11:32, Create Time=23Nov2020:10:05:28 NOTE: UNBUFFERED is the default with RECFM=N. NOTE: The file "X:\links.txt" is: Filename=X:\links.txt, RECFM=N,LRECL=256,File Size (bytes)=0, Last Modified=23Nov2020:10:18:15, Create Time=23Nov2020:10:11:59 NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
... View more