comp52T1

  1. Create a file called KC03JB.COMP52.FILE on a diskpack . The file is accessed through the ddname CREATE by the program. All records are 256 bytes, blocked 2/1. There are 6000 records in the file.
    • //CREATE DD DSN=KC03JB.COMP52.FILE,
    • //                DISP=(NEW,KEEP,DELETE),
    • //                DCB=(LRECL=256,BLKSIZE=512,RECFM=FB),
    • //             SPACE=(512,3000)
  2. Create a file called MYFILE on a diskpack labeled MYPAK . The file is accessed through the ddname NEWFILE by the program. All records are 500 bytes, blocked 5/1. There are 5000-20000 records.
    • //NEWFILE  DD  DSN=MYFILE,
    • //                  DISP=(NEW,KEEP,DELETE),
    • //                   DCB=(LRECL=500,BLKSIZE=2500,RECFM=FB),
    • //                  SPACE=(2500,(1000,200)),
    • //                  UNIT=SYSDA, is a groupname
    • //                  VOL=SER=MYPAK requests specific pack
  3. Create a file called YOURFILE on any 3390 diskpack . The file is accessed through
    the ddname NEWDATA by the program. All records are 512 bytes, unblocked
    Allow 500-5000 tracks.
    • //NEWDATA DD DSN=YOURFILE,
    • //                   UNIT=3390,
    • //                  DISP=(NEW,KEEP,DELETE),
    •                   //DCB=(LRECL=512,BLKSIZE=512,RECFM=F),
    • //                 SPACE=(TRK,(500,300))
  4. Create a file called OURFILE on a diskpack. The file is accessed through the ddname OURS by the program. All records are 200 bytes, blocked 4/1 There are 3-6 cylinders required
    • //OURS DD DSN=OURFILE,
    • //             DISP=(NEW,KEEP,DELETE),
    • //          DCB=(LRECL=200,BLKSIZE=800,RECFM=FB),
    • //           SPACE=(CYL,(3,1))
  5. Read a file called KC03JB.COMP52.FILE . The file is read through the ddname INPUT by the program. All records are 256 bytes, blocked 2/1. There are 6000 records in the file.
    • //INPUT DD DSN=KC03JB.COMP52.FILE,
    • //               DISP=(SHR,KEEP,KEEP)
    • since the file already exists, don't code SPACE and DCB
  6. UPDATE a file called MYFILE found on a 3390 diskpack labeled MYPAK . The file is read through the ddname OLDFILE by the program. All records are 500 bytes, blocked 5/1. There are 5000-20000 records. Retain the file after.
    • //OLDFILE DD  DSN=MYFILE,
    • //                  DISP=(OLD,KEEP,KEEP),
    • //                  UNIT=3390,
    • //                  VOL=SER=MYPAK
  7. Image Upload 1
    CREATING A DATASET
  8. Image Upload 2
    • INSTREAM DATASET
    • //ddname DD *
    • ~~~~~ record 1 ~~~~~
    • ~~~~~ record 2 ~~~~~
    • ~~~~~ record 3 ~~~~~
    • /*
    • A program would read instream data until eof is reached.
  9. Image Upload 3
    • printed report
    • //ddname DD SYSOUT=H
    • (instead of H, a one-chararcter output class)
  10. If a program is supposed to write a large file, that we do not want to create,
    • we can’t simply omit the DD statement. We would get an error: MISSING DD STATEMENT.
    • We can code a DD DUMMY instead of DD SYSYOUT=H. Therefore the output would NOT be written to a printed report (it’s written to thin air! – kind of)
    • //OUTPUT DD DUMMY
  11. Why do we code DUMMY?
    • When executing a program, we must supply a DD statement for every file that is opened by the program.
    • We cannot change an existing program. Often we don’t have the source code of programs that we want to
    • execute.
  12. If the program is supposed to read a file, but we don’t need it to write to the file, rather than
    coding DD *, we code DD DUMMY. Therefore when the program reads the file, it will detect eof on first read and our program won’t crash.
  13. //INFILE DD DSN=MYFILE
    //            DISP(SHR,KEEP,KEEP)
    if we don't want the file read
    • code
    • //INFILE DD DUMMY
  14. Write a job statement that includes your full name, prints the least amount of JCL,
    outputs all output to class M. Use your userid as the jobname. Notifies user when done.
    No accounting information is required by the system.
    • //userID   JOB ,'MINI ME',
    • //                MSGCLASS=M,
    • //                MSGLEVEL=(0,0),
    • //                NOTIFY=userID
    • don't code TYPRUN if not requested
  15. Write a job statement that uses EX#1 as the jobname, code ABC123 as the accounting information. Do not code a programmer name. Have all JCL and system messages printed to the Held queue. Do not notify the user when done. Scan the job for syntax errors only.
    • //EX#1 JOB ABC123,   no comma for missing pgmer name
    • //                MSGCLASS=H,
    • //                MSGLEVEL=(1,1),
    • //                TYPRUN=SCAN
  16. MSGLEVEL order and meaning
    • Controls output of JCL stmts and system msgs
    • MSGLEVEL=(jcl stmt,msg)
    • jcl:
    • 0 Print only the JOB statement.
    • 1 Print all JCL statements.
    • 2 Print only JCL statements submitted through the input stream.
    • msg
    • 0 Print conditions codes only, unless abend occurs
    • 1. Print all system messages
  17. 1.1 What is JCL used for?
    Batch processing

    ME: controls jobs submitted
  18. 2.1 What is a job step?
    EXEC statement and its DD statements
  19. 3.1. Describe the functions of the JOB, EXEC and DD statements.
    JOB introduces job to the system, EXEC executes a program and DD describes data
  20. 4.2. What is the meaning of DASD?
    Direct Access Storage Device
  21. 5. 3. What are the national characters?
    #@$
  22. 6. What are the rules for continuing a JCL statement?
    • All parameters, code a comma after the parameter, // on the next line and begin coding
    • the parameter in column 16
  23. 7. What are the 2 categories of parameters?
    positional and keyword
  24. 8. What must you do if you omit a positional parameter?
    If there are more positional parameters that follow it, code a comma
  25. 9. Give an example of a keyword parameter.
    MSGLEVEL, MSGCLASS
  26. 10. What are the functions of the 2 subparameters of the MSGLEVEL parameter?
    • The first indicates the level of JCL statements output and the second is the level of
    • system message output.
  27. 11. What is an abend?
    abnormal end
  28. 12. Code the EXEC statement to execute the program named BLUE. The stepname should be COLOUR.
    //COLOUR EXEC PGM=BLUE
  29. 13. What are the names and purposes of the four DD statements used by IEBGENER? . In what order must you code the DD statements?
    • SYSUT1 describes the file to be copied
    • SYSUT2 describes where the file is to be copied to
    • SYSIN is used for special copy instructions
    • SYSPRINT is for messages from the utility program itself
    • They can be coded in any order
  30. 14. How do you direct a data set to the printer?
    SYSOUT
  31. 15. What are input stream data? How do you include input stream data in a job stream?
    • Data is coded in the job stream following a DD * statement
    • //ddname DD *
    • line1
    • line2
    • ...
    • /*
  32. 16. What is the function of the delimiter statement?
    to indicate the end of instream data
  33. 17. What is the function of the null statement?
    Marks the end of the job.
  34. 18. What is a cylinder?
    Same track on each platter
  35. 19. What is an extent?
    Group of tracks used to store data
  36. 20. What are the rules for forming a jobname?
    0-9,A-Z,National characters, can't start with number and 8 or less characters
  37. 21. What is the purpose of blocking?
    Faster retrieval of records or of storing records since a group of records are transferred
  38. 22. What is a VTOC?
    Volume Table of Contents, where DSN, DCB, space is stored for each data set
  39. 23. What parameters must be coded to create a permanent data set on a disk?
    DSN, DISP, DCB,SPACE
  40. 24. What parameters must be coded when accessing a data set on disk?
    DNS, DISP
  41. 25. What are the 3 subparameters of the DISP parameter?
    Status, normal disposition and abnormal disposition
  42. 26. How do the status subparameters OLD and SHR differ?
    OLD is exclusive use, SHR means other can read
  43. 27. What is the total space allocation for SPACE=(300,(200,100)) (in blocks)?
    200+15*100 blocks
  44. 28. Write the DCB for a data set that has a blocksize of 2000 and a blocking factor of 10/1.
    DCB=(LRECL=200,BLKSIZE=2000,RECFM=FB)
  45. 29. Write the SPACE for a data set that requires 20-50 cylinders
    SPACE=(CYL,(20,2))
  46. 30. Write the SPACE for a data set that requires 40,000-70,000 records. Each record is 110 bytes, blocked 5/1
    SPACE=(550,(8000,400))
  47. 31. Write the SPACE for a data set that requires 1000-4000 blocks, where each block is 200
    • bytes.
    • SPACE=(200,(1000,200))
  48. 32. Write the SPACE for a data set that requires 400-700 tracks.
    SPACE=(TRK,(400,20))
  49. 33. Given DCB=(LRECL=150,BLKSIZE=600,RECFM=FB) What is the blocking factor?
    4/1
  50. IF FILE ALREADY EXISTS
    • Do not code DCB since this information was stored with the file when created.
    • Do not code SPACE since space was allocated when file was created.
  51. Continued line must
    start with // in col1+2. Parameter can start anywhere between col4+16. Col3 must be blank otherwise it is interpreted as a new statement.
  52. instream data
    • //SOMENAME DD *
    • LINES
    • /*
    • data set is a sequential file
    • each record is 80 bytes.
    • The program reads each line following the DD * as 1 record.
    • End of data is reached when:
    • // appears in columns 1&2 or
    • /* (delimiter statement appears in 1&2)
  53. Printer report
    • //DDNAME DD SYSOUT=outputclass(single letter)
    • we use H
  54. printed report is not automatically printed. It is placed in a Held Queue.
    //REPORT DD SYSOUT=H
  55. write to thin air
    //DDNAME DD DUMMY
  56. read INPUT from thin air
    //INPUT DD DUMMY
Author
slc53
ID
335632
Card Set
comp52T1
Description
comp52T1
Updated