DAT2330 - Harold Smith Class - Wed Feb 16, 2000 Today: MVS JCL Example #3 Homework Paging - nucleus sits in memory - RAM divided into pages - program has an address space (e.g. 4GB) - program is some number of pages of, say, 4KB (4096B) each - win386.swp is Win98 "paging dataset" - page fault happens when a swapped-to-disk page is needed - too much paging is bad - "thrashing" - "invalid page fault" - Win9x loses track of the page! Choosing buffer size - a buffer that is used to receive or contain data to be read/written to disk or tape must be "locked" in memory for transfer to happen - if the buffer size fits in one page, you use one page - if the buffer is even one byte bigger than one page, you use at least two pages - "working set" - number of pages needed to keep your program running - MS Windows system monitor can show you your paging statistics - buffer size must be a multiple of LRECL (200) that fits in the system's "page" size (4K). - the largest multiple of 200 that fits in 4096 is 4000 bytes - Note: 8K block size is not 8000, it's 8192! - the multiple of 80 closest to 8192 is 8160 - for BLKSIZE= use up to 4k to match size of IBM paging device //clg job 4444,'my name',class=E,msgclass=A, // msglevel=(1,1),prty=0,typrun=scan - need more than 6000 lines of output - no class to hold TSO output - want to scan the JCL before queueing it up for long-waiting class E - what messages does typerun=scan find? - does find errors related to catalogued procedure (PROC) step names - does not find errors in DDnames - does not find errors in IDCAMS input (or any instream input) - no need to scan JCL you have run before - scan doesn't work if you are trying out (guessing) DDnames - scanning won't find errors in DDnames! - you need to run the job to have the program try to use the DDname to see the error message come from the program //copy exec pgm=idcams //sysprint dd sysout=a,dest=(mvs1.smithh) //out dd dsn=testdata,disp=(new,pass), // unit=dasd, // dcb=(blksize=4000,recfm=fb), - output DCB has to include anything not defaulted in the program we are running (PGM=IDCAMS, in this case) - IDCAMS assumes and copies output DCB same as input DCB - no need to change default copy of LRECL (100) or DSORG (sequential) - be careful with defaulting the output BLKSIZE (is it appropriate?) - look at input record dcb - ANSI tape - maximum is 2K blocking! - not appropriate for a disk dataset (want 4K blocking) - 4k rule for 100-byte records - 100*40 = 4000 byte buffer fits in 4K desired block size // space=(4000,(100,5)) - for SPACE=, don't do space in cyl or tracks -- too device dependent - we have 4000 records of 100 bytes each = 400,000 bytes of output dataset - using a block size of 4000 (we just calculated BLKSIZE=4000), we need 400,000 divided by 4000 = 100 blocks for this dataset - specify extent of 5 more blocks in case we run over - system will allocate at least a dozen extents for us //in dd dsn=tstdata,disp=(old,delete), // unit=tapes,vol=ser=123456,label=(,al) - we can tell that this tape probably isn't in the catalogue - we are told which tape number we must use - don't need DCB= on input datasets - don't need SPACE= for input or tapes - must specify ANSI labels, even for input dataset //sysin dd * repro infile(in) outfile(out) /* //clg exec proc=cobclg - COB over-rides must precede LKED over-rides must precede TST over-rides - put instream data last, where possible; but, don't violate rule //cob.sysin dd * ...cobol source goes here... /* //lked.syslib dd dsn=pvt.objlib,disp=(shr,keep) - *share* (SHR) the input library, don't use OLD and lock others out! //tst.datin dd dsn=testdata,disp=(old,catlg) - look for what to do with this dataset passed from previous step - disposition not given in specification! - MVS cannot find an uncatalogued dataset based on its name only - to find uncatalogued datasets we also need UNIT= and VOL=SER= - but when we created this dataset, we didn't specify VOL=SER= - if we chose "keep", we would never find it again! - pick either DELETE or CATLG, since we didn't say where it was - we pick CATLG (a safe thing to do) //tst.datout dd dsn=testout,disp=(new,pass), // unit=dasd, // dcb=(blksize=4000,recfm=fb), // space=(4000,(100,5)) - everything is same as input dataset (previous output dataset) - read cobol source to confirm that LRECL is still 100 - LRECL is specified in COBOL source, as is DSORG, but not blocking - need to specify BLKSIZE and RECFM in JCL - output disk datasets need SPACE= calculation - output is 4000 times 100 bytes = 400,000 bytes - blocking was already calculated as BLKSIZE=4000 - 400,000 bytes divided by 4000 bytes = 100 blocks needed - use 5 for our extent slop //tst.bkup dd dsn=testbkup,disp=(new,keep), // unit=tapes,vol=ser=123456, // dcb=(blksize=4000,recfm=fb), - no need for special labels on this tape (not specified) - no SPACE= needed for tapes - make sure we specify the missing block size and record format - regular tapes (non-ANSI) use 4K block size - calculate that the closest multiple of 100 is 4000 //tst.unknown dd sysout=l, // flash=bill,burst=yes,outlim=2100 - we are guessing at DDname for this laser print output - Remember: bad DDnames won't be found by typrun=scan - MSGLEVEL=(1,1) won't help with this either - must run the program and wait for it to print the error - FLASH only works for laser printers - it flashes an image on the paper - less work for the operator; no need to line up the printing - FORMS (not studied) is for special paper, not a flash image - FORMS is for real paper, not laser flash background - 100 bills of 20 lines each, plus a little slop - say 2100 lines total output expected here //dump exec pgm=idcams //sysprint dd sysout=a,dest=(mvs1.smithh) //out dd sysout=(c,,grln),copies=2 - here is how we specify special paper forms: GRLN - operator will have to change the paper in the printer for us //in dd dsn=testout,disp=(old,catlg) - a passed dataset is easy to specify - were told to calalogue it //sysin dd * repro infile(in) outfile(out) /* //