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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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