<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to run SAS pgm through C:D RUN TASK in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263211#M9863</link>
    <description>The number log is clean with no errors.&amp;nbsp; Says that the command was submitted successfully. But no log file as defined in the shell...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 12 Apr 2016 14:41:40 GMT</pubDate>
    <dc:creator>kannand</dc:creator>
    <dc:date>2016-04-12T14:41:40Z</dc:date>
    <item>
      <title>Unable to run SAS pgm through C:D RUN TASK</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263091#M9861</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a AIX/Unix script that runs a SAS program along with other debugging SAS commands as shown below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;#!/bin/ksh
ls -altr &amp;gt; /cml_jobs/cim/dev/users/k85671/scripts/content1.txt
.profile
sas /cml_jobs/cim/dev/users/k85671/scripts/cimport.sas -altlog /cml_jobs/cim/dev/users/k85671/scripts/cimportlog.txt
ls -altr &amp;gt; /cml_jobs/cim/dev/users/k85671/scripts/content2.txt&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I call this script through this code which is a proc run through a JCL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NDMRUN2   PROCESS                                               - 
  HOLD=NO                 /* YES, NO, OR CALL                */ - 
  PNODE=HI.CHICAGO        /* DESTINATION                     */ - 
  SNODE=VH2_NABISAS       /* SOURCE                          */ - 
  RETAIN=NO                                                       
STEP1  COPY  FROM (PNODE DSN=&amp;amp;INDSN  DISP=SHR                   - 
                   SYSOPTS=":DATATYPE=BINARY:")                 - 
               TO (SNODE DSN=&amp;amp;OUTDSN DISP=RPL                   - 
                   SYSOPTS=":DATATYPE=BINARY:")                   
STEP2 RUN TASK SNODE (PGM=UNIX)                                 - 
    SYSOPTS="/cml_jobs/cim/dev/users/k85671/scripts/ls.ksh"       &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I run the script on PuTTY, it runs like a breeze. However, when I run the JCL, all the commands run except the SAS pgm.&amp;nbsp; The NDM logs are clean. But the file &lt;EM&gt;&lt;STRONG&gt;"cimportlog.txt"&lt;/STRONG&gt;&lt;/EM&gt; is not created while the files above and below are created (content1.txt, content2.txt)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Unsure of the the issue is..... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 04:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263091#M9861</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2016-04-12T04:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run SAS pgm through C:D RUN TASK</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263208#M9862</link>
      <description>&lt;P&gt;Are the users that run your script the same?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The JCL itself should create a log, look there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 14:37:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263208#M9862</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-12T14:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run SAS pgm through C:D RUN TASK</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263211#M9863</link>
      <description>The number log is clean with no errors.&amp;nbsp; Says that the command was submitted successfully. But no log file as defined in the shell...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Apr 2016 14:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263211#M9863</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2016-04-12T14:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run SAS pgm through C:D RUN TASK</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263217#M9864</link>
      <description>&lt;P&gt;One reason that a SAS batch run does not create a log file is a missing program file. If the JCL does not catch stderr, the relevant message might never appear where you can find it.&lt;/P&gt;
&lt;P&gt;This really smells like different environments between JCL and your commandline. Maybe the JCL ID can't read in your home directory.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 14:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263217#M9864</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-12T14:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to run SAS pgm through C:D RUN TASK</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263221#M9865</link>
      <description>&lt;P&gt;Hmm. I see something:&lt;/P&gt;
&lt;PRE&gt;#!/bin/ksh
ls -altr &amp;gt; /cml_jobs/cim/dev/users/k85671/scripts/content1.txt
.profile
sas /cml_jobs/cim/dev/users/k85671/scripts/cimport.sas -altlog /cml_jobs/cim/dev/users/k85671/scripts/cimportlog.txt
ls -altr &amp;gt; /cml_jobs/cim/dev/users/k85671/scripts/content2.txt&lt;/PRE&gt;
&lt;P&gt;This .profile may be bogus.&lt;/P&gt;
&lt;P&gt;Why?&lt;/P&gt;
&lt;P&gt;If it sets environment variables, it does so in a shell forked off the one that runs the scripts. When it terminates, all changes are lost.&lt;/P&gt;
&lt;P&gt;Use&lt;/P&gt;
&lt;PRE&gt;. /path_to_your_home_directory/.profile&lt;/PRE&gt;
&lt;P&gt;instead if you want to make sure that another user gets your environment. If "sas" is not found, and stderr is not correctly captured, your shell script will exit with the exit code from the last command, which won't fail.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 15:00:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Unable-to-run-SAS-pgm-through-C-D-RUN-TASK/m-p/263221#M9865</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-12T15:00:53Z</dc:date>
    </item>
  </channel>
</rss>

