BookmarkSubscribeRSS Feed
anming
Pyrite | Level 9
data list_modified;
input name $ & +3 lastname & $16. team $;
datalines;
Joseph Joergensen White Red
Mitchel Mc Allister blue
Su Ellen Fischer Simon green
;
run;

what does '+3' mean? without '+' only letter at position 3 is loaded for the name.  

5 REPLIES 5
mkeintz
PROC Star

Change the +3 to, say, +6, and look at the result for lastname.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
anming
Pyrite | Level 9
it works from without, +0 to +3. but from +4 the last name will be truncated.
mkeintz
PROC Star

@anming wrote:
it works from without, +0 to +3. but from +4 the last name will be truncated.

Truncated on which side?

What does that tell you about the function of prefixing a number with a "+"?

 

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
anming
Pyrite | Level 9

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=lestmtsref&docsetTarget=n...

 

'@n' is the column point controls. '+m' means to shift m positions to the right. 

Tom
Super User Tom
Super User

Without the + the 3 means you want to read the variable NAME using COLUMN input instead of LIST MODE (modified or not).