Something is wrong with your datalines.
Copying your code from your original post and it works fine for me.
One thing that looks very strange is this TAB character in the first column of the last line of the data that it echoed to the LOG with the error message.
Where did that come from?
Always when entering in-line data in the SAS editor make sure to start the lines in column one. Do NOT let SAS autoindent the lines. To remind yourself you should remove the indentation from the DATALINES (or CARDS) statement also.
Here is your data step cleaned up. I also removed the unneeded periods from the LENGTH statement and the unneeded $ from the INPUT statement (the types of the variables has already been set by the LENGTH statement.)
data CTL_JOINFLD;
infile datalines dsd /*delimiter=','*/;
length tbl_name1 $25 tbl_name2 $25 id $20 prim_key $20;
input tbl_name1 tbl_name2 id prim_key ;
datalines;
COUNTERPARTY,COUNTERPARTY_HIST,Y,COUNTERPARTY_ID
COUNTERPARTY,COUNTERPARTY_HIST,N,COUNTERPARTY_NAME
LKP_BS_GL_FRP_MAP,LKP_BS_GL_FRP_MAP,Y,GL_ID
LKP_BS_GL_FRP_MAP,LKP_BS_GL_FRP_MAP,N,BUSINESS_UNIT
;
NOTE: You can change your Editor preferences so that uses SPACES instead of physical TAB characters when it indents code lines.
... View more