<?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: Execution of MVS PGM as SAS PROC and PARM=&amp;quot;??&amp;quot;? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5309#M1684</link>
    <description>The issue is not how to pass parms to a SAS program.&lt;BR /&gt;
&lt;BR /&gt;
I'm looking for advice on passing a parameter while in a SAS program to another program that is being called using the PROC statement.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Chuck</description>
    <pubDate>Sat, 03 Nov 2007 04:11:44 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-11-03T04:11:44Z</dc:date>
    <item>
      <title>Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5307#M1682</link>
      <description>I'd like to find out how to execute an MVS program and pass a Parm to it using SAS PROC.&lt;BR /&gt;
&lt;BR /&gt;
The JCL looks like this:&lt;BR /&gt;
//step exec pgm=program,parm='parameter'&lt;BR /&gt;
&lt;BR /&gt;
I'd like to be able to insert the program into a sas program.&lt;BR /&gt;
&lt;BR /&gt;
proc program parm='parameter';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
This does not work.  The program does execute, but the parm is ignored.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Chuck Kirschke</description>
      <pubDate>Thu, 01 Nov 2007 05:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5307#M1682</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-01T05:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5308#M1683</link>
      <description>Hi:&lt;BR /&gt;
  Actually, I think it was PARMCARDS or SYSPARM or something like that for your JCL. And then that only SENT the parms to the Global Symbol Table...when your program started, if you only sent one value via the SYSPARM, you were OK just using &amp;amp;SYSPARM. But if you sent more than one value on your jobcard, then you had to split up the SYSPARM or PARMCARD into pieces.&lt;BR /&gt;
 &lt;BR /&gt;
  But, my memory must not be quite right. I see in the documentation that SYSPARM is for UNIX and that PARMCARDS seems to be for z/OS. I do not have the documentation for MVS, so I don't actually know which one worked for MVS, or how it worked.&lt;BR /&gt;
&lt;BR /&gt;
You could try this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
//STEP1    EXEC   SAS,OPTIONS='SYSPARM=wombat'&lt;BR /&gt;
//SYSIN    DD        *&lt;BR /&gt;
   &lt;BR /&gt;
** write parameter value to LOG;&lt;BR /&gt;
%put the parameter is: &amp;amp;SYSPARM;&lt;BR /&gt;
    &lt;BR /&gt;
