BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cosimodc
Calcite | Level 5

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.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, I can't test this, so just going by what is in the documentation you might need to setup your quotes differently:

http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p028ivnihf9...

Have you tried it using X or the call system() functions?

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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??

cosimodc
Calcite | Level 5

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?

 

 

 

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, I can't test this, so just going by what is in the documentation you might need to setup your quotes differently:

http://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p028ivnihf9...

Have you tried it using X or the call system() functions?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1501 views
  • 0 likes
  • 2 in conversation