Hi All,
I have a problem when I try invoke a shell DeployJobs from data step SAS.
For Example:
data _null_;
length cmd_new $1000.;
cmd_new='/u02/SAS/SASHome/SASDataIntegrationStudioServerJARs/4.8/DeployJobs -profile "Test" -deploytype deploy -objects "/MSCI/07 Test/Test_job" -sourcedir "/u02/SAS/sasdati/progettisas/passivi/programmi/pgm_sas/job_deploy/test" -deploymentdir "TESTDEPLOY" -metarepository Foundation -metaserverid "A5NH0LQQ.AT000005" -servermachine "lxbsl801.gbm.lan" -serverport 8592 -serverusername "sasadm@saspw" -serverpassword "SASpwd001" -batchserver "SASAppMSCI - SAS DATA Step Batch Server" -folder "/MSCI/06 Deploy/Test"';
rc=system(cmd_new);
run;
This command remain in stand by.
In the shell command I execute this command
[sassrv@pippo script]$ ps -ef|grep sas|grep DeployJobs
sassrv 8049 58495 0 10:33 ? 00:00:00 /bin/sh /u02/SAS/SASHome/SASDataIntegrationStudioServerJARs/4.8/DeployJobs -profile Test -deploytype deploy -objects /MSCI/07 Test/Test_job -sourcedir /u02/SAS/sasdati/progettisas/passivi/programmi/pgm_sas/job_deploy/test -deploymentdir TESTDEPLOY -metarepository Foundation -metaserverid A5NH0LQQ.AT000005 -servermachine lxbsl801.gbm.lan -serverport 8592 -serverusername sasadm@saspw -serverpassword SASpwd001 -batchserver SASAppMSCI - SAS DATA Step Batch Server -folder /MSCI/06 Deploy/Test
The "Double Quote" is not send when I invoke the cmd.
If I use Put:
data _null_;
length cmd_new $1000.;
cmd_new='/u02/SAS/SASHome/SASDataIntegrationStudioServerJARs/4.8/DeployJobs -profile "Test" -deploytype deploy -objects "/MSCI/07 Test/Test_job" -sourcedir "/u02/SAS/sasdati/progettisas/passivi/programmi/pgm_sas/job_deploy/test" -deploymentdir "TESTDEPLOY" -metarepository Foundation -metaserverid "A5NH0LQQ.AT000005" -servermachine "lxbsl801.gbm.lan" -serverport 8592 -serverusername "sasadm@saspw" -serverpassword "SASpwd001" -batchserver "SASAppMSCI - SAS DATA Step Batch Server" -folder "/MSCI/06 Deploy/Test"';
put cmd_new=;
run;
In the log
cmd_new=/u02/SAS/SASHome/SASDataIntegrationStudioServerJARs/4.8/DeployJobs -profile "Test" -deploytype deploy -objects "/MSCI/07 Test/Test_job" -sourcedir "/u02/SAS/sasdati/progettisas/passivi/program
mi/pgm_sas/job_deploy/test" -deploymentdir "TESTDEPLOY" -metarepository Foundation -metaserverid "A5NH0LQQ.AT000005" -servermachine "lxbsl801.gbm.lan" -serverport 8592 -serverusername "sasadm@saspw" -
serverpassword "SASpwd001" -batchserver "SASAppMSCI - SAS DATA Step Batch Server" -folder "/MSCI/06 Deploy/Test" -log /u02/SAS/sasdati/progettisas/solvency2/cmn/files/file_logs/log_deploy.log
NOTE: The data set WORK.PIPPO has 1 observations and 1 variables.
Well, I can't test this, so just going by what is in the documentation you might need to setup your quotes differently:
Have you tried it using X or the call system() functions?
Really not seeing what the question here is? In the command you typed into shell you did not put double quote marks around certain paramters and it worked. In SAS you are sneding out a string from SAS to shell with double quotes around certain parameters and it doesn't work. Hence, remove the double quotes from around certain parameters in the string sent from SAS??
My question is :
Why SAS remove the Double Quote in Shell Script when execute the command?
The shell must to have quote or double quote in parameter.
Is possible to send quote or double quote in shell command?
Well, I can't test this, so just going by what is in the documentation you might need to setup your quotes differently:
Have you tried it using X or the call system() functions?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: