Académique Documents
Professionnel Documents
Culture Documents
1. Introduction 3
2. Creating Elements 4
TOC
• If the copybook you are creating has new elements, you need the ability to add
these elements into ARz/OS.
• Elements added by developers will use a status of “RQ” and elements added by
Data Modelers will use a status of “DQ”.
• Elements may appear in copybooks having an “RQ” or “DQ” status and that
copybook can be generated thus making it able to be included in COBOL programs;
however, the copybook can not be checked-in until all elements have been
approved which changes the status to “APPRV”.
• Data Modelers approve elements; however, not all Data Modelers have this
approve authority.
TOC
• The last component also represents a standard class of elements; for example, NBR
for number, DT for date, NM for name, etc.
• When composing a new element, determine which components you may use. To do
this, use the “GLOSSARY” ARz/OS type.
TOC
• Group elements
– grouping other groups or elements
– make name unique in ARz/OS
– support for 10 levels
This section of information provides the key for the element; name, status and version and the
description of the element contained in the BUSINESS_NAME column.
The OPTIONAL TEXT field contains the VARIATION_NAME from Brownstone unless the field
contains “XML TAG” in which case the field will be blank.
If an element is an alias of another element, then the root element and its status and version will
appear in this area.
This section of information provides data type, length and other pieces of information that aid in
generating the PICTURE clause for the element.
If a field has a standard length that is based upon its data type, the MAXIMUM LENGTH field will
equal zero.
If the CUSTOM PICTURE is blank, ARz/OS will generate the PICTURE clause for the element
using the other pieces of data; data type, length, sign, etc. If the CUSTOM PICTURE is not blank,
it will be the actual PICTURE clause used for that element. Typically, those elements are special
display type elements.
PREFERRED Element is the preferred usage when more than one version exists for the
element.
XML USAGE Element represents an XML field. During conversion, if the Brownstone
VARIATION_NAME contained the text “XML TAG”, this field was set to a “Y”
VENDOR SOFTWARE Whether or not the element represents an element from a vendor.
This section provides the DB2 column name if the element represents a DB2 column. The other two
name fields are not used.
This section of information contains original system information from Brownstone. Each
Brownstone element was converted to an ARz/OS element.
The first field above is the value of the INTERNAL_ID from PRDDS50.E_ELM for the element
in question (SKU_NBR).
The creator information provides who and when the element was first added to Brownstone and
the update information provides who and when the last update against this element took place in
Brownstone.
This section of information contains information when the element was added to ARz/OS and
subsequently updated.
The creator information provides who and when the element was first added to ARz/OS and the
update information provides who and when the last update against this element took place in
ARz/OS.
The creator information will come from the DBXLOAD load process if the element was converted
from Brownstone. The modified information may also be from a DBXLOAD process if a latter load
updated one or more of the attributes.
• These new elements may be used in a copybook; however, that copybook can not be checked
in until a Data Modeler has approved it which changes the status to APPRV.
• These elements were converted to ARz/OS by adding them to a copybook and then scanning
that copybook in.
• In many cases, these elements became standard elements in ARz/OS in that by storing the data
type, length, scale, sign, etc., ARz/OS would be able to generate the appropriate PICTURE
clause when using the element in a copybook.
• In those cases, where the PICTURE clause was truly a “display special”, the PICTURE clause
is stored as a column in the ARz/OS metadata table ( DBX_DDL_ELEMENTS) and it is used as
the PICTURE clause when attached to a copybook.
• If an element has more than one version, determine which version you want. Generally, a
version of “0” is the preferred element. There will also exist a “PREFERRED” flag when looking
at the element in ARz/OS in the “ELEMENT” type.
• You may also wish to verify you have the proper RACF security. You will need access to group
$EN<SYS>ESI. For example, system code “TA” would need access to $ENTAESI. Use TSO
command “BTSO LU <your TSO ID> i.e. “BTSO LU ADRVD”. Search the generated
output.
• Creating the copybook will involve entering information in the following ARz/OS panel types in
the steps specified:
1. RECORD Builds the record structure
2. COPYBOOK Adds the new copybook
3. COPY REC Relates COPYBOOK to the record(s) it contains
4. COPYBOOK Back to copybook to generate the copybook
5. COPYBOOK Check-in the copybook
TOC
• Each record name will be unique and each group item name should be unique as
well.
• Records and group items have the traditional Life Cycle Phases you are familiar
with starting with AD ( Application Development ) or AT ( Architecture Test ). Once
the copybook is checked in, their status will change as migration events occur to
ST, QA and finally PR.
• Elementary items in the record represent elements also having a status and
version. Their status will be different than the other two types.
– INUSE Elements used in the environment that should be managed but are not
Should be approved and changed to APPRV
• Before a copybook can be checked in, each element must be in the APPRV status.
• You may still use a generated copybook before the elements have been approved
but run the risk of coding changes if the element name or its characteristics are not
approved.
Copybook -
Table - PR
PR
Migrate
Table - QA Copybook -
QA
DBMS Catalog
Elements
Migrate
Catalog Sync Migrate Copy
Table - ST (Generatable
Copybooks only)
Copybook -
ST
Migrate
Table AD/AT
Copybook -
AD/AT Quick REC User
Create/Edit
Table - DE
en ks
ook
lem oo
DBA Edit
ts
k
oo
oo
r E pyb
DT Copyb
yb
yb
p o Co
op
op
rou le
eC
DT
b
, G ata
rat
DB
ne
DB
rds er
c o en
an
Ge
Generate
Re -G
Sc
n
No No
DDL
ad
Lo
ER/Win
External Source
Endevor Manage Non-Generatable copybooks Vender Product
Dev around Vendor Prod
Bad Programmers
STRUCT RECORD
STRUCT GROUP
ELM ELEMENT
ELM ELEMENT
This slide illustrates the similarities between Brownstone and ARz/OS in how generated
copybooks are structured.
TOC
TOC
TOC
1089043 200
REC MAP
FIELD EMPL_REC_001. ELEMENT
EMPL_REC_001. EMPL_KEY_001_GRP001 EMPL_SSN_NBR
EMPL_KEY_001_GRP001 1089061 25434 891811 25434
1089054 207
TOC
TOC
TOC
When creating a record using the QuickRec facility, you may need to use techniques
for specialty clauses:
• OCCURS / DEPENDING
• ASCENDING KEY / DESCENDING KEY
• INDEXED BY
• REDEFINES
• VALUE
• 88 LEVELS
• FILLER
TOC
The number of occurrences is defined on the panel where the fields are listed by scrolling to the
right and entering that number in the “ OCC 1” column and if the number varies, the “ OCC 2”
column as well . If the number of occurrences varies, a “ DEPENDING” function will be defined to
specify the object of the clause ( CAN-STEP-IDX-NBR in the second example above).
The “ASCENDING” key is defined as the “KEY” function. If desired, a descending key can also
be defined and the function type is “ DESC KEY”.
To assign a field an initial value, you use the technique to examine a field’s attributes. You must
scroll forward until you see the field where that value is entered.
Each FILLER is handled by selecting the field and then using the DETAIL option of VIEWEDIT
to provide the length.
This section will discuss methods for handling the following type of special cases:
TOC
• Each field of each record will be qualified by the copybook name; thus, if you have
the same element in more than one record, you will have to qualify the field in the
COBOL program.
• The following slides will illustrate key points about this process.
For RECORD/GROUP
INFORMATION, the record
name, status and version are
entered.
01 AADA9991-RFM-BGN-BLK.
05 AADA9991-RPT-ID PIC X(08).
05 AADA9991-REX-REC-TYP-IND PIC X(01).
88 AADA9991-RFM-BEGIN-REC VALUE 'B'.
88 AADA9991-RFM-DATA-REC VALUE 'D'.
88 AADA9991-RFM-END-REC VALUE 'E'.
05 AADA9991-SORT-FLD-TXT PIC X(100).
05 AADA9991-RFM-BGN-DATA-TXT.
10 AADA9991-RFM-AS-OF-DT PIC X(10).
10 AADA9991-RFM-RUN-DT PIC X(10).
10 AADA9991-RFM-RUN-TM PIC X(8).
*****************************************************************
* NAME: RFM_DATA_BLK
* STATUS: AD
* VERSION: 0
* SYNTAX GENERATED ON 05/15/2007 AT 13:08:39
* GENERATED BY: ADRVD
*****************************************************************
******************************************************************
01 AADA9991-RFM-END-BLK.
05 AADA9991-RPT-ID PIC X(08).
05 AADA9991-REX-REC-TYP-IND PIC X(01).
88 AADA9991-RFM-BEGIN-REC VALUE 'B'.
88 AADA9991-RFM-DATA-REC VALUE 'D'.
88 AADA9991-RFM-END-REC VALUE 'E'.
05 AADA9991-SORT-FLD-TXT PIC X(100).
05 AADA9991-RFM-END-DATA-TXT.
AA10 AADA9991-RFM-DATA-RCDS-NBR PIC S9(09).
As each record has some common fields, you must qualify the field in the COBOL program:
• If you have a common group of fields that exist in multiple records, entering the
group name of an existing group while in QuickRec will pull in the elementary
fields attached to that group.
• This example to illustrate reuse of a group element will take the copybook from
the prior section that had three records in it. Each record had a common key, the
first three fields. The first record will create a new group for this key and the two
remaining records will then reuse it.
01 AADA9991-RFM-BGN-BLK.
05 AADA9991-REX-SORT-KEY.
10 AADA9991-RPT-ID PIC X(08).
10 AADA9991-REX-REC-TYP-IND PIC X(01).
88 AADA9991-RFM-BEGIN-REC VALUE 'B'.
88 AADA9991-RFM-DATA-REC VALUE 'D'.
88 AADA9991-RFM-END-REC VALUE 'E'.
10 AADA9991-SORT-FLD-TXT PIC X(100).
Above example only illustrates the first record and only the new group item containing the sort key.
• Copybooks are created by Database Administrators using ARz/OS while in the “ TABLE” type.
• “RECORD PREFIX” can not be updated on the screen while “DESCRIPTION” may be.
TOC
ENT RECORD
ID COL1 STATUS VERSION PREFIX COL2
----------- ------------------ -------- ------- --------------- --------
958879 JOB_DRVR_PARM AT 0 DBDTA441 NP1.AD1T
• Which PDS the member is added to is dependent on the “STATUS” of the “TABLE” entity in
ARz/OS:
– A STATUS of “AD” adds the member to “CADSS.SH.BMPX.CPYSRC”.
– A STATUS of “AT” adds the member to “CATSS.SH.BMPX.CPYSRC”.
• The new Endevor element’s environment will be dependent on the table’s STATUS IN ARz/OS.
ENDEVOR Location:
ENVIRONMENT.. DEVL
SYSTEM....... TA
SUBSYSTEM.... DB
ELEMENT...... DBDTnnn1
TYPE......... DBCPY
ENDEVOR Location:
ENVIRONMENT.. ARCH
SYSTEM....... TA
SUBSYSTEM.... DB
ELEMENT...... DBDTnnn1
TYPE......... DBCPY
Test
CADSS.SH.BMPX.AD.CPYSRC
Prod
CADSS.SH.BMPX.CPYSRC
• These type of copybooks are created in Endevor preferably using the QuickEdit facility.
• If the copybook is a BMS symbolic map, then the correct name should be used and the BMS map
should exist.
• The BMS map that should exist will have a name the same as the symbolic map except minus
the third character “D”.
TOC
• The table on the next slide illustrates various conditions and what dataset the
copybook is added to and what the various flags will be in ARz/OS.
• Vendor copybooks will always be added to ARz/OS with the NON-GENR APPROVED
FLAG set to “N”. This requires a Data Modeler to approve the copybook and then the
Endevor GENERATE facility must be done again.
• Only the copybook is added to ARz/OS; none of the elements will be added.
No No N/A COPYSHR 12 N
No Yes Y CPYSRC 0 Y
Yes for “Symbolic Map” means that the map follows the naming convention for a symbolic map.
BEFORE indicates status prior to add or generate in Endevor, AFTER indicates status after the
Endevor job has run.
The dataset name is only the last node. It will be either CAD<ss>.SH.BMPX.COPYSHR or
CADSS.SH.BMPX.CPYSRC. If the member is in CPYSRC, it will also be in COPYSHR.