BookmarkSubscribeRSS Feed
thanikondharish
Calcite | Level 5

F1

F2

F3

F4

F5

STUDYID

1

Study Identifier

string

8

DOMAIN

2

Domain Abbreviation

string

2

USUBJID

3

Unique Subject Identifier

string

16

DSSEQ

4

Sequence Number

integer

8

DSTERM

5

Reported Term for the Disposition Event

string

200

DSDECOD

6

Standardized Disposition Term

string

200

DSCAT

7

Category for Disposition Event

string

50

DSSCAT

8

Subcategory for Disposition Event

string

50

VISITNUM

12

Visit Number

integer

8

VISIT

13

Visit Name

string

50

DSSTDTC

14

Start Date/Time of Disposition Event

string

19

DSSTDY

16

Study Day of Start of Disposition Event

integer

8

 

PROC SQL ;
CREATE TABLE AT AS
SELECT 'LABEL'||' '||STRIP(F1)||' '||"='"||STRIP(F3)||"'" AS NEW,
CASE WHEN UPCASE(F4)='STRING' THEN
STRIP(F1)||' '||"='"||STRIP(F3)||"'"||' LENGTH=$'||STRIP(F5)||'.' END
AS NEW1,
case WHEN CALCULATED NEW1=' ' THEN NEW END AS NEW2
FROM S1 ;
QUIT;

when concatinated some variable it gives error

can you explain that

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Follow up marking posts as answered by providing test data in the form of a datastep:

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

 

Then show what the output should look like.  Maybe:

data want;
  set have;
  length line $2000;
  line=catx(' ','label',f1,'=',quote(f3),'length=',ifc(f4='string',cats('$',f5),f5));
run;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 607 views
  • 4 likes
  • 3 in conversation