You are here: Home > Knowledge Refreshers

KR editions 80 to 82

KR-80 (OUTLIM parameter)

We'll take a look at the OUTLIM parameter in JCLs.

Sometimes while giving displays in the COBOL code, you might find that the output goes on and on (stuck in an infinite loop). 
Or you might want to restrict the amount of lines produced in the spool. To do this we can make use of the parameter OUTLIM.
This parameter sets an upper limit on the number of lines that can be held in a particular DDname. For example:

Now the maximum lines which can be held in sysout (i.e. in the spool under SYSOUT) is 100. When the COBOL code writes more lines, MVS will cancel the job with a return code of 722. The job will still be present in the spool and the first 100 lines can be seen in SYSOUT.
The maximum number of lines that can be specified in the OUTLIM parameter is around 16 million.

KR-81 (Sending emails thro JCL!)

Did you know that we can send emails from mainframes?

The following is a sample for sending emails using IEBGENER.

//SYSUT1 DD * 
HELO jobname
MAIL FROM: <your-email>
RCPT TO: <recepient's email address>
Date: APRIL 6, 2005 
type the email content here

  • IEBGENER copies SYSUT1 to SYSUT2.
  • In this case, it copies the statements from SYSUT1 to the SMTP (Simple Mail Transfer Protocol) server. 
  • The statements in SYSUT1 are actually SMTP commands (and these are the commands which are used internally when we send emails). 
  • All the SMTP keywords are in uppercase (HELO, MAIL FROM, RCPT TO, DATA); the keywords are self-explanatory.

KR-82 (More linking)

ERRATA: In case you tried to use the email JCL sent yesterday and if the contents didn't appear try adding a couple of lines; SUBJECT: ---- and a blank line after this (these 2 lines should be added before the contents). 

To round up the week we'll go back to our friend the linker.....

  • The linker is used to combine several object codes into a single load module. In our JCLs we specify the object codes to be included via the INCLUDE statement. If you've taken a look at the link step, then you'll find something like this:

more include statements

  • The INCLUDE statement will include the object code named DSNTIAR present in the PDS which has a ddname of SYSLIB. Basically SYSLIB will be another DD name within the link step and here we'll specify the PDSes where the various object codes can be found. 
  • General syntax of INCLUDE:

INCLUDE ddname(member)

  • The NAME statement signals the end of the load module and also gives a name to the final load module produced. In our example the name of the load is MYPROG. 
  • An R is used to denote that the load module by this name exists and should be replaced.

Note: The linker step applies outside of mainframes also; for example in VC++ you'll have to include the libraries used by your program in project settings (only difference is that it's all GUI here!).

Go back to the main contents page