It is not at all clear what your question is.
So for each of those names you want to create a SAS program file? What SAS code are you going to put into the file(s)? How is it going to be different for each of the values from your input file?
How is this related to SAS/DI?
But we can provide some feedback on the code you posted.
Why are you using PROC IMPORT to read a text file? Especially one that only has one variable? Just read the file.
You could read the full line into your character variable.
data WORK.JOBS ;
infile LFYXIN01 truncover ;
input var1 $100. ;
run;
Or if it actually has tabs you can read the first column.
data WORK.JOBS ;
infile LFYXIN01 dsd dlm='09'x truncover ;
input var1 :$100. ;
run;
To simplify your command generation. You can use the new CAT...() series of functions instead of just use in the || operator.
Also why are you using the COMPRESS() function? Is it just to remove the trailing spaces from the variable values? If so then use the CATS() or CATX() function which will automatically strip the leading/trailing spaces.
data test;
set JOBS;
length LNOMJOB LNOMLOG $200 CMD $1000 ;
LNOMJOB=quote(cats('\\jafile01\sdtmaps\',substr(Var1,3,2),'\',var1,'.spk'));
LNOMLOG=quote(cats('\\jafile01\sdtmaps\Export_Logs\',var1,'.LOG')) ;
cmd = catx(' '
,'J:\SASHome\SASPlatformObjectFramework\9.4\EXPORTPackage'
,'-host SDSASA01'
,'-port 8561'
,'-user',"&userID"
,'-password',"&user_password"
,'-package',LNOMJOB
,'-objects "/"'
,'-name',var1
,'-nameMatchType EQUALS'
,'-includeDesc'
,'-types "Job,ExternalFile"'
,'-excludeSubTypes'
,'-log',LNOMLOG
);
call system(cmd);
run;
... View more