-------------------------------------- Notes on Winter 2000 Lab assignment #2 -------------------------------------- -IAN! idallen@idallen.ca This Lab2 description and JCL was provided as an extra example for this term, to give you more practice at reading JCL job descriptions and writing JCL solutions. - input datasets never need DCB (DCB is in the dataset label) - only use DCB for a NEW dataset that doesn't have a DCB - cataloged datasets never need UNIT or VOL (just DSN and DISP) - only need UNIT (and maybe VOL) for uncataloged datasets - passed (and cataloged) datasets don't need anything other than DSN and DISP - ANSI tapes always need LABEL the *first* time you access them in a JOB - PASSed datasets (including PASSed ANSI tapes) only need DSN and DISP - when calculating SPACE, make sure you round UP when dividing the size of the data by the block size - if you don't, your data will use up one secondary extent for the partially filled final block the first time the dataset is written - choosing your own job and step names is not "guessing"; it is *choosing* - you can't pick wrong job or step names, only bad names - HOWEVER: you must obey the JCL syntax rules (8 chars or less) - choosing output dataset names is not "guessing"; it is *choosing* - you can't pick a wrong output dataset name, only a bad dataset name - HOWEVER: you must obey the JCL syntax rules (8 chars or less) - there is only one *guess* in lab2: the DDname for the output labels - if this guess is wrong, the job will fail at run time - document your guesses using JCL comments - the job spec says to over-ride the SYSPRINT destination for the compiler with our own SYSPRINT DD statement that holds the output for TSO - this is an "over-ride"; it replaces the existing SYSPRINT DD statement in the PROC - we can only do this if we know the step name and DDname in the PROC that we want to over-ride (on the job: ask someone, or get a PROC listing) - calculate the best block sizes for the output datasets - block size was *NOT* set in the COBOL program; so, it must be in the JCL - only specify DCB info that is missing or is different from that set by the program that is creating the dataset - the job spec says the combined record length written to datasets TESTOUT and DATABACK is the sum of the lengths of the input datasets; so the combined LRECL is the sum 155+90=245 bytes - job spec says this LRECL is set by the executing COBOL program; therefore, do *NOT* specify LRECL=245 in the JCL; not needed - choose a correct BLKSIZE parameter for records of 245 bytes: - standard blocksize (max 4K): integer(4094/245)*245=3920 - BLKSIZE=3920 for the output disk dataset - ANSI blocksize (max 2K): integer(2048/245)*245=1960 - BLKSIZE=1960 for the output ANSI tape dataset - calculate the SPACE parameter for disk dataset TESTOUT - block size for a disk is always the IBM standard, max 4K - we calculated (above) BLKSIZE=3920 for LRECL=245 - we have about 6000 records of 245 bytes ==> 1,470,000 bytes of data 1,470,000 bytes divided by 3920 = 375 blocks (of 3920 bytes) primary extent is 375 blocks - NOTE: always round up any fraction for SPACE - secondary extent size is given as 10% of 375 blocks ==> 38 blocks - NOTE: always round up any fraction for SPACE - SPACE=(3920,(375,38)) - use your best estimate when you don't know what to code for secondary extents - estimate how this will dataset grow in future - on the job, ask around for how fast the dataset grows - a known-size, one-shot dataset won't grow; code conservatively - make the secondary extents small so that space is not wasted - datasets that will grow a lot need more liberal space allocation - make the secondary extents larger so you don't run out of extents - watch out for the limit on secondary extents: 15 - BUT: if your shop uses the optional Storage Management Subsystem (SMS), you get over a hundred secondary extents - we do not use SMS in this course; always assume a limit of 15 - Exercise: calculate the maximum size of the $CHOOSE1 dataset // SPACE=(4030,(231,10)) - maximum size is 1 primary extent of 231 blocks plus 15 secondary extents of 10 blocks each (each block is 4030 bytes) Answer: (231+(10*15)) blocks of 4030 bytes = 381 blocks of 4030 bytes = 1,535,430 bytes - Exercise: calculate the maximum size of the $CHOOSE2 dataset // SPACE=(4050,(134,10)) - maximum size is 1 primary extent of 134 blocks plus 15 secondary extents of 10 blocks each (each block is 4050 bytes) Answer: (134+(10*15)) blocks of 4050 bytes = 284 blocks of 4050 bytes = 1,150,200 bytes - Exercise: calculate the maximum size of the TESTOUT dataset // SPACE=(3920,(375,38)) - maximum size is 1 primary extent of 375 blocks plus 15 secondary extents of 38 blocks each (each block is 3920 bytes) Answer: (375+(38*15)) blocks of 3920 bytes = 945 blocks of 3920 bytes = 3,704,400 bytes - Exercise: calculate the maximum size of the DATABACK dataset Answer: unlimited (this is a tape dataset; SPACE is not used and you can write as many tapes as you can pay for) How many programs will execute in this job? Answer: Six: IDCAMS, IDCAMS, compiler, linker, cobol executable, IDCAMS