For some weird reason, I just can not get this to work.
I have a dataset (paylines) I'm trying to write (conditionally) anchors. The names are in the variable anchor, and I thought all I'd have to do is check when the first column wasn't blank to write it out, but it just ain't happ'n. What I have below is the latest incarnation - I've tried various incarnations: PRETEXT, Cat, etc.
Just to further complicate matters, I'm trying to write this to an ('the evil') Excel spreadsheet. I have another worksheet that I want to eventually use an href to point to the records. IE, I have a cell in the first sheet that, when clicked, will go to the first record (position, emplid) of the paylines sheet.
ODS TAGSETS.EXCELXP OPTIONS(SHEET_NAME="PayRecords");
PROC REPORT DATA=paylines(OBS=1000) NOWD MISSING;
COLUMN anchor position_nbr emplid enddte project_id;
DEFINE anchor/GROUP NOPRINT;
DEFINE position_nbr/GROUP "Position Number";
DEFINE emplid/GROUP;
DEFINE enddte/GROUP FORMAT=MONYY5. ORDER=INTERNAL "Month";
DEFINE project_id/ ORDER FORMAT=$15. "Project ID";
COMPUTE BEFORE position_nbr;
IF Trimn(position_nbr) NE '' THEN Call Define(_row_, "STYLE", Cat("STYLE=[","PREHTML=",'"
"',"]"));
ENDCOMP;
COMPUTE project_id;
Call Define(_row_, "STYLE", 'STYLE=[POSTHTML=""]');
ENDCOMP;
RUN;
ODS TAGSETS.EXCELXP CLOSE;