I am trying to concatenate around 200+ .txt files into a single data set where they are stacked on top of each other and also insert column headers/variable names. There are no column names in the data as its a .txt file of tabulated data but all should follow a ordered format which aligns with column headers that I have.[ all my variables in after input@ are in this order] I also want the file name to be another variable column header in the data set. I know there was a post about appending a .txt folder similar to this but for some reason my code is not producing the right results? I opened the created data set and got "."in all my fields. Does this have something to do with informat/format use? Also it seems there is a length cap on variable names, is the format simply $20. to extend the width? [I am sorry, I am a new SAS user and trying to wrap my head around the nuances so forgive me if I am making big simple mistakes] I have pasted my code below. I have redacted my file and variable names libname peer "pathname"; data name; length filename $600; infile "pathname" eov=eov filename=filename ENCODING="WLATIN1" dsd dlm='09'x truncover LRECL=32767; input@ Variable 1 Variable 2: $20. 83 more variables Run;
... View more