You would get most effective feedback by sending the diagnostic output from your SASLOG to include a PUTLOG _ALL_; command revealing all variable values. Any other feedback is a virtual crap-shoot, especially given that we don't know what your input WORK.A and WORK.B variable values contains with each DATA step pass.
thnx for your reply sbb.
I used PUTLOG _all_ to see the values of all.
the value of the variable I need is blank.
Let me ask a basic/stupid question: Can you pass a variable from one dataset X to another dataset Y without reading X?
If the answer is NO, then that's the problem I m facing.
I am merging 2 datasets (A & B) to create C. While I m in C, I need to access the variable from X. X contains only on row of data. If I use set to read X it would screw up my merge. Because the 2 files I am merging (A & B) contain multiple rows. The merge would stop after reading just one row. I hope I am explaining my problem clearly.
From your recent post, you gave some indication that there is only one row and variable/column you wish to pass to another DATA step. So, yes, you can use CALL SYMPUT in "data step #1" to generate a SAS macro variable.
And in "data step #2", you can use a RETAIN statement to access the macro variable, assigning a SAS data variable / column value, referencing the macro variable using double-quote marks in the RETAIN statement.