Select Page

SAS- How to Insert a Row of Characters or Text when Columns are integer

SAS- How to Insert a Row of Characters or Text when  Columns are integer

I will simplify the question for you and mind you it is a tricky situation which you might come across your work as SAS Programmer.

suppose we have a table:- sl a b c 1 1 3 4 2 2 4 3 3 2 5 6 4 3 1 2 5 3 2 2

now we want our table as

sl a b c

1 1 3 4

2 2 4 3

3 2 5 6

4 xyzas awert defgs

5 3 1 2

6 3 2 2

I will give you the hint:-
  1. The hard way – change all columns to character format (using put function) and then update your table in PROC Sql by inserting a column at sl=4.
  2. The smart way i will create a picture format and using pretext option i will display the required text for sl=4(More work , i will create dummy values for required row).

About The Author

I like to write. So i write everything. No specific rules but here to enjoy the ride.

Like us or Dislike us. Please Let us know Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Comments