Endevor

 View Only
Expand all | Collapse all

I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

Melva Jackson

Melva JacksonSep 09, 2014 12:26 PM

  • 1.  I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 09, 2014 12:19 PM

    Does anyone know how to build a package sweep that will only move packages for a certain environment or can a sweep be done by environment?



  • 2.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 09, 2014 12:24 PM

    Hi Melva,

     

    What product does your question refer to? I'd be happy to move it to the right community to make sure you get a speedy reply.

     

    Thanks,

    Chris



  • 3.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 09, 2014 12:26 PM

    Ca Endevor

     

    Thanks,

     

    Melva Jackson



  • 4.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Broadcom Employee
    Posted Sep 23, 2014 02:52 PM

    Hi Melva,


    Most sites will have some form of package automation in place, typically using the ENBP1000 (Batch utility) to perform "SUBMIT PACKAGE <pkg-name-filter> ... WHERE PGK STATUS IS APPROVED...".


    If you have a package naming convention that identifies the target environment, that might be all you need, otherwise you might need to use a CSV step first to identify the packages you want to submit based on their contents.



  • 5.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 23, 2014 03:56 PM

    Thanks Eoin,

     

    Our naming convention does not identify the target environment so there is no way to identify the package.  The CSV for packages only shows the target environment if you are promoting the package, I tried looking at that as well.  I am still looking at other options that I received from CA.

     

    Thanks,

     

    Melva Jackson



  • 6.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Broadcom Employee
    Posted Sep 24, 2014 11:49 AM

    Ahh - in that case I think we'd need a more complex solution - what I call " SMP/E" a Simple Matter of Programming, the /E stands for the fact that it might take an Extended period of time!

     

    But in principle you could use the CSV list package where status is approved, to generate a list of packages, then a 2nd step (or internal loop) to review the target environment for each action... If all actions for a particular package are your test environment, then submit it!

     

    You mention that you have some other options, but I'm intrigued enough to have a deeper look here - it might be the perfect opportunity to use the TableTool utility included in the best practice suite, or just a couple of CSV/SORT/JCL steps... - How urgent is your requirement?



  • 7.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Broadcom Employee
    Posted Sep 24, 2014 12:34 PM

    Oops immediately ran into the first Requirements check...

     

    Suppose the Package had mixed actions (Move, Generate, Delete) etc. but the target Environment/Stage were all the same would that be OK to submit... or...
    only if all the target environment AND the actions were the SAME (e.g. all MOVES to TEST/T or all GENERATE at TEST/T)

    or... maybe NEVER automatically submit a package that has DELETE or ARCHIVE actions... etc.

    I presume packages with a mixture of target environment would never be OK to auto sweep in this scenario...

    but do you need messaging around this (e.g. a list of package ineligible for sweep and why? - this starts to show the /E feature)

     

    Eoin



  • 8.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 24, 2014 12:53 PM

    What I was thinking but have not completely figured it out was to create a user exit when a package is approved to write to a file the package id, checking the PAPP-ENVIRONMENT and the PAPP-APPROVER-FLAG to determine if the environment is production and the approver is from the Change Group.  If it is not a production package write the package id to the file.  Set up a job to execute packages reading the file and clearing out the file once the job completed successfully for the next schedule sweep job.

     

    Still reviewing how this will work.

     

    Thanks,

     

    Melva Jackson



  • 9.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 25, 2014 11:34 AM

    Hi Melva,

    just based on Eoin's and your own considerations ... in short:

     

    1) do a SUBMIT PACKAGE ... WHERE ... APPROVED to get a file of execution-ready packages.

    2) do a CSV-Utility  "LIST PACKAGE ACTION FROM PACKAGE '*'" --> this csv-data contain source- and tagret-environment names .

    3) create a rexx to determine a list of "allowed" packages (involving source-env, target-env or other criteria) by parsing the csv-data, and - based on this list - tailor the execute-steps in the file of execution-ready packages.

    4) write this tailored jcl to the INTRDR (submit the Job)

     

    success!

    Josef



  • 10.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 25, 2014 05:55 PM

    We had a similar request to limit our package sweep to only those executing to our PROD environment/stage. We accomplished this by:

     

    - created a dummy approver group we called OK2SWEEP with a dummy approver(DASWEEPA) and a quorum=0.

    - related this approver group to all of PROD/2. Now all packages going to PROD/2 get this approver group attached as a flag that can be easily screened for.

    - execute an EXTRACT 70 selecting on group=OK2SWEEP and status=APPROVED.

    - parse through the output to create package submit JCL

    Marc



  • 11.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Sep 25, 2014 06:18 PM

    Thanks you very much that sounds something I could try to do.  I will look into this option.

     

    Thanks,

     

    Melva Jackson



  • 12.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?
    Best Answer

    Broadcom Employee
    Posted Oct 27, 2014 11:59 AM

    Hi Melva,

     

    Have you got your sweep working yet?  If not then can I just share that this is perhaps an ideal opportunity to use the BPI Table Tool (ENBPIU00).

     

    To recap - the chief problem for sweep jobs at lower stages in the life-cycle is that they may not have approvers, may not be promotion packages and as you stated, not conform to a package naming convention. So the challenge is to read the actions of the approved packages to determine which packages are targeting your 'sweep environment' and build EXECUTE or SUBMIT JCL for them.

     

    So while you can use existing reports and then parse the reports it does leave you open to report formatting changes (although I really like MarcAHanna's idea about using a dummy approver.) it might be more 'reliable' to use the built-in tools with Endevor.

     

    Specifically if you start with a CSV extract to get a list of all packages, use that list to build a CSV report of all Package Actions for those packages, and then, use the Table tool to do the hard work of paring the CSV data.

     

    The first step was to get the list of Packages, that are approved, and waiting...

     

    //*-------------------------------------------------------------------

    //*   Use CSV utility to list all approved, non-enterprise packages  

    //*-------------------------------------------------------------------

    //CSVLSPKG EXEC PROC=ENDEVOR&EZA,NDVRPGM='CONCALL,DDN:CONLIB,BC1PCSV0'

    //BSTIPT01 DD *                                                      

        LIST PACKAGE ID '*'                                              

         WHERE STATUS EQ APPROVED                                        

               ENTERPRISE X                                              

         OPTIONS TO FILE CSVEXTR.                                        

    //CSVEXTR  DD DSN=PUBLIC.P7163.CSVPKGID,                             

    //      DCB=(RECFM=VB,LRECL=4092,BLKSIZE=4096,DSORG=PS),             

    //      DISP=(NEW,CATLG),                                            

    //      SPACE=(TRK,(5,1),RLSE)        

    This will give you a list of packages in CSV format, but we need to dig deeper into the actual SCL or Action summary to find out if these packages pertain to our sweep environment.  This first simple job Table Tool can handle with ease, just creating an list request for each input package found in the prior step...

     

    //*------------------------------------------------------------------- 

    //*   Use Table Tool to build SCL to list Actions for selected packages

    //*------------------------------------------------------------------- 

    //SCLLSTAC EXEC PROC=TBL#TOOL,TBLPARM='A'                              

    //TABLE    DD DSN=PUBLIC.P7163.CSVPKGID,DISP=(SHR,PASS)                

    //OPTIONS  DD DUMMY                                                    

    //MODEL    DD *                                                        

      LIST PACKAGE ACTION FROM PACKAGE &PKG_ID                             

        TO DDNAME 'CSVEXTR'.                                               

    //TBLOUT   DD DSN=PUBLIC.SCLLSACT,                                     

    //         DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS),                 

    //         DISP=(NEW,PASS),                                            

    //         SPACE=(TRK,(1,5),RLSE)                                     

    I won't try to explain ALL that the Table Tool can do here, but the key point is that it understands the CSV format, and for each data record it finds after the header will generate a corresponding record to TBLOUT using the model syntax in the MODEL DD - in this case all we need to do is populate the package ID from the CSV record and as output we get a bunch of LIST PACKAGE ACTION... requests ready to feed back to the CSV utility...

     

    //*-------------------------------------------------------------------

    //*   Use CSV utility to process generated list requests             

    //*-------------------------------------------------------------------

    //CSVLSACT EXEC PROC=ENDEVOR&EZA,NDVRPGM='CONCALL,DDN:CONLIB,BC1PCSV0'

    //BSTIPT01 DD DSN=PUBLIC.SCLLSACT,DISP=(SHR,PASS)                    

    //CSVEXTR  DD DSN=PUBLIC.P7163.CSVPKACT,                             

    //         DCB=(RECFM=VB,LRECL=4092,BLKSIZE=4096,DSORG=PS),          

    //         DISP=(MOD,CATLG),  <--- note MOD to collect ALL requests  

    //         SPACE=(TRK,(5,1),RLSE)              

    The output from this request will be a list of package actions per package... which we feed back into Table Tool, this time using the PARMLIST option to perform two passes.  In the first pass we check for any error conditions, i.e. anything that would cause us NOT to submit this package.  In my sample I decided not to auto-sweep for packages that included DELETE or ARCHIVE actions (but you might be fine with those).  The second pass, then checks to confirm that the package has no errors and if so builds EXECUTE syntax. 

     

    //*-------------------------------------------------------------------         

    //*   Use Table Tool to build scl for packages to be submitted                 

    //*   with the Parmlist option to make two passes;                             

    //*   - The first pass will list packages inelligible for processing           

    //*   - The second pass will generate the submit SCL for valid pkgs            

    //*-------------------------------------------------------------------         

    //SCANPGKA EXEC PROC=TBL#TOOL,TBLPARM='PARMLIST'                               

    //PARMLIST DD *                          #                                     

      MODELX   TBLERR   OPTIONS1  A                                                

      MODELS   TBLOUT   OPTIONS2  A                                                

    //TABLE    DD DSN=PUBLIC.P7163.CSVPKACT,DISP=(SHR,PASS)                        

    //OPTIONS1 DD * <- On the 1st pass of the file, report all errors              

      IF $row# < 1          THEN NO_GO. = ''             /* Init NO_GO flag array */

      IF $row# < 1          THEN $SkipRow = 'Y' ;        /* Skip Header row       */

      IF PKG_ID == 'PKG ID' THEN $SkipRow = 'Y' ;        /* Extra headings? skip  */

      IF NO_GO.PKG_ID = 'Y' THEN $SkipRow = 'Y' ;        /* Already flagged?      */

      MODEL = 'MODELX'                                   /* Initialise error flag */

      /* if target stage is blank, then use the source stage (e.g. Generate)      */

      if ENV_NAME_@T@ = ' ' then Say ELM_ACT 'action - Use Source Env:' ENV_NAME_@S@

      if ENV_NAME_@T@ = ' ' then ENV_NAME_@T@ = ENV_NAME_@S@                       

      if STG_ID_@T@   = ' ' then Say ELM_ACT 'action - Use Source Stg:' STG_ID_@S@ 

      if STG_ID_@T@   = ' ' then STG_ID_@T@ = STG_ID_@S@                           

    /* This is not the Stage you're looking for...     (Thanks Obi-Wan)          */

      if ENV_NAME_@T@||'/'||STG_ID_@T@ /== 'ENV2/4' THEN MODEL = MODELO            

    /* Don't auto submit Delete requests and maybe archive/transfer)             */

      if ELM_ACT == 'DELETE'  THEN MODEL = MODELD        /* Delete not supported  */

      if ELM_ACT == 'ARCHIVE' THEN MODEL = MODELD        /* Archive not supported */

      say '1stPass:' $row# NO_GO.PKG_ID ELM_ACT ENV_NAME_@T@ STG_ID_@T@            

      if MODEL  == 'MODELD' THEN $my_rc = max($my_rc,3)  /* Did we have warnings? */

      if MODEL /== 'MODELX' THEN NO_GO.PKG_ID = 'Y'      /* Flag Package as NoSub */

      if MODEL  == 'MODELX' THEN $SkipRow = 'Y' ;        /* Nothing to report     */

    /* If we haven't exited yet, then we have an error to report to TBLERR       */

    //OPTIONS2 DD * <- On the 2nd pass of the file, submit good packages           

      IF $row# < 1          THEN $SkipRow = 'Y' ;        /* Skip Header row       */

      IF PKG_ID == 'PKG ID' THEN $SkipRow = 'Y' ;        /* Extra headings? skip  */

      IF NO_GO.PKG_ID = 'Y' THEN $SkipRow = 'Y' ;        /* Already flagged?      */

      say '2ndPass:' $row# NO_GO.PKG_ID ELM_ACT ENV_NAME_@T@ STG_ID_@T@            

      NO_GO.PKG_ID = 'Y'                                 /* Finished with this pkg*/

    /* If we haven't exited yet, then we have a package to submit                */

    //TBLERR   DD SYSOUT=*                                                         

    //TBLOUT   DD DSN=PUBLIC.P7163.CSVPKSUB,                                       

    //         DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS),                         

    //         DISP=(MOD,CATLG),  <--- note MOD to collect ALL requests            

    //         SPACE=(TRK,(1,5),RLSE)                                              

    //* You may choose to either execute (in-line) the packages or submit         

    //* them for independent processing (one or more jobs at a time)              

    //* simply uncomment/delete the model lines as appropriate.                   

    //MODELS   DD * <- Use this model, when OK to submit a package                

      EXECUTE  PACKAGE &PKG_ID .                                                  

    //MODELO   DD * <- Use this model to report a package out of scope            

    * NO-SUB &PKG_ID * Not targeting sweep Env / Stage: &ENV_NAME_@T@ / &STG_ID_@T@

    //MODELD   DD * <- Use this model for unsupported actions                     

    * NO-SUB &PKG_ID * Un-supported action for auto sweep: &ELM_ACT               

    //MODELX   DD * <- This is the default message, should never see it.          

    * Should never see this line - it means model was NOT set correctly      

    OK this is quit a bit more complex than the original Table Tool step - but the key advantage is that all the hard work of parsing the CSV data is done for you by ENBPIU00, all you need to do is add the options to control what packages you don't want.

     

    If anybody is interested I'll post a document with the entire JCL deck - but my real goal here is just to pique your interest to have another look at the Table Tool.  It's unique ability to read Endevor CSV data 'out-of-the-box' and using just a few lines of Rexx (OPTIONS) to control output and skeletons (MODELS) to format the output make it an ideal and robust solution.

     

    Challenges?  Questions?  Interested in hearing more? 



  • 13.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Oct 27, 2014 04:24 PM

    Thanks Eoin,

    I have gotten to the last step where the Table tool created my statements.  I did not get the connection to run another step to execute the package after the   at first, I was thinking the table tool would execute the job.  I have a batch package job that executes package so I am thinking I may be able to create a file with the execute commands and use the file.  My steps were as follows:

     

    1.   1.    I pulled a list of package actions.

    2.   2.   Sorted the file excluding packages that had a source of PRD or a target of PRD sorting by package id. I then did a sum fields none to illuminate duplicates. This would give me all test packages.

    3.   3.    Pull a list of packages where status is approved.

    4.   4.    Created a EZTRIEVE program matching the two files by package id to build a file of only packages going to a development environment.

    5.   5.    Ran this file through the table tool to create the commands.

    6.   6.    Table tool step, input and output fileis below.  I now need to use a package job to execute the packages.

     

    This is the  TABLETOOL step.

    000241 //FILTER   EXEC PGM=IRXJCL,PARM='TBL#TOOL M APPROVED '           

    000242 //SYSEXEC  DD DISP=SHR,DSN=SYS3.CA.BPI.NDVR15.CSIQCLS0           

    000243 //SYSTSIN  DD DUMMY                                              

    000244 //SYSTSPRT DD SYSOUT=*                                           

    000245 //TABLE    DD  DSN=T.ND.DISK.PKGSWEEP.TST,DISP=(OLD,PASS)        

    000246 //POSITION DD *                                                  

    000247   ALPKG_RS_STAT     23  34                                       

    000248   ALPKG_RS_ENV     857 864                                       

    000249   ALPKG_RS_STG_ID  865 865                                       

    000250   ALPKG_RS_PKGID     1  16                                       

    000251 //OPTIONS  DD DUMMY                                              

    000252 //MODEL    DD *                                                  

    000253    EXECUTE PACKAGE '&ALPKG_RS_PKGID'.                            

    000254 //TBLOUT   DD SYSOUT=*                                           

     

    EDIT E    T.ND.DISK.PKGSWEEP.TST  

    Command ===>                      

    ********************************* 

    TST14100851691  TSTTSTAPPROVED     

    TST14100851692  TSTTSTAPPROVED     

    TST14100851693  TSTTSTAPPROVED     

    ******************************** 

     

    TBLOUT DD OUTPUT

     

    SDSF OUTPUT DISPLAY PKGSWEEP JOB15577

    COMMAND INPUT ===>                   

    ********************************* TOP O

       EXECUTE PACKAGE 'TST14100851691'.  

       EXECUTE PACKAGE 'TST14100851692'.  

       EXECUTE PACKAGE 'TST14100851693'.  



  • 14.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Broadcom Employee
    Posted Oct 28, 2014 06:35 AM

    Well Spotted Melva, I did leave out the last step in my haste - Executing the packages, but this is one of the easier ones;

     

    //**********************************************************************

    //* Execute Packages                                                   

    //**********************************************************************

    //EXECPACK EXEC PROC=ENDEVOR&EZA,NDVRPGM=ENBP1000                      

    //ENPSCLIN  DD DSN=PUBLIC.P7163.CSVPKSUB,DISP=(SHR,PASS)   

    Slightly more difficult, but potentially worth the effort if you have a lot of packages, or those packages will get very large is to use SUBMIT PACKAGE SCL instead of EXECUTE PACKAGE.

     

    You didn't say, but if you are selecting package "*" for the LIST PACKAGE ACTIONS, that could get big - effectively reading the entire package dataset - but you could easily rectify that with the first two steps from my example above. This might also relieve you of having to do the merge/select Eztrieve later.

     

    I hope that if nothing else, this exercise might highlight how much easier everything would be if all sites did have a good package naming policy, ideally one that was enforced by package exits - then the sweep would become trivial;

     

    SUBMIT PACKAGE "<SweepEnv>*" ... OPTIONS MULTIPLE JOBS INCREMENT JOBNAME.



  • 15.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Oct 28, 2014 12:12 PM

    Yes I am using the Package ‘*’ and I did notice the file was very large, that it why I threw in the sort with the sum as the next step.  Put I see your point with step two and three and I will look at coding that change.  My current process works but looks like step two and three may be more efficient and eliminate the selection of so many records.

     

    Thanks,

     

    Melva Jackson



  • 16.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Posted Oct 29, 2014 01:28 PM

    Hi Eoin,

     

    Where is the ENBPIU00 utility documented please? 

     

    Stuart



  • 17.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Broadcom Employee
    Posted Oct 30, 2014 06:50 AM

    - Oops!  Stuart, you caught me! I was sure this was all in the BPI guide, or at least in the BPI section of the Scenario guide, but you're right it's not exactly complete. OK, I found out a lot by just reading the jobs in the BPI implementation, but I also had inside help when I ran into problems.  There is a LOT of information in the header of the tool itself (below) - but you're right, this should get the full doc treatment from Tech Writing.  Lucky you found this in time to get included in V17 doc!

     

    For doing "Table" Searches and variable substitutions similar

    to that done by ISPF file tailoring.                        

                                                                

    The ENBPIU00 tool is a generic "Table lookup" Rexx routine  

    that processes all/selected rows of an input table, and     

    produces output based on each row's content and a           

    "Model" (similar to a dialog skeleton). One or more         

    models may contain symbolics that are replaced during       

    the processing of a "Table" by the ENBPIU00 utility.        

    The values for the symbolics, and the choice(s) for the     

    "Model", may be selected from each row of the table.        

                                                                

    Features:                                                   

    - Allows simple, user-friendly methods for                  

      defining input data and for formatting of outputs         

    - Provides optional searching for                           

      user-provided search criteria                             

    - Frequently a simple alternative to writing your           

      own program                                               

    - Developed by the Services team at CA Technologies         

                                                                

    Unlike file tailoring, ENBPIU00 has these advantages:       

    - Does not require ISPF services... ie can run under IRXJCL 

      or as a compiled rexx or load module.                     

    - Allows variable names to be a mixture of upper and lower  

      case characters, and up to 250 characters in length. Not  

      limited to 8 character upper case variable names like     

      file tailoring.                                           

    - Provides a "smart" variable substitution. Only variables  

      that have values assigned to them are substituted.        

      Other variables are written to the output still without   

      being substituted.  This feature allows a cascading       

      affect where you may want to use multiple tables to       

      provide values for substitutions against a single table.  

      You can use ENBPIU00 to bypass substitutions for PROC     

      variables, Endevor variables and others that you want     

      remain untouched.  You do not have to count the periods   

      as you do in file tailoring. If needed, you can use a     

      $delimiter value when concatentaing variables. For        

      example, if $delimiter = "^"  then,                       

         &variable#1^&variable#2                                 

      concatenates values correctly.                             

    - Provides a dynamic specification for inputs and outputs.   

      There must be one input file given a name of TABLE.        

                                                                 

    Files used by ENBPIU00 include the following:                

    o TABLE - required input file in one of 3 allowed formats:   

         1) A report image. The first line contains a special    

            character in column 1 which defines the line as a    

            'heading'.  All remaining lines of the Table are     

            detail rows of the Table. Variable names are the     

            words found found in the heading.                    

         2) A fixed-data format. Each field falls into a fixed   

            position. No 'heading' is present. Instead, a        

            DDname of POSITION defines the beginning and         

            ending locations for each variable. Variable names   

            (and their locations) are defined in the POSITION    

            file.                                                

         3) A Comma Separated Value format. This type of table   

            does not easily support searching of tables since the

            variables are defined by the CSV header.             

                                                                 

    o MODEL - (1 or more input files)                            

              to define the format of output data.               

              A model is 'expanded' by ENBPIU00 to produce output.

              There must be at least one MODEL, but there may be 

              multiples. The name 'MODEL' can be changed by      

              references on the TABLE and/or by references in    

              OPTIONS and/or by references on a 'PARMLIST'.      

    o OPTIONS - (1 or more input files)                          

                to define the overrides if any.                  

                You can use "//OPTIONS DD DUMMY" if there are    

                no overrides.                                    

                There must be at least one                       

                OPTIONS, but there may be multiples. The name    

                'OPTIONS' can be changed by references on a      

                'PARMLIST' .                                     

                Any valid single-line Rexx statement can be coded

                within the contents of the OPTIONS file. All     

                variables that are assigned values in the OPTIONS

                file are eligible to be used in the Model        

                substitution.  Uses of the OPTIONS file include: 

                - Calculating new variables from variables on the

                  Table.                                         

                - Providing override values for variables on     

                  the Table.                                     

                - Setting or checking internal Table Tool        

                  variable values.                               

                - Cause multiple Table searches.                 

                                                                 

    o POSITION - (optional input file)                           

                 Must be provided only when the Table appears    

                 in a A fixed-data format. Positions must        

                 contain variable names and start & stop         

                 locations when the Table is fixed-format.       

                                                                 

    o PARMLIST - (optional input file) Used only when the        

             ENBPIU00 parameter string value is 'PARMLIST'.      

             An input DDname of PARMLIST must be provided that   

             lists one or more search requests for a single      

             Table. The format of the search request in the      

             PARMLIST file is:                                   

               <Model> <Tblout> <Options> <Calling Parm value>   

             Where:                                              

             <Model> -  the name of an input Model DD or '*'     

                        to use the default name (MODEL), or      

                        allow OPTIONS to specify a name, or      

                        the name to be designated on the         

                        TABLE.                                   

             <Tblout>-  the name of an output Tblout DD or '*'   

                        to use the default name (TBLOUT), or     

                        allow OPTIONS to specify a name, or      

                        the name to be designated on the         

                        TABLE.                                   

             <Options>- the name of an input Options DD or '*'   

                        to use the default name (OPTIONS).       

             <Calling Parm value> - 'A' / number / 'M' and search

                                    values as described above in 

                                    the Calling Parm value format.

    o TBLOUT - (1 or more output files)                          

               Variables from TABLE and/or OPTIONS are expanded  

               within a MODEL and written to a TBLOUT file.      

               There must be at least one TBLOUT, but there may be

               multiples. The name 'TBLOUT' can be changed by    

               references on the TABLE and/or by references in   

               OPTIONS and/or by references on a 'PARMLIST'.     

                                                                 

    By default, TABLE, MODEL, TBLOUT and OPTIONS are DDnames     

    in the ENBPIU00 step.  You can use TABLE variables or        

    OPTIONS statements to specify multiple MODEL and TBLOUT      

    files.  Whatever names you specify must also be DDnames      

    in the ENBPIU00 step.                                        

                                                                 

    The simplest method of execution causes each row of a        

    Table to be processed with one MODEL.  Both TABLE and        

    MODEL are DDnames in the jobstep of a ENBPIU00 execution.    

    Each row of the TABLE is used for substitution of variables  

    in the MODEL, and the result is written to the output DDname 

    TBLOUT.                                                      

                                                                 

    Alternatively, the "Table" may include a variable entitled   

    "MODEL". In this case, each unique value under the "MODEL"   

    heading must also be a DDName in the running JCL.            

                                                                 

    An input file with the DDName of OPTIONS can add             

    additional functionality. Any standard REXX variables        

    assigned values in OPTIONS, are variables that can be        

    substituted in the Model. For example,                       

       DB2_SUBSYS = 'DB2Q'                                       

    Any REXX variables assigned values in OPTIONS and which      

    appear as a header on the table, keep the value assigned     

    in OPTIONS. This feature enables OPTIONS to provide          

    override values to entries on the Table.                     

    IF C1STAGE is a variable (from the Table or OPTIONS) and     

    its value matches a prefix for an OPTIONS statement, then    

    the prefix is truncated and the resulting statement is       

    evaluated. For example, a column in the table is DB2-SUBSYS, 

    and is given a value of 'DB2Q', then the following OPTIONS   

    would change the value to 'DB2R' at the Endevor QA stage.    

                                                                 

    //OPTIONS DD  *                                              

      C1STAGE = &C1STAGE                                         

      QA_DB2_SUBSYS =  'DB2R'                                    

                                                                 

    Calling Parameters:                                          

      You can use a single PARM value to be passed to ENBPIU00, or

      you can specify multiple Parm values to be used in a single

      execution of ENBPIU00 within a PARMLIST file.              

      The Calling Parm value specifies which method Parms are    

      provided.                                                  

                                                                 

    Calling Parm value format:                                   

      The first word in the parameter string indicates which     

      rows of the Table are to be processed:                     

         A - indicates all rows of Table are to be processed.    

        <number> - indicates a fixed number of rows.             

                   Optionally search values may also be provided.

         M - indicates only rows matching the provided           

             search values. The search values must appear        

             in the Calling Parm string following the 'M'.       

         PARMLIST - a PARMLIST file is being used to provide     

             multiple PARM values for a single execution of      

             ENBPIU00. If the first word in the Calling Parm is  

             'PARMLIST' then, all other values in the Calling Parm

             are ignored. A PARMLIST DD must be provided in the  

             step to provide one or more parm search values.     

                                                                 

                                                                 

    You can specify search values in the PARM string, for an     

    'M" option or a <number> option.  Multiple values may be     

    present, but must be separated by at least one space. Each   

    of these are paired as a search value with a column from     

    the table.  The first value is used as selection criteria    

    for the first column in the table.  The second value (if     

    provided) is used as selection critieria for the second      

    column in the table.  Each subsequent value provided is      

    used as selection critieria for the next column in the       

    table.  When a row is found which contains values that       

    Match  all passed PARMs, then the row is selected. If no     

    rows $Match, then a return-code 4 is returned. If the        

    Table depends on a POSITION dd to define the fields, then    

    the matching is made using the order or definitions.         

                                                                 

    For example,                                                 

        if the PARM='1 Green Apples'                             

           then using a top to bottom search, the first row      

              that has 'Green' in the first column and           

              'Apples' in the second column is the row selected. 

                                                                 

    If the "A"  (all rows) option is designated, then no other   

    parameters are necessary.                                    

                                                                 

                                                                 

    OPTIONs can cause Table Tool to search a table multiple      

    times when:                                                  

    - The Table Tool parameter indicates searching 'M' for       

      one table column                                        

    - OPTIONS provides an override for the Search column      

      variable and specifies multiple space-delimited         

      values.  Table Tool searches the table for each         

      space-delimited value.                                  

                                                              

    For example. If LIST-TYPE is the first column in the TABLE.

    And OPTIONS contains this statement:                      

        LIST-TYPE = 'BIND1 BIND2'                             

    ... causes a search through the table where               

        LIST-TYPE = 'BIND1'                                   

    ... and a second search through the table where           

        LIST-TYPE = 'BIND2'                                   

                                                             



  • 18.  Re: I need to build a sweep process to execute packages for our Test environments.  Is there a way to have a sweep job ony execute packages for certain environments?

    Broadcom Employee
    Posted Dec 30, 2014 07:20 PM

    I got at least one question about the missing bits of the JCL - in the snippets above I'd omitted the PROCs so for completeness (or if anybody else is looking for this) see below for samples;

     

    The First PROC is a pretty standard Endevor proc;

    //ENDEVOR0 PROC NDVRPGM=C1BM3000,DYNAMBR=1500                         

    //**********************************************************************

    //* Exec Endevor with normal processing                               

    //**********************************************************************

    //ENDEVOR  EXEC PGM=NDVRC1,DYNAMNBR=&DYNAMBR,PARM=('&NDVRPGM')        

    //INCLUDE MEMBER=SCMM@LIB

    //*C1MSGS2 DD SYSOUT=*                              SUMMARY OUTPUT    

    //C1MSGS1  DD SYSOUT=*                              MESSAGE OUTPUT    

    //C1PRINT  DD SYSOUT=*                              PRINT ACTION FILE 

    //SYSOUT   DD SYSOUT=*                                                

    //SYSUDUMP DD SYSOUT=*                                                

    //SYMDUMP  DD DUMMY                                                   

    //**********************************************************************

    //         PEND           

     

    The Next sample PROC just executs the Table Tool (ENBPIU00) but because it must locate the utility in the clist library (iprfx.iqual.CSIQCLS0) we can't use the SCMM@LIB member and instead (for this example) have hard coded it as follows;

    //TBL#TOOL PROC TBLPARM='PARMLIST'                  Default to Parmlist

    //**********************************************************************

    //* Exec Endevor Endevor TableTool (ENBPIU00)                                    

    //**********************************************************************

    //TBL#TOOL EXEC PGM=IRXJCL,PARM='ENBPIU00 &TBLPARM'                   

    //SYSEXEC  DD DISP=SHR,DSN=iprfx.iqual.CSIQCLS0 

    //SYSTSPRT DD SYSOUT=*                                                

    //SYSPRINT DD SYSOUT=*                                                

    //SYSTSIN  DD DUMMY                                                   

    //**********************************************************************

    //         PEND                                                      

     

    Note: If you want to make use of TSO commands like ALLOC, FREE etc. in your TableTool options,  replace the PGM=IXRJCL with PGM=IKJEFT1B.