Well, after much playing, I got something similar to what SteveNZ suggested, but even more clunky. Here is the the gist of the program: An academic program review for all departments at my university. It is the same report, for all of the different departments, so we are using macros to program the logic once, and then run for the various departments (based on Major Codes, not department names - this wasn't my call). The report would be output using a file="Academic_Program_Review_for_&Year._&Department..rtf" That last variable would have a varying degree of spaces depending on the department name, for instance, Visual Arts would come with 24 spaces before the .rtf My boss would not accept that, and it is their program (I'm just attempting to assist on certain aspects). So this is what I came up with: IF MAJOR_COHORT IN &major_list; dept1=TRIM(put(major_cohort,$dept_INV.)); /*Because of &dept_inv., Dept1 has a length of $36 regardless of actual length of the current department name, trim does nothing here*/ CALL SYMPUT ("DEPARTMENT1",DEPT1); /*Create a variable of the department name (this was previously used in the file name above*/ %let test = %length(&department1); /*Use the above variable to count the length of the current department name, Visual Arts = 11*/ DEPT = put(DEPT1,$&test..); /*Create a new DEPT with the length of the current Department, Visual Arts would be 11*/ CALL SYMPUT ("DEPARTMENT",DEPT); /*Create a new variable for use in the .rtf file name (see above) without the trailing spaces/blanks*/ Thank you all for your time helping me.
... View more