Automic Workload Automation

  • 1.  z/OS jobs in transport case file

    Posted Sep 23, 2016 08:10 AM
    Update 1, 2016.09.26 9:45 CEST: I discovered that sub-field 2 of record F013C specifies the z/OS job type. I also learned that the job priority and job class are specified in separate records, and not in the F013C record.

    Update 2, 2016.09.26 14:20 CEST: After a little digging in the database, I learned that record F013C in the transport case file corresponds to column JBA_Rest in the JBA table. This field contains all additional job attributes for which a dedicated field does not already exist. Jobs already have fields for priority (JBA_Priority) and job class (JBA_JobClass), so these were apparently reused to store the corresponding z/OS job attributes.

    By comparing several jobs in a transport case file, I have worked out how most of z/OS-specific job attributes are specified.
    pcadzyu9i4g4.pnghttps://us.v-cdn.net/5019921/uploads/editor/nu/pcadzyu9i4g4.png" width="720">

    Transport Case records relevant to z/OS jobs

    There are several records that appear in transport case exports of z/OS jobs. A couple of these records specify a single attribute. The F013C record specifies several attributes in sub-fields.

    Transport
    case record

    Name of field in Java UI,
    Description
    JBA table
    column

    Attribute name(s)

    Corresponding
    XML key(s)

    F009C

    PriorityJBA_Priority

    PRIORITY, P

    MVS_Priority
    F011C
    Report destination (bitmap)
    1=Generate on error only
    2=Database
    4=File
    JBA_OutputY=yes, N=no
    JOBREPORT_ERROR_ONLY
    JOBREPORT_DB
    JOBREPORT_FILE
    Selected key(s) set to 1
    OutputDbErr
    OutputDb
    OutputFile

    F012C

    Job classJBA_JobClass

    JOB_CLASS, JC

    MVS_JobClass
    F013C
    Most z/OS-specific attributes.
    See table below.
    JBA_RestSee below.
    See below.

    When it appears underTJBAin the transport case file, theF013C record corresponds toJBA_Rest, the thirteenth column in theJBA table. This field is used to store additional job attributes for which a dedicated DB field does not exist. In the case of  z/OS jobs, this field is used to store most z/OS-speicific job attributes. The attributes are specified in labeled sub-fields of the record.

    F013CJ='4'K='6'2='9'6='UC4DEMO'P='MICHAEL'O='1,1'7="SCHENV='SEV_BTCH_DEV'"Q='S46JZ8.JCL.CNTL(UC4DEMO) 'a="'D08/APPL'"U='0'S='*ALL'T='2'V='1'R='5'W='L'

    Sub-field of
    F013C record

    Name of field in Java UI,
    Description

    Attribute nameCorresponding
    XML key(s)

    J

    Notify

    MVS_NOTIFYMVS_Notify

    K

    Message class

    MVS_MSGCLASSMVS_MsgClass

    2

    Job type
    8=Automation Engine (AE)
    9=z/OS JCL
    A=JCL incl. z/OS job card
    C=?  (not displayed in UI)

    MVS_JOBTYPE
    AE
    JCL1
    JCL2
    ?
    Selected key set to 1
    MVS_TypeUC4,
    MVS_TypeJCL,
    MVS_TypeMVS,
    MVS_TypeAEJCL*

    6

    Job name

    JOB_NAME, JNMVS_JobName

    P

    Program name
    (Actually,programmername)

    MVS_PROG_NAMEMVS_ProgName

    O

    Message level

    MVS_MSG_LEVELMVS_MsgLevel

    7

    Job parameters

    MVS_JOB_PARAMSMVS_Params

    Q

    z/OS file name

    JCL_SOURCEMVS_FileName

    a

    Account

    MVS_ACCOUNTMVS_Account

    U

    With non-JES output
    (0=no, 1=yes, 2=default)

    MVS_COMPLETEJOBOUTMVS_ComplJobOut

    S

    Obtain these message classes

    MVS_GETMSGCLASSESMVS_GetMsgClass

    T

    Purge
    (0=no, 1=yes, 2=default)

    MVS_JOBPURGEMVS_PugreJob

    V

    Release
    (0=no, 1=yes, 2=default)

    MVS_RELMSGCLASSMVS_RelMsgClass

    R

    Route to these message classes

    MVS_ROUTEMSGCLASSMVS_RouteMsgClass

    W

    Return code
    (H=highest, L=latest)

    MVS_DETERMINE_RETCODEMVS_DetermineRetcode

    For comparison, here is a similar excerpt from an XML export.

    Example ATTR_MVS dictionary from XML export

    <ATTR_MVS state="1"> <OutputDb>1</OutputDb> <OutputDbErr>0</OutputDbErr> <OutputFile>1</OutputFile> <MVS_TypeUC4>0</MVS_TypeUC4> <MVS_TypeJCL>1</MVS_TypeJCL> <MVS_TypeMVS>0</MVS_TypeMVS>
    <MVS_TypeAEJCL>0</MVS_TypeAEJCL>
    <MVS_JobName>UC4DEMO</MVS_JobName> <MVS_JobClass>A</MVS_JobClass> <MVS_ProgName>MICHAEL</MVS_ProgName> <MVS_Account>'D08/APPL'</MVS_Account> <MVS_Priority>3</MVS_Priority> <MVS_MsgLevel>1,1</MVS_MsgLevel> <MVS_MsgClass>6</MVS_MsgClass> <MVS_Notify>4</MVS_Notify> <MVS_Params>SCHENV='SEV_BTCH_DEV'</MVS_Params> <MVS_FileName>S46JZ8.JCL.CNTL(UC4DEMO)</MVS_FileName> <MVS_ComplJobOut>0</MVS_ComplJobOut> <MVS_GetMsgClass>*ALL</MVS_GetMsgClass> <MVS_PugreJob>2</MVS_PugreJob> <MVS_RelMsgClass>1</MVS_RelMsgClass> <MVS_RouteMsgClass>5</MVS_RouteMsgClass> <MVS_DetermineRetcode>L</MVS_DetermineRetcode> </ATTR_MVS>
    Can anyone confirm or correct my findings? Thanks in advance.

    * z/OS job type MVS_TypeAEJCL is undocumented. A job with this job type can be imported from XML, but the chosen setting is not displayed in the Java UI.


  • 2.  z/OS jobs in transport case file
    Best Answer

    Posted Sep 26, 2016 08:53 AM
    I discovered that sub-field 2 of record F013C specifies the z/OS job type. I have updated the original post with details.

    If you are interested in doing your own investigations, here is the query I used:
    select * from JBA, OH
    where JBA_OH_Idnr = OH_Idnr
    and OH_Name = 'jobname'
    It appears that the F***y records appearing under TJBA in the transport case file correspond to the columns in the JBA table, where *** is the number of the column as listed in the DB schema, and y is some sort of field type identifier. E.g., F001+ is JBA_OH_Idnr, F002C is JBA_HostDst, and so on. I have never been able to obtain documentation of the transport case file format, so this was a new discovery for me.


  • 3.  z/OS jobs in transport case file

    Posted Sep 28, 2016 08:34 AM
    Here is a regular expression that can be used to parse the contents of the JBA_Rest field.
    s/(\w)=([\"'])((?:(?!\2).)*)(\2)/$1\t$3\n
    An example follows.

    Input:

    F013CJ='4'K='6'2='9'6='UC4DEMO'P='MICHAEL'O='1,1'7="SCHENV='SEV_BTCH_DEV'"Q='S46JZ8.JCL.CNTL(UC4DEMO)'a="'D08/APPL'"U='0'S='*ALL'T='2'V='1'R='5'W='L'

    Output:

    J       4
    K       6
    2       9
    6       UC4DEMO
    P       MICHAEL
    O       1,1
    7       SCHENV='SEV_BTCH_DEV'
    Q       S46JZ8.JCL.CNTL(UC4DEMO)
    a       'D08/APPL'
    U       0
    S       *ALL
    T       2
    V       1
    R       5
    W       L


  • 4.  z/OS jobs in transport case file

    Posted Oct 04, 2016 08:31 AM
    A few years ago, Christian Bartl wrote a helpful script to list objects in a transport case file. I made a different version of this script, list_objects_in_transport_case2.sh, that prints additional information for JOBS objects, and also prints the attributes of z/OS jobs. Here is some sample output from the script.
    Listing objects in transport case file.
    --------------------------------------------------------------------------------
    Client       : 0100
    Type         : JOBS
    Name         : UC0.ITE.TEST#1_3.JOBS_WIN
    Title        : Template for Job: WINDOWS
    Host type    : WINDOWS
    Queue        : UC0
    Folder       : /APPS/UC0/AUTOMATED_TESTS_ITE/TEST1
    Host         : WINFT
    Login        : UC0.LOGIN
    --------------------------------------------------------------------------------
    Client       : 0100
    Type         : JOBS
    Name         : UC0.ITE.TEST#1_2.JOBS_UNIX
    Host type    : UNIX
    Queue        : UC0
    Folder       : /APPS/UC0/AUTOMATED_TESTS_ITE/TEST1
    Host         : XMM_SERVER
    Login        : UC4.LOGIN
    Priority     : 0
    --------------------------------------------------------------------------------
    Client       : 0100
    Type         : JOBS
    Name         : UC0.ITE.TEST#1_3.JOBS_ZOS
    Title        : Job with z/OS member name in another prefix under the same APM.
    Host type    : MVS (z/OS)
    Queue        : UC0
    Folder       : /APPS/UC0/AUTOMATED_TESTS_ITE/TEST1
    Host         : ZOS_DEV
    Login        : UC0.MAL.LOGIN.ZOS_DEV.TECUC4D2
    Job class    : A

    z/OS job attributes:
    1  J : Notify
    2  K : Message class                6
    3  2 : Job type                     A (JCL incl. z/OS job card)
    4  6 : Job name                     &JOBNAM#
    5  P : Programmer name              &USERNAME#
    6  O : Message level                1,1
    7  7 : Job parameters
    8  Q : z/OS file name               OSRZT.UC4.PROD.JCLLIB(UC4TEST1)
    9  a : Account                      'D08/APPL'
    10 U : With non-JES output          1 (yes)
    11 S : Obtain message class(es)     *ALL
    12 T : Purge                        0 (no)
    13 V : Release                      0 (no)
    14 R : Route to message class(es)   H
    15 W : Return code                  H (highest)
    --------------------------------------------------------------------------------
    Client       : 0100
    Type         : JOBS
    Name         : UC0.ITE.TEST#1_1.JOBS_FTP
    Host type    : CIT (RA)
    Queue        : UC0
    Folder       : /APPS/UC0/AUTOMATED_TESTS_ITE/TEST1/RA_JOBS
    Host         : RA.FTP.WIN.A
    RA solution  : FTPAGENT
    Job sub-type : FTPJOB
    --------------------------------------------------------------------------------
    Client       : 0100
    Type         : JOBS
    Name         : UC0.ITE.TEST#1_1.JOBS_PCE_DOM3
    Host type    : CIT (RA)
    Queue        : UC0
    Folder       : /APPS/UC0/AUTOMATED_TESTS_ITE/TEST1/RA_JOBS
    Host         : PCE-ZRH-DOM3-DEV
    RA solution  : INFORMATICAAGENT
    Job sub-type : WORKFLOWJOB
    --------------------------------------------------------------------------------
    Client       : 0100
    Type         : JOBS
    Name         : UC0.ITE.TEST#1_1.JOBS_WEBSERVICE_SOAP
    Host type    : CIT (RA)
    Queue        : UC0
    Folder       : /APPS/UC0/AUTOMATED_TESTS_ITE/TEST1/RA_JOBS
    Host         : RA.WEBS.A
    RA solution  : WEBSERVICE
    Job sub-type : SOAP
    --------------------------------------------------------------------------------
    Client       : 0100
    Type         : JOBS
    Name         : UC0.ITE.TEST#1_1.JOBS_WEBSERVICE_REST
    Host type    : CIT (RA)
    Queue        : UC0
    Folder       : /APPS/UC0/AUTOMATED_TESTS_ITE/TEST1/RA_JOBS
    Host         : RA.WEBS.A
    RA solution  : WEBSERVICE
    Job sub-type : REST
    --------------------------------------------------------------------------------
    Enjoy, and feel free to post any improved versions you come up with.


  • 5.  z/OS jobs in transport case file

    Posted Jan 27, 2017 09:29 AM
    In case anyone is using this script, I wanted to let you know that I have developed an improved approach extracting this sort of information:
    1. Run a general-purpose script, parse_transport_case.sh, to extract desired information from a transport case file.
    2. Run a special script, parse_JBA_Rest.sh, to parse the JBA_Rest field.
    Update: I created a new thread for all of the various transport case parsing scripts. When I revise the scripts, or develop new ones, I will post an update there.


  • 6.  z/OS jobs in transport case file

    Posted May 18, 2017 05:41 AM
    Philipp Elmer pointed out that it is possible to learn about the attribute names of the sub-fields of the JBA_Rest field for a given agent type using an SQL query.