DAT2330 - Harold Smith Class - Wed Jan 26, 2000 Note: You cannot learn the material if you only do the homework that is marked! - do all the questions; they relate to the tests - I'm not teaching everything you need to know - you learn the basic things - I concentrate on things that are difficult to understand - don't study the book - too much stuff - learn what is needed to do the Examples and Homework Compile, Load, and Go - memorize diagram on p.44 (edit, compile, load, go) 1. an O/S is a program that prepares and runs applications - don't put things in the O/S that don't belong in this definition 2. components of an O/S used to test a program *** critical sequence - see p.44 - Review these components wrt. testing a job: (boot, shell, task mgmt, memory, i/o, security, net, utilities, help) - need boot to load kernel - don't load all of O/S at boot; load KERNEL or NUCLEUS - might not include all device drivers in kernel (might not have choice!) - need shell to start up the compiler - compiler calls on O/S (data mgmt) to read the data - need memory management (virtual memory - bigger than RAM) - need some CPU cycles to run the job - task manager will schedule me - device drivers let O/S access physical devices - need linkage editor (linker) to link with already existing code - after linking, load the program itself - Review the O/S terms wrt. testing a program: kernel, batch vs. interactive processing, spooling, batch files (procs) Using pre-defined JCL in your JOBs - proc used for long command, complex command - cobol CLG is maybe 40-50 lines of JCL! - use existing PROC! Review of JCL homework: Find the errors in TESTPROG JCL file - learn JCL by looking at existing JCL - teach yourself syntax by finding the most errors - put output statements first (never has instream data) - put input statements last (may have instream data) - UPPER CASE ONLY for JCL - order of DD doesn't matter to JES (except for over-riding DDnames in catalogued procedures) - JOB statement: - remove the blanks after commas - remove leading blank - positional parameters first! - move class=b last - MSGLVL spelled wrong: MSGLEVEL - Flow Diagram (not marked): title top of slide TESTPROG, SMITH Step One - EXEC statement looks ok - use meaningful names, not "STEP1" - Flow Diagram: make this a box containing MAKETAPE, IDCAMS - four DD statements (after EXEC, before next EXEC) - SYSPRINT - label on flow arrow going out to print spool queue - may route print to screen, not to printer - label print box "error messages" for IDCAMS - Access Method Services (IDC - IBM prefix) - IN (error: duplicated in same job step; is output) - rename it to OUT (look at the IDCAMS input stream) - label arrow OUT going to TAPE - TAPE is a sysgen parameter (SYSSQ, CART, etc.) - continuation line must start with slash slash blank - indent continuation over to line up with third column - but stop before column 16 - SYSIN DD * - input for this DATASET comes in on same input stream - put instream data last, so that it doesn't space the rest of the JCL down the page - use oval shape on flow diagram, label arrow SYSIN - this SYSIN data is for IDCAMS, telling it what to do - label the oval "control statements" - these are equivalent to flags, switches, options - having to put all these flags on the EXEC statement would make the statement too long, so we use a separate SYSIN stream to control IDCAMS - IN DD * - instream data - use oval, label it as "test data" - look down to next step to see how data will be used - looks like test data for the program - /* to end instream data must start in first column - JES *always* splits jobs on //XXX JOB - you cannot ever have //XXX JOB in instream data Step Two - change comment to have //* instead of // - EXEC statement looks ok - FlowDiagram: use a square box titled PRTTAPE, IDCAMS - four DD statements - SYSPRINT - label on flow arrow going out to print spool queue - label as "error messages" for IDCAMS - WRITE - label as "tape records" - READ - label on arrow coming from passed tape - SYSIN DD * - oval for instream data "control statements" - DSN=TEST DATA - no blanks, 8 characters for each qualified name - minimum of 5 times 8 qualified names - usually need to have qualified name - ask the sysadmin - simple name not permitted in catalogue - Windows limits full pathnames to 260 bytes from root to end! - "255" is a misnomer, except in root - DISP=(,PASS) must have leading comma to select positional default for first parameter - REPRO statemnt (IDCAMS) cannot start in column 1 - missing /* follows REPRO Step Three - //COMLKTST EXEC COBOLCLG - proc's get a dotted box - label CMOLKTST COBOLCLG //COBOL.SYSIN DD * - COBOL is the stepname of the step in the PROC - followed by instream cobol program, ending in /* - DD statements for a PROC must appear in same order as the steps in the PROC - oval with arrow into PROC box labelled COBOL.SYSIN - oval is labelled "cobol source" //GO.TPIN DD - arrow from TESTDATA tape leading into PROC dotted box - labelled GO.TPIN - this TPIN is the input data for the running program - GO is the name of the "go" step in the PROC - how do you find out the GO name? - try something, or ask someone, or look it up - GO.PRTOUT DD ... OUTLIM= 2000 - arrow leading to print spool queue label GO.PRTOUT - label print queue "test output" - GO.DSKOUT - arrow leading out from proc labelled GO.DSKOUT - destination is a disk, name it TESTOUT - unbalanced parentheses on SPACE - cannot indent past column 16 - must stop before column 72 (71 is last) - go through job stream, identifying parameters (look them up) - VOL=SER=9876 - a serial number never changes for a particular tape - DSN gives it a new name - COBOLCLG is three programs - compile, link, go - See p.44 - OUTLIM=2000 - limit output because nobody is watching the spool queue - you watch your own printer at home - SPACE= - allocate more than you need to avoid fragmented datasets - control growth