======================= Miscellaneous JCL Notes ======================= -Ian! D. Allen - idallen@idallen.ca ------------------- Order of Parameters (Style) ------------------- JES and MVS don't care about JCL keyword parameter order. On the job, put the most used parameters first. Note! Not all of these parameters are necessarily present in your particular job. When you do specify some of these parameters, specify them in the following order. Don't specify things that don't apply to your job or that have reasonable defaults. The SYSOUT parameters are simply given in alphabetical order. Other DD parameters are given in order of frequency of use in this course. //jobname JOB acct,name [mandatory] CLASS=, [almost always used] MSGCLASS=,MSGLEVEL=,PRTY=,TYPRUN= [alphabetical] //stepname EXEC PGM=,PROC=, [always used] //dd.name DD * [input stream data] SYSOUT= [sysout: most common] DSN=,DISP=, [dataset: most common] DCB=(DSORG=,LRECL=,BLKSIZE=,RECFM=), [dataset: commonly used] UNIT=,VOL=SER=,LABEL=(,), [dataset: not as common] ----------------------- Miscellaneous JCL Notes ----------------------- Always document your "guesses" in your JCL. Explain what you are guessing and how that affects your JCL coding. Is an incorrect guess going to cause a run-time error or a JCL error? Look up unfamiliar parameters in the IBM JCL Reference Manual before you use them. Know what you are saying before you say it. Input datasets have their DCB information stored in their labels. You don't need to code any DCB parameters in the JCL for input datasets. IDCAMS REPRO creates its output dataset using the DCB of the input dataset, unless you code JCL to adjust the output dataset DCB. (Many times you do want a different BLKSIZE= for the output dataset.) Pay attention to the efficient use of the output dataset medium and re-block your output according to the medium to which you are writing. You can omit the DCB=() keyword around the DCB parameters - it is optional. Always code the DCB parameters in the same order: DSORG,LRECL,BLKSIZE,RECFM Do not code DCB parameters that are already set by the program using the dataset; however, if you code a BLKSIZE=, also code RECFM=FB. (Don't code BLKSIZE= all by itself.) Instream data always has this data control block format: DCB=(DSORG=PS,LRECL=80,BLKSIZE=80,RECFM=F) Be careful to re-block the output when writing instream data to disks and tapes. (If you don't do this, you'll waste much of the output medium.) ANSI label tapes always need to be identified in the JCL as having ANSI labels, even on input, even if catalogued. (The label is the first thing on the tape - you have to know what kind of label it is to be able to read it properly!) ANSI tapes have a maximum block size of 2K (2048). Writing to tapes, you must maximize the output DCB block size to avoid wasting space and slowing down the job. Re-block your output to make best use of the tape. ANSI tapes have a maximum block size of 2K. (This is one of the exceptions!) When calculating the number of tape drives needed for your job CLASS=, remember that the maximum is the maximum number needed *simultaneously*, by *one* single program. It is not the sum of all the tape drives used in the job. A job may use ten tapes and still require only one tape drive, if the ten tapes are used only one tape per step in ten job steps. The steps that matter when counting simultaneous tape drives are the steps in your job *after* all procedures have been included and expanded. A PROC step that uses three tape drives might have three internal steps and only use one tape drive in each step - this would be a "one tape drive" job, even though your flow diagram would show three tape drives used by the one PROC step. A tape dataset that is marked as "PASS" keeps the tape drive in use during the next step, even if the tape is not actually used in that step. To free up a tape drive, code "KEEP" or "CATLG" to have the tape dismounted. (But don't do this if you really do need to use the tape in the next step!)