Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ok, I did some digging, and, with the guidance that avisser gave me, I was able to figure out what I had to do. So, for future reference for anyone who might have this question (or one similar), here is what I figured out:</p> <p>Step 1: Create a "PROC" with the variables you will be using.</p> <p>ex. I wanted to use variables for the "PARM" in my COBOL compiler that had the default values of "TEST" and "APOST", so I wrote something like:</p> <pre><code>//PROC1 PROC CPARM='TEST,APOST', </code></pre> <p>Step 2: Use those newly defined symbolic parameters in your actual JCL step. The "&amp;" character shows that whatever follows it is a symbolic parameter.</p> <p>ex. I used the aforementioned "CPARM" for my COBOL compile step:</p> <pre><code>//COB EXEC PGM=IGYCRCTL,REGION=&amp;CREGION, // PARM='&amp;CPARM' </code></pre> <p>Step 3: End your "PROC" with a "PEND" statement after your actual step.</p> <p>ex. After I listed all of my variables and I listed all the steps for compilation (compiler name, where the compiler can be found, and, as can be seen right before the PEND statement, the SYSUT1-SYSUT7 statements), place your PEND keyword:</p> <pre><code>//SYSUT7 DD UNIT=DISK,SPACE=(CYL,(1,1)) // PEND </code></pre> <p>Step 4: Add any additional JCL steps and/or code to your source file and you're off!</p> <p>Notes: </p> <p>-You can have more than one PROC statement in a single JCL file. I had three: one for COBOL compilation, one for the linkage editor and one for the program fetch. I also have COBOL code in the same file that my PROC statements are in.</p> <p>-This took place on an IBM Mainframe running z/OS.</p> <p>-Above, it can be seen that my "CPARM" variable is set to the default of 'TEST,APOST'. It is possible to have a variable be null by default by simply leaving the field blank (ex. CPARM=,).</p> <p>-You may have noticed that after the CPARM definition, there is a comma; this is because I have more variables after it. Please remember that the last symbolic parameter you create for any given PROC should have nothing following it (ie. no comma). You can, of course, place a comment line (//*), another PROC or actual code afterward, but the last symbolic parameter should have nothing following it on the same line.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload