SAS Life Science Analytics Framework and the clinical data products from SAS

How will compress if ARMCD length more than 20 character. Please give me answer

Reply
New Contributor
Posts: 4

How will compress if ARMCD length more than 20 character. Please give me answer

 
Super User
Posts: 10,871

Re: How will compress if ARMCD length more than 20 character. Please give me answer

Which Compress are you talking about? Libname has a compress option, compress is also a data set options and there is a Data step function compress.

 

If the data function then you will need to provide actual examples since the purpose of the function is to remove characters. The result is very highly dependent on 1) the starting value and 2) the list of characters supplied to remove. The length doesn't matter too much.

New Contributor
Posts: 4

Re: How will compress if ARMCD length more than 20 character. Please give me answer

DATA text;
infile cards truncover;
input coval_t $600. ;
len_t=length(coval_t);
cards;
COMPARED TO PREVIOUS ECG, SIGNIFICANT CHANGES HAVE OCCURRED DUE TO CRITERIA
FOR
POSSIBLE ANTERIOR INFARCT GONE
COMPARED TO BASELINE ECG, SIGNIFICANT CHANGES HAVE OCCURRED DUE TO
NON-SPECIFIC
CHANGES HAVE OCCURRED DUE TO NON-SPECIFIC INTRA-VENTRICULAR CONDUCTION
DELAY IS
SEEN
POSSIBLE WOLFF-PARKINSON-WHITE COMPARED TO BASELINE ECG, SIGNIFICANT
CHANGES HAVE CCURRED DUE TO POSSIBLE WOLFF-PARKINSON-WHITE IS SEEN COMPARED
TO PREVIOUS ECG, SIGNIFICANT CHANGES HAVE OCCURREDD DUE TO POSSIBLE
WOLFF-PARKINSON-WHITE IS SEEN
COMPARED TO BASELINE ECG, SIGNIFICANT CHANGES HAVE OCCURRED DUE TO AGE
UNDETERMINED, SEPTAL MI IS SEEN COMPARED TO PREVIOUS ECG, SIGNIFICANT
CHANGES HAVE
OCCURRED DUE TO AGE UNDETERMINED, SEPTAL MI IS SEEN
PROLONGED QT FULLY PACED BEAT, THE QT CHANGE AND QT PROLONGATION SHOULD BE
ONSIDERED UNDER THESE CIRCUMSTANCES AND UNLIKELY TO BE DRUG EFFECT COMPARED
TO BASELINE ECG, SIGNIFICANT CHANGES HAVE OCCURRED DUE TO QTCB CHANGED BY
MSEC FROM BASELINE COMPARED TO BASELINE ECG, SIGNIFICANT CHANGES HAVE
OCCURRED DUE TO AV SEQUENTIAL OR DUAL CHAMBER ELECTRONIC PACEMAKER IS SEEN
COMPARED TO PREVIOUS ECG, SIGNIFICANT CHANGES HAVE OCCURRED DUE TO AV
SEQUENTIAL OR DUAL CHAMBER ELECTRONIC PACEMAKER IS SEEN
;
run ;

this is my code but i am getting turncation . I want no turncation .I want
one variable contain 200 length not more than 200 and no truncation

DATA temp;
SET text;
length coval coval1 coval2 $200 ;
ovar=coval_t;
if len_t=<200 then coval=substr(coval_t,1,200);
if 200coval=substr(coval_t,1,200);
coval1=substr(coval_t,201,400);
end;
if len_t>400 then do;
coval=substr(coval_t,1,200);
coval1=substr(coval_t,201,400);
coval2=substr(coval_t,401);
end;
keep ovar coval coval1 coval2;
run ;
Ask a Question
Discussion stats
  • 2 replies
  • 368 views
  • 0 likes
  • 2 in conversation