data all_trans;
infile "F:\UNL_academic\Insider Trading\Insider Trading_PIandEPU\
data_from_open_secrets\PFDtransactions_with_data_definitions.txt"
dlm = ',' dsd firstobs=2 missover;
input ID: $18. Chamber: $3. CID:$12. CalendarYear:$6. ReportType: $3. Asset4SJD: $3.
Asset4Transacted: $102. Orgname: $42. Ultorg: $42. RealCode: $7. Source: $7.
Asset4Descrip: $102. Orgname2: $42. Ultorg2: $42. RealCode2: $7. Source2: $7.
Asset4Purchased: $3. Asset4Sold: $3. Asset4Exchanged: $3. Asset4Date: Best12.
Asset4DateText: $52. Asset4TransAmt: $6. Asset4ExactAmt: Best24. CofD:$3.
TransNotes: $102. Dupe: $3.;
run;
data all_trans_nopipes;
set all_trans;
array _char(*) $ ID --Dupe;
do i=1 to dim(char);
_char(i) = compress(_char(i), '|');
end; @Reeza The first block of code can read the data as text, but when I execute the second block, I am getting two errors as follows: All variables in array list must be the same type, i.e., all numeric or character The DIM, LBOUND, and HBOUND functions require an array name for the first argument.
... View more