** use parameter value in title;&lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
title "SYSPARM= &amp;amp;SYSPARM";&lt;BR /&gt;
run;&lt;BR /&gt;
/*&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
I got the above syntax from this 2005 paper:&lt;BR /&gt;
&lt;A href="http://www.lexjansen.com/pharmasug/2002/proceed/coders/cc05.pdf" target="_blank"&gt;http://www.lexjansen.com/pharmasug/2002/proceed/coders/cc05.pdf&lt;/A&gt;&lt;BR /&gt;
BUT, there's a different syntax here:&lt;BR /&gt;
&lt;A href="http://www.caliberdt.com/tips/Jul2005.htm" target="_blank"&gt;http://www.caliberdt.com/tips/Jul2005.htm&lt;/A&gt; and I don't have an MVS system to test on.&lt;BR /&gt;
&lt;BR /&gt;
Your best bet for help would be to contact Tech Support for specific assistance with MVS and JCL and how to go about passing parameters to SAS.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 01 Nov 2007 07:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5308#M1683</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-11-01T07:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5309#M1684</link>
      <description>The issue is not how to pass parms to a SAS program.&lt;BR /&gt;
&lt;BR /&gt;
I'm looking for advice on passing a parameter while in a SAS program to another program that is being called using the PROC statement.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Chuck</description>
      <pubDate>Sat, 03 Nov 2007 04:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5309#M1684</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-03T04:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5310#M1685</link>
      <description>Hi:&lt;BR /&gt;
  Wow, I did not get that at all from your original question! I don't understand what you mean by "passing a parameter while in a SAS program to another program that is being called using the PROC statement"? As I remember from my JCL days, a JCL procedure of 3 steps could be something like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
//MYJOB      JOB (111,222),'my sas job',CLASS=2,MSGCLASS=Q,NOTIFY=XXX123&lt;BR /&gt;
//STEP1     EXEC    SAS&lt;BR /&gt;
//DATAIN       DD     DSN=XXXXXX.YYYYYY.FLATFILE.SEQ,DISP=SHR&lt;BR /&gt;
//SASLIB       DD     DSN=XXXXXX.YYYYYY.SASLIB.ACCT,DISP=OLD&lt;BR /&gt;
//SYSIN DD *&lt;BR /&gt;
   &lt;BR /&gt;
data saslib.new;&lt;BR /&gt;
  infile DATAIN;&lt;BR /&gt;
  input @1 charvar $8. @10 numvar comma8.;&lt;BR /&gt;
run;&lt;BR /&gt;
   &lt;BR /&gt;
proc freq data=saslib.new;&lt;BR /&gt;
tables charvar;&lt;BR /&gt;
run;&lt;BR /&gt;
/*&lt;BR /&gt;
//* ***** ***** ***** ***** ***** *****&lt;BR /&gt;
//STEP2     EXEC    IEBGENER&lt;BR /&gt;
// ... more JCL and IEBGENER statements&lt;BR /&gt;
//* ***** ***** ***** ***** ***** *****&lt;BR /&gt;
//STEP3     EXEC   SAS&lt;BR /&gt;
//SASLIB       DD     DSN=XXXXXX.YYYYYY.SASLIB.ACCT,DISP=SHR&lt;BR /&gt;
//SYSIN DD *&lt;BR /&gt;
    &lt;BR /&gt;
proc means data=saslib.new;&lt;BR /&gt;
var numvar;&lt;BR /&gt;
run;&lt;BR /&gt;
/*&lt;BR /&gt;
//&lt;BR /&gt;
   &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Do you mean passing a parameter from SAS in STEP1 to SAS in STEP3??? Or creating something inside Step 1's DATA step program that would be used in Step 1's PROC FREQ???? I still think the best thing for you to do is to contact Tech Support for help on this.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 03 Nov 2007 05:04:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5310#M1685</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-11-03T05:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5311#M1686</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Its possible to call a program as a SAS PROC.&lt;BR /&gt;
&lt;BR /&gt;
For example:&lt;BR /&gt;
&lt;BR /&gt;
proc idcams;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
This will run IDCAMS just as if it were in JCL like:&lt;BR /&gt;
//js010 exec pgm=idcams&lt;BR /&gt;
&lt;BR /&gt;
Of course you would have to define the DD statements and the data that would be in the //SYSIN file.&lt;BR /&gt;
&lt;BR /&gt;
This works. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have another program.  Currently it is executed like this:&lt;BR /&gt;
&lt;BR /&gt;
//js010 exec pgm=&lt;PROGRAM&gt;,parm='&lt;PARAMETER&gt;'&lt;BR /&gt;
//in dd *&lt;BR /&gt;
&lt;DATA&gt;&lt;BR /&gt;
//out dd dsn=&lt;FILENAME&gt;,etc. . . . &lt;BR /&gt;
&lt;BR /&gt;
I have successfully executed it as:&lt;BR /&gt;
&lt;BR /&gt;
proc &lt;PROGRAM&gt;;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
But I can't pass the parameter to it.&lt;BR /&gt;
&lt;BR /&gt;
I've tried:&lt;BR /&gt;
proc &lt;PROGRAM&gt;; parm='&lt;PARAMETER&gt;';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc &lt;PROGRAM&gt;;&lt;BR /&gt;
parmcards;&lt;BR /&gt;
&lt;PARAMETER&gt;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
call &lt;PROGRAM&gt;('&lt;PARAMETER&gt;');&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
and several other variations.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I just want to pass a parameter to a program that is executed using the SAS PROC statement.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Chuck

Message was edited by: chuckkirschke&lt;/PARAMETER&gt;&lt;/PROGRAM&gt;&lt;/PARAMETER&gt;&lt;/PROGRAM&gt;&lt;/PARAMETER&gt;&lt;/PROGRAM&gt;&lt;/PROGRAM&gt;&lt;/FILENAME&gt;&lt;/DATA&gt;&lt;/PARAMETER&gt;&lt;/PROGRAM&gt;</description>
      <pubDate>Sun, 04 Nov 2007 22:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5311#M1686</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-04T22:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5312#M1687</link>
      <description>Hi:&lt;BR /&gt;
  That's pretty cool. The only thing I could find were these 2 Tech Support documents:&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/ts738.html" target="_blank"&gt;http://support.sas.com/techsup/technote/ts738.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/ts575.html" target="_blank"&gt;http://support.sas.com/techsup/technote/ts575.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  The first one (738) says that the feature is not officially supported. But it does have an example of passing a parm like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
  OPTIONS PARM=’NEW’;&lt;BR /&gt;
  PROC IEBUPDTE;&lt;BR /&gt;
  RUN;&lt;BR /&gt;
   &lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
  The second document (575) is an example of a COBOL module being called. Even though it's not officially supported, it seems that Tech Support would be the ones to help with this if you're still having issues.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Sun, 04 Nov 2007 22:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5312#M1687</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-11-04T22:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5313#M1688</link>
      <description>It certainly is possible, and the most reliable solution I found created a PDS member in job step 1.&lt;BR /&gt;
&lt;BR /&gt;
Then in Job step 2 you refer to this PDS member as a SYSIN which means you can put as much from the SAS step into the other step as you wish.&lt;BR /&gt;
&lt;BR /&gt;
It is also possible to do this using  TEMP  library assignments, but I don't have anything running the best OS in the world here to test the syntax.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Mon, 05 Nov 2007 09:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5313#M1688</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-05T09:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Execution of MVS PGM as SAS PROC and PARM="??"?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5314#M1689</link>
      <description>Using "options parm='&lt;PARAMETER&gt;';" worked.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.&lt;/PARAMETER&gt;</description>
      <pubDate>Thu, 08 Nov 2007 04:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Execution-of-MVS-PGM-as-SAS-PROC-and-PARM-quot-quot/m-p/5314#M1689</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-08T04:20:53Z</dc:date>
    </item>
  </channel>
</rss>

