I might approach this by inspecting the _INFILE_ buffer at each location which might hold a minus sign, then inserting a blank as a placeholder if there is no minus sign. For example: data want ; input @ ; do minuscol = 4 , 11 ; if substr( _infile_ , minuscol , 1 ) NE '-' then substr( _infile_ , minuscol ) = cat( ' ' , substr( _infile_ , minuscol ) ) ; end ; input a 3. b 4. c 3. d 4. ; cards ; 1.11.21.31.4 2.1-2.22.32.4 3.13.23.3-3.4 4.1-4.24.3-4.4 ; Comments 1. This problem as originally posted put a lot of work on the reader: unzipping files, examining long records, and sifting through a lot of code which did not address the issue. A simple, compact example focusing on the problem at hand will get a lot more attention. 2. If possible, educate the data provider. Files structured like this are substandard.
... View more