Just some comments on the example SAS code you posted.
If you want to set a macro variable you don't need to run a data step;
%let imsid=;
You almost never want to use the extremely ancient MISSOVER option or the merely ancient CALL SYMPUT() method. Instead use the modern TRUNCVOER option and the CALL SYMPUTX() method.
The only reason to use MISSOVER is if you want INPUT to ignore text at the end of line that is too short for the informat width being used.
The only reason to use CALL SYMPUT() is if you want the generated macro variable to have leading and/or trailing spaces.
The reasons that example would work using those ancient options/methods is
1) Because you are reading from a card deck the data lines will contain 80 characters even when the number of non blank characters is less than the 14 bytes you are reading.
2) Your usage of the IMSID macro variable most not mind the extra 10 spaces that you stored into the value by using CALL SYMPUT() with a character variable defined to store 14 bytes.
Of course you could also use the ancient NAMED INPUT style of reading data.
/* Initialize IMSID macro variable */
%let imsid= ;
/* Read IMSID from SETUP */
data _null_;
infile setup ;
input @'IMSID=' imsid :$4.;
call symputx('imsid',imsid);
run;
... View more