DAT2330 - Harold Smith Class - Wed Feb 3, 2000 Today: MVS JCL Example 2 (with attached homework) IDCAMS - what are control statements? - tell the IDCAMS program what to do - chooses among many possible options - similar to command line arguments and flags - IDCAMS could take parameters; but, there are too many - instead, read a dataset containing the options - dataset comes on SYSIN; usually instream data - may have 10-15 lines of control statements - what DDnames are used in the copy step? - you get to pick the names - DDnames given in the control statements - what DDname for the instream COBOL source program? - not specified - have to guess - we will need to set MSGLEVEL to get max info from run - try COMP.SYSIN ? - DDname "SYSIN" chosen by the author of the COBOL compiler program - DDname "COMP" chosen by PROC author - what part of the proc wants TAPEDATA? - not compiler (review: what does compiler do) - not linker (review: what does linker do) Refer to new checklist - new parameters on JOB and DD Coding JCL - fixed width font, 12 point, with ruler bar (WordPad) CLASS - not a print queue! - Classes change from shop to shop - check list of classes; choose "dog" MSGCLASS - specifies which spool queue to use for JES messages - typically sends output to printer - may need to spool to TSO queue - choose letter closest to A Note that you can't "watch the program run" - batch programming only MSGLEVEL - level of detail coming from JES (not from any programs) - (1,1) is maximum (positional parameters) - (,1) means use default for 1sp parameter One missing comma throws the job out - remember the trailing commas Continuation lines: start with //, indent to 16 or less. - don't indent past column 16 - some posted examples violate this so that they read more clearly to the novice eye - don't code this way! PRTY - choose among various class A jobs - not strictly FIFO - Windows: FISH (first in still here) - depends on MVS version, e.g. 0 to 15, eith 15 highest - some account codes cannot use some priorities Example #2 ---------- //coboltst job 1234,'my name',class=D, // msgclass=D,MSGLEVEL=(1,1), // PRTY=15 // exec pgm=idcams Order of JCL statements - professors want instream DD statements last - put biggest instream last DD statements - sysout is only for print output DCB describes the dataset - defaults apply where program doesn't specify - we concentrate on 4 parameters - look up each of these new parameters in the book - DSORG - tapes are only sequential (physical sequential) - IDCAMS defaults to PS - professor requires this order to these four parameters! - logical order; but, MVS doesn't care - tape gap takes sizeable space; don't want a lot of them - want - instream data is always 80 characters (LRECL) - IDCAMS has output specs equal to input specs - why not use huge block sizes? - uses up too much memory - pick a 4k block size; but, must be multiple of 80 - less than or equal to 4k fits in paging buffer nicely - don't need LABEL if using standard IBM labels - UNIT: up to now, datasets were catalogued - system knew which unit they were on based on catalogue - 3480 is a possible tape unit; but, it's not general - use group names instead - chosen by system programmers at sysgen time - consult shop for names - group SCRATCH is appropriate for a temp tape //outdd dd dsn=testdata,disp=(new,pass), // dcb=(dsorg=PS,lrecl=80, // blksize=4080,recfm=FB),unit=SCRATCH //sysprint dd sysout=D - rules for IDCAMS are not JES rules - TYPERUN=SCAN will not find these errors //sysin dd * repro infile(indd) outfile(outdd) /* //indd dd * ...many test records go here... ...syntax of these lines dictated by input requirements of ...cobol program that will be reading them... /* - must order DD statements for a PROCL in same order as PROC //clg exec proc=cobolclg //comp.sysin DD * ...cobol program source goes here... /* - look inside cobol program to see what the author decided for the output data format - cobol program specifies LRECL, no need for us - block contains 0 records ==> let JCL set the size - don't want to fix it in the program - no need for vol or ser since we use *any* tape - passed tapes don't need DCB - only need DSN and DISP - uncatalogued datasets need to be found - never need DCB for input dataset (it's in the label) - ANSI - american national standards institute - non-IBM, used to share tapes with non-IBM - LABEL takes positional parameters! - cannot reorder them, need leading commas - need second parameter - VOL takes keyword subparameters - can reorder them //go.mstout DD dsn=tstout,disp=(new,pass), // dcb=(blksize=4000,recfm=fb), // unit=scratch //go.prtop DD sysout=B //go.tapedata DD dsn=testdata,disp=(old,delete) //go.lstin DD dsn=prodlist,disp=(old,keep), // label=(,AL),unit=syssq,vol=ser=123456 Do the homework: MVS JCL Example 2 Homework - we will review it next class