Hi all
I am running SAS under OS/390 and I have a small problem.
What I need to do is simply grab a list of part numbers from an input dataset and pass this list of part numbers to a SQL statement to update the Price column of a table. The code looks like this:
OPTIONS S = 72 DB2SSID = DB39 ERRORABEND ;
DATA C;
INFILE DATOUT;
INPUT @01 OPART $12.;
CALL SYMPUT ('NPART',TRIM(LEFT(PUT(OPART,CHAR12.))));
PROC SQL;
LIBNAME AAUAIBT DB2 SSID=DB39;
EXECUTE ( UPDATE table.test
SET COST=1111.11
WHERE PART_NUMBER=&NPART) BY DB2;
QUIT;
RUN;
The problem I am having is that the CALL SYMPUT goes straight to the last entry in the input dataset and retrieves the last value - it does not pass any of the previous part numbers across to the SQL statement, expect for the last one.
How can I solve this ?
Thanks for your help.