8 - how to manage sysout data sets

Upload: aravind-ravi

Post on 03-Jun-2018

224 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    1/33

    Chapter 8: How to Manage SYSOUT Data SetsIn chapter 4, you learned how to code a simple form of the DD statement for working withSYSO! data sets" #s you$ll recall, SYSO! data sets are output files that are designed to%e printed rather than stored on D#SD or tape" &ow, in this chapter, you$ll learn newtechni'ues for handling SYSO! data sets" (or e)ample, you$ll learn how to print multiplecopies of a data set without rerunning the entire *o% and how to send a data set to a printer

    in the department that needs the output"

    #s you read this chapter, please keep in mind that you only need these techni'ues forspecial SYSO! processing" #lso, since this chapter presents far more information than youcan remem%er, you should read it first to get the general idea of what SYSO! functions area+aila%le" !hen, you can refer %ack to this chapter when you need to use one of thesefunctions later on"

    The basics of the OUTPUT JCLstatement

    #s you might guess, a DD statement can include many more parameters to handle SYSO!data than what you$+e seen so far, and you$ll learn how to code them later in this chapter"(irst, though, you$ll %e introduced to another statement that you can use for SYSO!processing, the O!! -C.statement /or *ust O!! statement0"

    !he O!! statement lets you specify many of the options for SYSO! processing thatyou would otherwise code on a DD statement" !he ad+antage of the O!! statement isthat the SYSO! options can apply to multiple data sets in a *o%, so you don$t ha+e to codethe same parameters on each DD statement" #fter you see how and when to use theO!! statement, you$ll learn how to code %oth the O!! and SYSO! DDparameters in detail"

    The syntax for the OUTPUT statement(igure 812shows the synta) for the O!! statement and lists the parameters that arepresented in this chapter" 3e aware, though, that this statement contains many moreparameters" !his figure simply summaries the ones that you$re most likely to use" (or acomplete list and description of all of the parameters a+aila%le, please consult the I35manual, OS/390 MVS JCLReference"

    In the ne)t two figures, you$ll see that the O!! statement can %e used in two ways"(irst, you can code a default O!! statement that applies to all of the SYSO! data setsproduced %y a *o% or *o% step" Second, you can code an O!! statement that must %ereferred to directly %y a DD statement %efore it takes effect"

    Figre !"#$ The syntax for the OUTPUT statement

    The syntax for the OUTPUT statement

    66name O!! 7 ,C.#SSclass 9 7 ,CO&!O. ;O = ;!I.> = 7 ,COI>S ;nnn = 9 ;/,/group1+alue7,group1+alue?900= 7 ,D>(#.! ;Y>S= 9 ;&O = 7 ,D>S!destination 9 7 ,(C3fc%1name 9

    http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=220#220http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=671100306#wbp11ch08P10%23wbp11ch08P10http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=671100306#wbp11ch08P10%23wbp11ch08P10http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=220#220http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=671100306#wbp11ch08P10%23wbp11ch08P10
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    2/33

    7 ,(.#S@o+erlay1name 9 7 ,(O5Sform1name 9 7 ,->SDS ;#..= 9 ;-C.= ;.O

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    3/33

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    4/33

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    5/33

    options intheO!!statementapply to allSYSO!

    data setsin the *o%or *o% step/in otherwords, theO!!statementis implicitlyreferenced%y theSYSO!DDstatements

    within the*o%0"

    &O, & Indicatesthat theO!!statementisn$timplicitlyreferenced%y theSYSO!DDstatementswithin the

    *o%" #s aresult, itmust %ee)plicitlyreferenced"

    How to co(e a DD SYSOUT statement that (oesn+t s&ecify any o&tions

    SYSO!/,0* ,ob that ses ,ob"'e-e' an( ste&"'e-e' OUTPUT statements

    6655B2& -O3 /AHG20, 5>&>&D>J,&O!I(Y55B2,5S(#.!Y>S,C.#SS@

    66S!>2 >E>C 55#"#"!#&S,DISS@

    66!#&! DD SYSO!/,0

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    6/33

    66S!> >E>C (#.!Y>S,C.#SS#,COI>SA,D>S!2G

    665#S!I& DD DS>55#"CS!O5>"5#S!>,DISS@

    66CS!! DD SYSO!/,0Descri&tion

    !he parameters in a default O!! statement apply to all of the SYSO! datasets in a *o% or *o% step that don$t e)plicitly refer to another O!! statement"

    !o code a default O!! statement, you must include the D>(#.!Y>S orD>(#.!Y parameter"

    #job-levelO!! statement appears after the -O3 statement %ut %efore thefirst >E>C statement" nless otherwise specified, its parameters apply to all of theSYSO! data sets in the *o%"

    # step-levelO!! statement is coded within a *o% step after the >E>Cstatement" nless otherwise specified, its parameters apply to all of the SYSO!data sets that follow it within the *o% step"

    Step1le+el O!! statements o+erride *o%1le+el statements"

    If you code SYSO!K on a DD statement, the output class in the 5S

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    7/33

    statement that refers to it" #s a result, some programmers group all of them at the %eginningof a *o%, while others like to split them up, coding those that will %e used throughout the *o%at the *o% le+el and those that will %e used in a single step at the step le+el"

    Figre !".$ How to se ex&'icit'y reference( OUTPUT statements

    The syntax for the OUTPUT &arameter of the DD statement

    O!! ;reference =

    ;/,reference7,reference9?0=/eference formats

    K"name efers toa *o%1le+elO!!statement"

    K"stepname"name efers toa step1

    le+elO!!statement"

    K"stepname"procstepname"nameefers toanO!!statementin aprocedure/seechapterM0"

    * ,ob that ses both (efa't an( ex&'icit'y reference( OUTPUT statements

    6655B2& -O3 /AHG20, 5>&>&D>J,&O!I(Y55B2

    66D>(#.! O!! D>(#.!Y>S,C.#SS#,D>S!.OC#.

    66O!2 O!! COI>S4,C.#SSC,D>S!2G

    66S!>2 >E>C S,C.#SSC,D>S!2GB

    66I&L.IS! DD SYSO!/,0,O!!K"O!2

    66I&L! DD SYSO!/,0,O!!/K"O!2,K"S!>2"O!0

    66.O

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    8/33

    !o code an O!! statement that is e)plicitly referenced %y a DD statement,omit the D>(#.! parameter or code D>(#.!&O or & on the O!!statement"

    !o refer to an e)plicitly coded O!! statement, include an O!!parameter on the DD statement for the SYSO! data set"

    !he O!! parameter can refer to a *o%1le+el or step1le+el O!! statement"

    (or a step1le+el statement, you must include the stepname" !o refer to more than one O!! statement in an O!! parameter, list the

    references in parentheses and separate them with commas" !hen, the data set isprocessed once for each statement that$s referenced

    How to se DD an( OUTPUT statement &arameters for SYSOUT&rocessing

    5any of the parameters of the O!! statement ha+e parallels on the DD statement" #s aresult, you can often in+oke a specific SYSO! function %y coding an O!! statementparameter, a DD statement parameter, or %oth" !his topic %egins %y gi+ing you an o+er+iewof the DD parameters that are related to SYSO! processing" !hen, you$ll learn how to usethese parameters along with those on the O!! statement for specific processingfunctions"

    DD statement &arameters for SYSOUT &rocessing(igure 814shows the format for the DD statement as it$s used for SYSO! data sets" If youcompare it with the format for the O!! statement in figure 812, you$ll see thatparameters such as COI>S, D>S!, and (C3 are a+aila%le on %oth statements" You$ll alsosee that the DD statement has some additional parameters that aren$t a+aila%le on theO!! statement"

    Fhether you use DD or O!! statement parameters to control SYSO! processing isup to you" In general, though, you should use the DD statement parameters to control theprocessing for indi+idual SYSO! data sets" 3ut when you want to control multiple SYSO!data sets in the same way, you should use an O!! statement"

    3e aware, too, that the parameters you code on a DD statement will o+erride e'ui+alentparameters on any O!! statements that are in effect" So if you$re using O!!statements in a *o%, %e sure to code the DD statements carefully so you get the results youwant"

    Figre !"0$ DD statement &arameters for SYSOUT &rocessing

    Common'y se( DD &arameters for SYSOUT &rocessing

    66ddname DD 7 SYSO!/class7,writer97, ;form1name= 90 9

    ;code1name=

    7 ,COI>Snnn/,/group1+alue7,group1+alue900 9

    7 ,D>S!destination 9

    7 ,(C3fc%1name 9

    7 ,(.#S@o+erlay1name 9 7 ,(>> ;>&D = ;C.OS>=

    http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P104%23wbp11ch08P104http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P104%23wbp11ch08P104http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=486#486http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P104%23wbp11ch08P104http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=486#486
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    9/33

    7 ,@O.D ;Y>S= 9 ;&O = 7 ,O!.I5num%er 9 7 ,O!! ;reference = 9 ;/,reference7,reference9?0= 7 ,S>&!page1count 9 7 ,SI& ;..OC= 9 ;&O =

    %x&'anation

    SYSO! Specifiesthe outputclass, thename of anoutputwriter usedto processthe file, andthe name ofany special

    formneeded toprint thefile"

    COI>S Specifieshow manycopies ofthe data setshould %eprinted"

    D>S! Specifies adestinationfor theSYSO!data set"

    (C3 Specifiesthe name ofthe formscontrol%uffer to %edownloaded to theprinterwhen

    printing aspecialform"

    (.#S@ Specifiesthe name ofthe o+erlayto %e usedin printing a

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    10/33

    specialform on aA8BBprintingsu%system"

    (>> Specifiesthat thedata setshould %eunallocatedat the endof the last

    *o% stepthat uses itor when aprogramcloses it"

    @O.D Specifieswhether ornot the dataset should%e held"

    O!.I5 Specifies alimit for thenum%er ofrecords thatcan %ewritten tothe dataset"

    O!! #ssociatestheSYSO!data setwith thenamedO!!statement"

    S>&! ->S onlyallows a

    *o%$s output

    to startprintingwhile the

    *o% step isstille)ecuting"

    SI& Specifieswhen thedata set

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    11/33

    should %ereleased forprinting"

    Descri&tion

    !he DD statement pro+ides specific parameters that control output

    processing for SYSO! data sets" 5any of these are e'ui+alent toparameters on the O!! statement"

    !o control the characteristics of a specific SYSO! data set, code theparameters on the DD statement" !o control multiple SYSO! data setsin the same way, code an O!! statement"

    Fhen %oth an O!! statement and a DD statement apply to a dataset, the DD statement parameters o+erride e'ui+alent parameters on theO!! statement"

    How to s&ecify an ot&t c'ass

    # SYSO! data set$s output class can affect the way the data set is printed %y indicatingwhich printer or printers may print the data set, whether the data set should %e held, and thedata set$s importance relati+e to data sets with other output classes" !o assign a class to aSYSO! data set, you normally use the SYSO! parameter of the DD statement, as shownin the synta) at the top of figure 81G"#s you can see, you can specify the class directly inthis parameter, using an appropriate +alue as defined %y your installation" It$s more common,though, to code SYSO!K, and that$s what you$ll see in most of the e)amples in this %ook"!hen, the *o%$s message class, specified in the 5S

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    12/33

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    13/33

    output classin theC.#SSparameteris used forthe data

    set" If not,the outputclass in the-O3statement$s5S

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    14/33

    66#2B DD SYSO!D

    66#2G DD SYSO!/,0

    66#S!5! DD SYSO!/,0,O!!K"O!2

    66Descri&tion

    !o assign an output class to SYSO! data sets using an O!!statement, code the class in the C.#SS parameter"

    !o assign an output class to a single SYSO! data set, code the class inthe DD SYSO! parameter"

    If a SYSO! data set isn$t assigned an output class in a DD or O!!statement, the *o%$s 5SS output 'ueue until the *o%completes" !hen, they$re all printed together" !here will %e times though, when you won$twant to wait until a *o% finishes to %egin printing a SYSO! data set" (or e)ample, supposea *o% has two steps: the first produces a long report, and the second sorts a huge file" If thesort step takes se+eral hours to complete, the user must wait unnecessarily for the report to%egin printing" In a case like this, you can use the three DD parameters shown in figure 81Hto %egin printing the SYSO! data set %efore the *o% finishes"

    !he SI& parameter allows you to specify when a SYSO! data set is to %e released"Specifying SI&..OC makes the data set a+aila%le %efore the *o% ends and specifyingSI&&O makes it a+aila%le after the *o% ends" !he outcome of SI&..OC dependson how your system is set up, howe+er" It may mean that the data set is a+aila%le as soonas the application closes it, or it may mean that the data set isn$t a+aila%le until the *o% stepends"

    !he (>> parameter allows you to specify whether a data set should %e made a+aila%leafter the last step that uses it unallocates it or when the current program closes it" You$lltypically code (>>C.OS> with SI&..OC to ensure that a SYSO! data set isa+aila%le for immediate printing"

    nder ->S, the S>&! parameter causes a SYSO! data set to %e spun1off for outputprocessing while the *o% is still e)ecuting" !he num%er you specify in the parameterrepresents the num%er of pages to produce for each segment" Fhen that page count isreached, that segment of the data set is sent to the printer for processing"

    Figre !"2$ How to re'ease a SYSOUT (ata set for imme(iate &rocessing

    The syntax for the SP34 &arameter of the DD statement

    SI& ;..OC= ;&O =

    %x&'anation

    http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P172%23wbp11ch08P172http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P172%23wbp11ch08P172
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    15/33

    ..OC Specifies thatthe data set isto %ea+aila%le forprocessingimmediately

    after it isunallocated"Depending onsystemconfigurations, this can %eas soon asthe file isclosed or atthe end of the

    *o% step"

    &O Specifies that

    the systemmake the dataset a+aila%leonly when the

    *o%completes,regardless ofwhen it$sunallocated"

    The syntax for the F/%% &arameter of the DD statement(>> ;>&D = ;C.OS>=

    %x&'anation

    >&D Specifiesthat thesystemunallocate the dataset at theend of thelast stepthat usesit"

    C.OS> Specifiesthat the

    systemunallocate the dataset whentheprogramcloses it"

    The syntax for the S%5M%4T &arameter of the DD statement 6J%S) on'y7

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    16/33

    S>&!page1count%x&'anation

    page1count Specifiesthenum%er ofpages to

    producefor eachsegment ofa SYSO!data set"Fhen thepage countis reached,thesegment isreleasedfor outputprocessing

    "Three ways to start &rinting a SYSOUT (ata set before a ,ob finishes * re&ort that starts &rinting after the ,ob ste& en(s bt before the ,ob finishes

    66>O! DD SYSO!#,SI&..OC* re&ort that starts &rinting as soon as the SYSOUT (ata set is c'ose(

    66>O! DD SYSO!#,SI&..OC,(>>C.OS>* re&ort that starts &rinting after the first #88 &ages are &ro(ce(

    66>O! DD SYSO!#,S>&!2BBDescri&tion

    !he SI& parameter lets you specify whether a SYSO! data set is to %e

    made a+aila%le for printing %efore the *o% ends" Depending on how yoursystem is set up, coding SI&..OC will make the data set a+aila%le/20 as soon as the application closes the file or /0 when the *o% step ends"

    !he (>> parameter lets you specify whether a data set should %e madea+aila%le after the last step that uses it unallocates it or when a programcloses it"

    In ->S, the S>&! parameter causes a SYSO! data set to %espun1off for output processing after a gi+en num%er of pages areproduced, e+en though the *o% is still running"

    How to rote a SYSOUT (ata set to a s&ecific (estination

    &ormally, the system determines which printer to use %ased on the output class for the dataset, the source of the *o%, and which printers are currently a+aila%le" 3ut what if you want tosend your output to the remote printer near your desk rather than the default .OC#. printerit would normally print toN In such situations, you can specify the D>S! parameter on eitherthe O!! statement or the DD statement for the SYSO! data set in 'uestion"!he rules for specifying a destination +ary from installation to installation" So you$ll need toget a list of destinations that are +alid at your installation" In general, though, you can use the

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    17/33

    D>S! parameter to route output data to a remote or local printer, a node, a node and printeror terminal, or a user1id" !he chart at the top of figure 81lists some of the types ofdestinations you can specify as well as the -C.statements you can code them on" It alsoshows what +alues can %e used in a ->S or ->SA en+ironment"

    Fhen using the D>S! parameter, %e mindful of the sie of the output data set going to aremote printer" If you send a huge report to a slow1speed departmental printer, you$ll hold upe+eryone else$s output while yours is printing"

    Figre !"9$ How to rote a SYSOUT (ata set to a s&ecific (estination

    The syntax for the D%ST &arameter of the OUTPUT an( DD statements

    D>S!destination

    Destination OUTPUT DD J%S) J%S. Descri&tion

    #&Y.OC#. E E E

    outesoutput to alocal de+ice"

    .OC#. E E E E outesoutput to alocal de+ice"

    &ame E E E

    outesoutput to adestinationidentified %ya sym%olicname up to 8characterslong"

    &nnnn E E

    outes

    output to anode" !henum%er can%e from 2 to2BBB"

    nnnn, 5nnnn, E E E

    outesoutput to aremoteterminal" !he

    5!nnnn

    num%er can%e from 2 to

    MMMM"serid E E E

    outesoutput to auser1id at thelocal node"

    nodename"userid E

    E

    outesoutput to anode and a

    http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P202%23wbp11ch08P202http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P202%23wbp11ch08P202http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P202%23wbp11ch08P202
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    18/33

    Destination OUTPUT DD J%S) J%S. Descri&tion

    user1id withinthe node"

    /node,userid0

    E E E outes

    output to anode and auser1id withinthe node"

    PI:ipaddr$, E

    E E outesoutput to a!C6Irouting

    Pnodename"I:ipaddr$

    designation"

    * SYSOUT (ata set that+s rote( to remote &rinter /#88

    66>O! DD SYSO!#,D>S!2BB*n OUTPUT statement that rotes ot&t to a no(e name( F/%S4O an( a &rinter withan 3P a((ress of main")

    66D>(#.! O!! D>(#.!Y>S,D>S!(>S&O"I:main1Descri&tion

    !he D>S! parameter lets you route a SYSO! data set to a specificdestination" !he destination can %e a remote or local printer or terminal, anode, a node and printer or terminal, or a user1id"

    Installations determine the rules and the format for specifying adestination" So you$ll ha+e to find out what destinations are +alid at yourinstallation"

    How to s&ecify the (is&osition for a SYSOUT (ata setIn chapter 4, you saw how to code a DIS parameter on a DD statement for a data set that$sstored on disk, %ut those DD +alues don$t apply to SYSO! data sets" In a ->S system,though, you can use the O!DIS parameter on an O!! statement to specify thedisposition of a SYSO! data set, as shown in figure 818"

    #s you can see, the O!DIS parameter allows you to specify two dispositions" !he firstone tells ->S what to do if the *o% terminates normally, and the second one tells it what todo if the *o% terminates a%normally" If you don$t specify an a%normal disposition, ->S usesthe normal disposition if the *o% terminates a%normally" If you specify an a%normal

    disposition without a normal disposition, the normal disposition defaults to FI!>" #nd if youomit the O!DIS parameter, ->S uses the normal and a%normal dispositions specified inthe SYSO! class for the data set"

    !o illustrate how the O!DIS parameter might %e used, suppose you ha+e a report thatshould print on a printer in the corporate office as long as there$s no pro%lem with the output"@owe+er, if the *o% terminates a%normally, the report data set should %e held on the localprinter so a programmer can look at it to determine the pro%lem" !hen, the data set caneither %e purged or printed if further e)amination is re'uired"

    http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=220#220http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P219%23wbp11ch08P219http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=220#220http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P219%23wbp11ch08P219
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    19/33

    !he O!! statements in the first e)ample in this figure set up this processing" In the> to print the report at the remoteprinter if the *o% ends normally and so the corporate office won$t see the report if the

    *o% ends a%normally" In the 3#D statement, the O!DIS parameter says to purge thereport at the local destination if the *o% completes normally and hold it for re+iew if the *o%terminates a%normally" !hen, the DD SYSO! statement says to process the data set oncefor each O!! statement" #s a result, if the *o% completes successfully, the output fordata set >O! is printed at remote printer 2BB" On the other hand, if the *o% doesn$t endsuccessfully, the output is held until a programmer can e)amine it"

    If you want to hold the output from a SYSO! data set no matter what its disposition is, youcan code the @O.D parameter on the DD statement as shown in this figure" #n alternateway to hold a SYSO! data set using the DD statement is to specify a held output class inthe SYSO! parameter"

    Figre !"!$ How to s&ecify the (is&osition for a SYSOUT (ata set

    The syntax for the OUTD3SP &arameter of the OUTPUT statement 6J%S) on'y7

    O!DIS/normal1disp7,a%normal1disp90The (is&ositions that can be co(e( on the OUTPUT statement

    FI!> Specifiesthat theSYSO!data set isto %eprintedand thendeleted"

    @O.D Specifiesthat thesystem is

    to hold theSYSO!data setuntil theuser oroperatorreleasesit" Onceprinted,theSYSO!data set isdeleted"

    Q>> Specifiesthat theSYSO!data set isto %eprinted"

    #fterprinting,its

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    20/33

    disposition ischangedto .>#L>"

    .>#L> Specifies

    that theSYSO!data set isto %e keptin theoutput'ueue"

    Specifiesthat theSYSO!data set isto %e

    deletedwithout%eingprinted"

    How the OUTD3SP &arameter can be se( to manage ot&t &rocessing

    66>,0,D>S!2BB

    663#D O!! O!DIS/,@O.D0

    66>O! DD SYSO!#,O!!/K"

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    21/33

    installation1definedprocessingfor theSYSO!data set

    %ased onits outputclass"

    How the HOLD &arameter can be se( :ee& a re&ort from &rinting imme(iate'y

    66>O! DD SYSO!#,@O.DY>SDescri&tion

    In a ->S system, you can use the O!! statement$s O!DISparameter to indicate the disposition of a SYSO! data set" .ike the DDDIS parameter, you code two dispositions" !his first one applies if the *o%step completes normally, and the second one applies if it doesn$t"

    If you omit the a%normal disposition, the system uses the normaldisposition you specify" If you omit the normal disposition, the systemdefaults to FI!>"

    You can use the DD statement$s @O.D parameter to hold a SYSO! dataset until it$s released for printing %y a user or system operator" !he @O.Dparameter o+errides the O!DIS parameter"

    How to &ro(ce m'ti&'e co&ies of a SYSOUT (ata set(rom time to time, it may %e necessary to print more than one copy of a report" S parameter in its simplest form" In %othcases, two copies of the data set are produced" Fhen you print multiple copies of a data setthis way, the data set is sent to the printer twice" Fhen the first copy has finished printing,->S6->SA sends the second copy" If the two copies are to %e sent to different users, this isefficient for the operator, who can *ust separate the copies and deli+er them" @owe+er, it$sinefficient for the system %ecause the data set must %e processed twice"

    (or efficiency, there is an alternati+e method for printing multiple copies of a data set ifyou$re using a laser printer such as the A8BB printing su%system" !he alternati+e is to code agroup +alue in the COI>S parameter, which tells the system to print multiple copies of eachpage as the data set is processed" (or e)ample, if you re'uest two copies of a data set, thecopies are printed in this order: two copies of page 2, two copies of page , and so on" !hisway, ->S processes the data set *ust once /of course, this makes it more difficult for theoperator to separate the copies0"

    !he second DD and O!! statement e)amples in this figure show how to use group+alues" In the DD e)ample, the first su%parameter is omitted and a comma marks itsposition" !hen, the ne)t three su%parameters, all group +alues, are enclosed in parentheses"!he result is that two copies of each page will %e printed %efore mo+ing on, then threecopies for each page, and then finally one copy for each page" Fhy not simply specify a

    http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P247%23wbp11ch08P247http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P247%23wbp11ch08P247
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    22/33

    single group +alue of H since the copies will need to %e collated anywayN # parameter likethis might %e used if different departments needed different num%ers of copies" !hen, thecopies would %e deli+ered to the departments uncollated, as printed"

    In the second O!! e)ample, the group +alues specify that fi+e copies of the data setare to %e printed in two groups if they$re printed on a laser printer" @ere, though, the firstsu%parameter is also coded, specifying fi+e copies" #s a result, if the output de+ice is not alaser printer, fi+e collated copies are produced"

    Figre !";$ How to &ro(ce m'ti&'e co&ies of a SYSOUT (ata set

    The syntax for the COP3%S &arameter of the OUTPUT an( DD statements

    COI>S ;nnn =

    ;/nnn,/group1+alue7,group1+alue?900=

    ;/,/group1+alue7,group1+alue?900 =%x&'anation

    nnn Specifies

    howmanycopies oftheSYSO!data setto print"You canspecifyup to GGcopies in->S andG4

    copies in->SA" Ona laserprintersystem,this +alueis ignoredif a group+alue iscoded"

    group1+alue Specifiesthenum%erof copiesto %eprinted ofeachpage%eforethe ne)tpage isprinted"

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    23/33

    You cancode upto 8group+alues%ut the

    sum ofthepagesprintedmust note)ceedGGpages for->S andG4pages for->SA"Lalid only

    for laserprintersystems"

    S&ecifying the COP3%S &arameter on the DD statement) co''ate( co&ies of the (ata set are &rinte( on any ty&e of &rinter

    66>O!2 DD SYSO!#,COI>SOn a 'aser &rinter< 2 nco''ate( co&ies are &rinte( in . sets

    66>O! DD SYSO!#,COI>S/,/,A,200S&ecifying the COP3%S &arameter on an OUTPUT statement) co''ate( co&ies of the (ata set are &rinte( on any ty&e of &rinter

    66O!2 O!! C.#SS#,COI>SOn an im&act &rinter< 1 co''ate( co&ies are &rinte(= on a 'aser &rinter< 1 nco''ate(co&ies are &rinte( in ) sets

    66O! O!! C.#SS#,COI>S/G,/,A00Descri&tion

    !he COI>S parameter lets you specify how many copies of a SYSO!data set are to %e printed" !he printed output is in page se'uence for eachcopy"

    If you$re printing on a A8BB printing su%system or other laser printersystem, you can print multiple copies of each page together %y codinggroup +alues on the COI>S parameter" # group +alue specifies thenum%er of copies to %e printed for each page %efore mo+ing on to the

    ne)t" !he num%er +alue and the group +alues are mutually e)clusi+e" If %oth are

    coded and the data set is sent to an impact printer, the num%er +alue isused" If the data set is sent to a laser printer, the group +alues are used"

    How to set an ot&t 'imit

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    24/33

    If you need to limit the num%er of records written to a SYSO! data set, you can code anO!.I5 parameter on the DD statement, as shown in figure 812B"#s you can see, theO!.I5 parameter allows you to specify the num%er of logical records, or lines, that can %ewritten to a SYSO! data set" If the limit is reached, the system will either e)it to aninstallation1written routine or terminate the *o%" In the e)ample in this figure, the SYSO!data set named >O! is to %e no longer than BBB lines"

    !here may %e many reasons for coding such a parameter" (or e)ample, you may suspectthat one of the reports in a *o% is looping, generating the same lines of output o+er and o+eragain" !hen, you can sa+e your installation a lot of paper %y using the O!.I5 parameter"Of course, you already learned in chapter Gthat you can also code the .I&>S, 3Y!>S,#S, or C#DS parameters on the -O3, >E>C, 6K-O3#5, or 66K5#I& statements toachie+e a similar effect" !he difference is that the limits specified in these parameters applyto the entire *o% or *o% step rather than to an indi+idual SYSO! data set"

    Figre !"#8$ How to set an ot&t 'imit

    The syntax for the OUTL3M &arameter of the DD statement

    O!.I5num%er%x&'anation

    num%er Specifiesthenum%er oflogicalrecordsthat can%e writtento theSYSO!data set"!he +aluecan %e

    from 2 to2H2G"

    * SYSOUT (ata set with an ot&t 'imit

    66>O! DD SYSO!#,O!.I5BBBDescri&tion

    You can use the O!.I5 parameter on a DD statement to limit thenum%er of records written to a SYSO! data set"

    If the output limit is reached, the system will either e)it to an installation1written routine or terminate the *o%"

    If no O!.I5 parameter is specified or O!.I5B is coded, the systemwill use a default limit esta%lished %y your installation"

    #n alternate way of limiting the num%er of records produced is %yspecifying the .I&>S, 3Y!>S, #S, or C#DS parameters on the-O3, >E>C, 6K-O3#5, or 66K5#I& statements, %ut these options applyto the entire *o% or *o% step, not to a specific SYSO! data set"

    How to contro' 'ine s&acing an( the nmber of 'ines on each &age

    http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P272%23wbp11ch08P272http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P272%23wbp11ch08P272http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=314#314http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P272%23wbp11ch08P272http://skillport-direct.books24x7.com/viewer.asp?bkid=3234&destid=314#314
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    25/33

    !wo O!! statement parameters, CO&!O. and .I&>C!, let you control the linespacing and the num%er of lines on each page of SYSO! output" (igure 8122shows thesynta) for %oth parameters"

    !he CO&!O. parameter lets you +ary the line spacing of a SYSO! data set" If you omitCO&!O. or specify CO&!O.OS assumes that the first position of eachline in the SYSO! data set contains a carriage1control character that affects line spacing"!hat$s normally the case" @owe+er, you can o+erride the carriage1control settings %yspecifying single, dou%le, or triple spacing instead"

    !his figure includes a *o% that uses the CO&!O. parameter in two O!! statements"!he &O5 O!! statement defers line spacing to the program" !he .S!I&< O!!statement re'uires that the data set %e dou%le1spaced when printed"

    !he .I&>C! parameter, a+aila%le only under ->S, changes the ->S default for thema)imum num%er of lines printed on each page of a SYSO! data set" sually, the default.I&>C! +alue is HH lines per page" !hat$s the physical ma)imum that can %e printed withnormal line spacing using standard 22 ) 24 paper on an impact printer or 8126 ) 22 paperon a laser printer in landscape mode" If you want fewer lines per page or if you$re usingsmaller1sied paper, you should reduce the line count accordingly"

    Figre !"##$ How to contro' 'ine s&acing an( the nmber of 'ines on each &age

    The syntax for the CO4T/OL &arameter of the OUTPUT statementCO&!O. ;O = ;!I.> =

    %x&'anation

    O Specifiesforceddou%lespacing"

    !I.> Specifies

    http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P289%23wbp11ch08P289http://skillport-direct.books24x7.com/viewer_r.asp?bookid=3234&chunkid=678310867#wbp11ch08P289%23wbp11ch08P289
  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    26/33

    forcedtriplespacing"

    * ,ob that ses the CO4T/OL &arameter to contro' 'ine s&acing

    6655B2& -O3 /AHG20, 5>&>&D>J,&O!I(Y55B2

    66&O5 O!! C.#SS#,CO&!O.O

    66S!>2 >E>C C!HHDescri&tion

    !he CO&!O. parameter on the O!! statement lets you specifywhether each record in a SYSO! data set starts with a carriage1controlcharacter or whether the records should %e printed with single, dou%le, ortriple spacing"

    Specifying SI&, DO3.>, or !I.> o+errides the line spacingspecified %y any carriage1control characters in the data set"

    In ->S, the .I&>C! parameter on the O!! statement lets youspecify the ma)imum num%er of lines the system can print on each page"If you omit it, a ->S initialiation default +alue is used"

    How to se s&ecia' forms

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    27/33

    #lthough most SYSO! data sets are printed on standard computer paper, some ha+e to %eprinted on special forms" (or e)ample, payroll checks are usually printed on %lank checkforms, and in+oices are printed on %lank in+oice forms" #s a result, the DD and O!!statements pro+ide se+eral parameters for printing SYSO! data sets on special forms" !heparameters you code in a gi+en *o% depend on whether you$re using an impact printer or alaser printer such as a A8BB printing su%system"

    On an impact printer, pre1printed forms are typically used" !hese forms usually +ary in sieand color they may also contain your company$s logo and contact information" #nothercommon feature of pre1printed forms is that they include a num%er of %o)es that yourSYSO! data set will fill with data"

    !o print on these types of forms, you need to pro+ide two elements: the form name and the(C3 name" !he form name identifies the form you want to use" !hen, when the data set isreleased for printing, this name is used in a message to the operator that indicates whichform to mount on the printer" You can specify the form name in the SYSO! parameter of aDD statement or in the (O5S parameter of an O!! statement" !he results are thesame either way"

    #s for the (C3 name, it identifies a forms control bufferthat corresponds to the form" #forms control %uffer is a series of coded instructions that$s loaded into the printer$s memory"

    It pro+ides information that the printer needs to print on the form, such as the length of theform" sually, the (C3 name is the same as the form name" You specify it in an (C3parameter on either a DD or O!! statement"On a laser printer, pre1printed forms aren$t generally used" Instead, you use the forms-flastecn!"ueto print the form itself along with the data on a %lank piece of paper" !histechni'ue re'uires that the operator load a photographic negati+e image of the form into theprinter" #s a result, you specify an o+erlay name in the (.#S@ parameter on a DD orO!! statement to identify which negati+e the operator needs to mount into the printer%efore the data set is printed"

    !he e)amples in this figure show three different ways to code for special forms" !he first twoare for forms printed on an impact printer" In either case, the same output is produced" !hen,the third e)ample shows how to print the same form on a laser printer"

    Figre !"#)$ How to se s&ecia' forms

    The syntax for the forms"han('ing &arameters of the DD statement

    SYSO!/class,,form1name0

    (C3fc%1name

    (.#S@ ;o+erlay1name=

    ;S!D =The syntax for the forms"han('ing &arameters of the OUTPUT statement

    (O5S ;form1name=

    ;S!D =

    (C3fc%1name

    (.#S@ ;o+erlay1name=

    ;S!D =

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    28/33

    %x&'anation

    form1name Specifies theform to %eused for theoutput" In theSYSO!

    parameter,the namecan %e 2 to 4alphanumeric or nationalcharacters"In the(O5Sparameter,the namecan %e 2 to 8alphanumeric or national

    characters"

    fc%1name Specifies the(C3 image"!he namecan %e 2 to 4alphanumeric or nationalcharacters"

    o+erlay1name Specifies thename of aform$sphotographicnegati+eimage" Lalidonly for laserprinters"

    S!D # form oro+erlayspecified onsysteminitialiation"

    Three ways to &rint in-oicesS&ecifying the name of a &re"&rinte( in-oice form on the DD statement

    66I&LOIC> DD SYSO!/C,,I&L20,(C3I&L2S&ecifying the name of a &re"&rinte( in-oice form on the OUTPUT statement

    66O!2 O!! C.#SSC,(O5SI&L2,(C3I&L2Printing the in-oice on a 'aser &rinter with a b'an: sheet of &a&er

    66O!2 O!! (.#S@I&L2Descri&tion

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    29/33

    !o print on special forms on an impact printer, you specify a form nameand an (C3 name on either the SYSO! DD statement or an O!!statement"

    !he form name is used in a message to the operator that tells which formto mount on the printer"

    !he (C3 name identifies a forms control bufferthat corresponds to the

    form" It pro+ides information the printer needs to print on the form, such asthe length of the form"

    !o print forms on a laser printer, you include a (.#S@ parameter on eitherthe SYSO! DD statement or O!! statement" !he o+erlay specified%y the parameter represents a form image that$s printed along with thedata" !he operator is instructed to load the image into the printer %eforethe data is printed"

    How to co(e the OUTPUT statement for J%S system (ata sets

    Fhen a *o% e)ecutes, ->S produces system1managed SYSO! data sets that containinformation relating to the *o%$s e)ecution" !he ->S message log lists messages produced%y ->S6->SA as it processes the *o%" !he -C.listing simply lists the -C.statements for the

    *o%" #nd the system message log contains allocation and other messages produced as the*o% e)ecutes" !ogether, they can %e used to +erify that the *o% e)ecuted successfully or tohelp you de%ug any errors produced during e)ecution"In chapter 4, you learned that you can use the 5S. parameterson the -O3 statement to control the output processing for these system1managed data sets"!he 5SL>. parameter lets you suppress some or all of the output, while the5SS data sets" !o %ehonest, though, 5S. are limited in their capa%ilities" (or e)ample,you can$t control how many copies of the data sets to print or what remote printer theyshould %e sent to"

    (or greater control o+er the ->S data sets produced %y your *o%, you can code the ->SDSparameter on the O!! statement, as shown infigure 812A"Fith this parameter, you canassociate an O!! statement with one or more ->S data sets" In most cases, you$ll wantto specify ->SDS#.."

    !he O!! statement in this figure shows how the ->SDS parameter allows for morefle)i%ility than the 5S. parameters" @ere, the ->SDS parametersays that this O!! statement applies to all three ->S system data sets" In addition, theO!! statement specifies that three copies should %e produced of all the ->S output andthose three copies should %e sent to remote printer 2BB"

    Figre !"#.$ How to co(e the OUTPUT statement for J%S system (ata sets

    The syntax for the J%SDS &arameter of the OUTPUT statement

    ->SDS ;#..=

    ;.O

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    30/33

    #.. Specifiesthat theO!!statementapplies toall of the

    system1manageddata setsfor the *o%"

    .O< Specifiesthat theO!!statementapplies onlyto the->S5SSYS5S< data set/the systemmessagelog0"

    *n OUTPUT statement that contro's J%S (ata sets

    66O!2 O!! C.#SS#,->SDS#..,COI>SA,D>S!2BB* JO> statement that contro's J%S (ata sets

    6655B2& -O3 /AHG20, 5>&>&D>J,5S./2,20Descri&tion

    You can code the ->SDS parameter on the O!! statement to controlhow the system1managed data sets for the *o% are printed"

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    31/33

    !he system1managed data sets consist of a ->S message log, a -C.listing, and a system message log"

    #n alternate way to control the printing of these data sets is to include the5S. parameters in your -O3 statement" efer tochapter 4for more information a%out these two parameters

    J%S)?J%S. contro' statements for SYSOUT (ata

    3oth ->S and ->SA pro+ide control statements that let you manage how SYSO! data ishandled" Since most of their functions duplicate those pro+ided %y the standard DD andO!! -C.statements, you pro%a%ly won$t e+er code them" @owe+er, %ecause you maycome across them in a production en+ironment, it$s a good idea to %e familiar with two ofthese statements: the ->S 6KO!! statement and the ->SA 66K(O5#! statement"!he %asic synta) for %oth statements is shown in figure 8124" .ike the O!! -C.statement, they specify SYSO! parameters %ut then ha+e to %e related to specificSYSO! data sets for the parameters to take effect" !his figure focuses on how thoserelationships are coded rather than on the parameters that can %e used" @owe+er, if youe+er ha+e to code one of these statements yourself, you can find the information you need inI35$s OS/390 MVS JCLReference manual"

    The J%S) ?@OUTPUT statement

    !he ->S 6KO!! statement lets you specify output processing parameters for SYSO!data sets under ->S" #s you can see in the synta) in this figure, a code is used to identifythe statement, followed %y one or more parameters" (or e)ample, in the 6KO!!statement that$s shown, the code is O!2 and a COI>S parameter *ust like the one on theO!! -C.and DD statements is used to produce four copies of a SYSO! data set"In a *o%, the 6KO!! statement is placed after the -O3 statement and %efore the first>E>C statement" !hen, to relate a SYSO! data set to the 6KO!! statement, youspecify the 6KO!! statement$s code in the form1name position of the DD SYSO!parameter, as shown in this figure" nlike the O!! -C.statement, there$s no way tospecify a default 6KO!! statement, so you ha+e to specify the code in the DD statement

    for eac data set that should use the 6KO!! options"

    The J%S. ??@FO/M*T P/ statement

    !he ->SA 66K(O5#! statement lets you specify output processing parameters forSYSO! data sets under ->SA" #s you can see in its synta), it includes a DD>parameter that specifies the SYSO! data set or data sets to which the statement applies"In the e)ample in this figure, the >O! DD statement in *o% step

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    32/33

    coded in aDDstatementSYSO!parameterto refer to

    the6KO!!statement"

    parameter # +ariety ofparameters similar tothose onthe DDSYSO!andO!!-C.

    statementscan %ecoded,includingCOI>S,D>S!, and(O5S"

    How to se the ?@OUTPUT statement*n ?@OUTPUT statement that s&ecifies for co&ies

    6KO!! O!2 COI>S4* SYSOUT (ata set that refers to the ?@OUTPUT statement

    66>O! DD SYSO!/#,,O!20The basic syntax for the J%S. ??@FO/M*T P/ statement

    66K(O5#! ,DD>7ddname1specification9 7,parameter97,parameter9?%x&'anation

    DD> Specifies theSYSO! data setto which the66K(O5#! statement applies"You can specifystepname"ddname or SYS5SS-C., or->S5S

  • 8/12/2019 8 - How to Manage SYSOUT Data Sets

    33/33

    coded, includingCOI>S, D>S!,and (O5S"

    * ??@FO/M*T P/ statement that a&&'ies to the /%PO/T DD statement in the 5O ste&

    66K(O5#! DD>