Vous êtes sur la page 1sur 176

CopyBook Creation

5/28/2007 CopyBook Creation 1


The Home Depot, Inc.
Table of Contents

1. Introduction 3

2. Creating Elements 4

3. Creating Generated Copybooks 43


3.1 Building the Record 49
3.2 Add Copybook 68
3.3 Relate Copybook to Record 72
3.4 Generate Copybook 76
3.5 Check-In Copybook 86
3.6 Check-Out Copybook 95
3.7 Defining Special Clauses 101
3.8 Special Topics 124

4. Creating DBDT Copybooks 138

5. Creating Non-Generated Copybooks 159

5/28/2007 CopyBook Creation 2


The Home Depot, Inc.
1. Introduction
• Three types of copybooks exist:
– Generated Endevor type CPY
– Non-generated Endevor type NGCPY
– DBDT Endevor type DBCPY

• Generated copybooks are built in Allfusion Repository z/OS


(ARz/OS) using approved elements.

• Non-generated copybooks are built in Endevor and typically


represent:
– BMS symbolic copybooks
– Vendor copybooks

• DBDT copybooks are built in ARz/OS by Database Administrators


and represent DB2 tables.

TOC

5/28/2007 CopyBook Creation 3


The Home Depot, Inc.
2. Creating Elements
• Elements are the basic building block for creating a copybook.

• If the copybook you are creating has new elements, you need the ability to add
these elements into ARz/OS.

• Each element is identified by a name, status and version.

• The element name should be limited to 18 characters if representing a DB2 column


or 21 if not. In the copybook, the element will be prefixed by the copybook name
and a hyphen which will account for 9 characters thus assuring the COBOL
limitation for user-defined variables of 30 is not exceeded.

• 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

5/28/2007 CopyBook Creation 4


The Home Depot, Inc.
• An element version of “0” (zero) typically represents the preferred version if there
exists more than one version of an element. The ELEMENT type will also have a flag
indicating that it is the preferred version.

• Each element consists of two or more components where each component


represents a valid Home Depot abbreviation.

• 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.

• Another recommendation is to model an existing element that has similar attributes


when inserting the new element. That way, you will limit the number of changes you
have to make.

TOC

5/28/2007 CopyBook Creation 5


The Home Depot, Inc.
• Basic attributes are
– Element name limited to 32 characters
– Data Type internal storage type
– Length maximum number of significant digits or characters
– Decimal number of significant digits after decimal
– Picture Clause if blank, generated based on data type, length and decimal
– Blank Y for CO0BOL when BLANK WHEN ZERO
– Justify Y for COBOL option JUSTIFIED
– Sign Y for signed elements
– Sign Position L (leading), T (trailing), S (leading separate, X (trailing separate)
– Upper Case only Y if element is upper case
– Leading Zeros Y for COBOL option LEADING ZERO
– Commas Y for COBOL option COMMAS
– Assembler Operation Assembler Operation Code

• Group elements
– grouping other groups or elements
– make name unique in ARz/OS
– support for 10 levels

5/28/2007 CopyBook Creation 6


The Home Depot, Inc.
Invoke ARz/OS by typing
“D;AR” from the “ISPF
Primary Option Menu”.

Option “D;AE” invokes ARz/OS


as well and additionally allows
you to use QMF.

5/28/2007 CopyBook Creation 7


The Home Depot, Inc.
This is the “Welcome” screen.
Press <ENTER> with cursor
positioned on “OK” to continue.

5/28/2007 CopyBook Creation 8


The Home Depot, Inc.
This is the “Main” screen. If you
have any other screen, you may
use command “MAIN” to take you
to this screen.

It depicts the version of ARz/OS


you are working with.

5/28/2007 CopyBook Creation 9


The Home Depot, Inc.
ARz/OS organizes information
by dialogs and then types.

Commands illustrated take you


the “GLOSSARY” type in the
“DEV” dialog.

Note, commands are stacked by


separating with a semi-colon (;).

Commands are not case


sensitive.

Command “VD” is short for


“View Dialog” and command
“VT” is short for “View Type”.

5/28/2007 CopyBook Creation 10


The Home Depot, Inc.
The command “VLE Q” stands
for “View List Query” and will
allow us to find which
abbreviations have a certain
word in it.

5/28/2007 CopyBook Creation 11


The Home Depot, Inc.
Before composing the query, a
technique to discover the
column names is to put a “?” in
the “COLUMNS” area and then
press <ENTER>.

5/28/2007 CopyBook Creation 12


The Home Depot, Inc.
Highlight the column of interest
and copy into your clipboard.

5/28/2007 CopyBook Creation 13


The Home Depot, Inc.
Copied column is pasted and
the WHERE clause is
completed.

Additionally, because we expect


this to be a common query, the
query will be saved:
1. Assign a name limited to 8 chars.
2. Provide a meaningful description.
3. Position cursor on QUERY toolbar
option and press <ENTER>.
4. Arrow down to “SAVE” in the pick
list and press <ENTER> again.

Press <F3> to run the query.


If you decide not to run the
query, issue the “CAN”
command.

5/28/2007 CopyBook Creation 14


The Home Depot, Inc.
Output may be scrolled.

Press <F3> when finished.

5/28/2007 CopyBook Creation 15


The Home Depot, Inc.
Slide depicts selecting a saved
query:
1. Position cursor on QUERY toolbar
option and press <ENTER>.
2. Press <ENTER> again as cursor
is on the “SELECT” pick list
option.
3. Select the desired query.

5/28/2007 CopyBook Creation 16


The Home Depot, Inc.
This query will list all standard
class abbreviations. Recall an
element must end with one of
these abbreviations.

Press <F3> to run the query.

5/28/2007 CopyBook Creation 17


The Home Depot, Inc.
Output may be scrolled.

Press <F3> when finished.

5/28/2007 CopyBook Creation 18


The Home Depot, Inc.
Command “VT ELEMENT”
switches us to the ELEMENT
type.

5/28/2007 CopyBook Creation 19


The Home Depot, Inc.
The command “VLE” stands for
“View List Entity”. If executed
with nothing below “ELEMENT
NAME”, “STATUS” and “VER” ,
up to 999 elements will be
listed. If anything is entered in
these fields, only elements
beginning with that string, status
and version are returned. For
example. If an “S” is entered, up
to 999 elements beginning with
an “S” are returned. If the entire
element name is entered, only
elements with that name are
returned ( may have more than
1 version).

5/28/2007 CopyBook Creation 20


The Home Depot, Inc.
If only one element is returned,
you do not need to select it;
otherwise select the element(s)
you desire in examining and
press <ENTER>.

If you want to select them all,


use the “TAG” command.

5/28/2007 CopyBook Creation 21


The Home Depot, Inc.
Command “VM” stands for View
Mode an is used to toggle
between a horizontal and
vertical mode.

The horizontal mode is depicted


in this slide.

You may still scroll left and right


using F10 and F11 to see
additional information.

5/28/2007 CopyBook Creation 22


The Home Depot, Inc.
Commands “NEXT” and
“PREV” may be used to move
forward and backward in the
selected elements. However, it
is easier to use a PF key.

Use the ISPF KEYS command


to set up your keys.

5/28/2007 CopyBook Creation 23


The Home Depot, Inc.
PF4 was changed to “VD
DEV” to view the DEV dialog.

PF6 will be used to advance to


the “next” entity.

When you press <ENTER>,


change PF18 to PREV for
“previous” entity.

Press <PF3> to exit setting up


the keys.

5/28/2007 CopyBook Creation 24


The Home Depot, Inc.
You may put a question mark in
a field and press <ENTER> to
see a list of choices.

Additionally, if you enter an “H”


on the command line, you will
help information on that field.

5/28/2007 CopyBook Creation 25


The Home Depot, Inc.
The choices for data type are
presented.

5/28/2007 CopyBook Creation 26


The Home Depot, Inc.
ELEMENT INFORMATION:
ELEMENT NAME ===> SKU_NBR
STATUS, VERSION ===> APPRV V: 0
BUSINESS NAME ===> SKU NUMBER
===>
OPTIONAL TEXT ===>

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.

5/28/2007 CopyBook Creation 27


The Home Depot, Inc.
ON SCREEN TIE INFORMATION:
ALIAS OF ELM NM ===>
STATUS, VERSION ===> V:

If an element is an alias of another element, then the root element and its status and version will
appear in this area.

5/28/2007 CopyBook Creation 28


The Home Depot, Inc.
STORAGE PARAMETERS:
DATA TYPE ===> INTEGER
MAXIMUM LENGTH ===> 0 DECIMAL PLACES ===> 0
SIGNED ELEMENT ===> Y (Y/N) SIGN POSITION ===> N
CUSTOM PICTURE ===>

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.

5/28/2007 CopyBook Creation 29


The Home Depot, Inc.
DETAIL INFORMATION:
PREFERRED ===> Y (Y/N) TO BE RETIRED ===> N (Y/N)
XML USAGE ===> (Y/N) VENDOR SOFTWARE ===> N (Y/N)
XML TAG ===>

This section of information contains miscellaneous detail:

PREFERRED Element is the preferred usage when more than one version exists for the
element.

TO BE RETIRED Element is to be retired. Originally element was in PP status in Brownstone.


As it is still being used, it has an APPRV status and should not be
considered for usage.

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.

XML TAG Contains the element name if the XML_USAG_FLG = “Y”

5/28/2007 CopyBook Creation 30


The Home Depot, Inc.
NAME INFORMATION:
DB2 COLUMN NAME ===> BABY_SKU_NBR
C NAME ===>
ASSEMBLER NAME ===>

This section provides the DB2 column name if the element represents a DB2 column. The other two
name fields are not used.

5/28/2007 CopyBook Creation 31


The Home Depot, Inc.
DISPLAY ATTRIBUTES:
COMMAS ===> N (Y/N) BLANK WHEN ZERO ===> N (Y/N)
LEADING ZEROS ===> N (Y/N) RIGHT JUSTIFY ===> N (Y/N)
UPPER CASE ONLY ===> N (Y/N)

This section provides display attributes.

5/28/2007 CopyBook Creation 32


The Home Depot, Inc.
ORIGINAL SYSTEM HISTORY:
BROWNSTONE INTERNAL ID ===> 6229
CRT USER ID ===> DAJLP
CRT DATE TIME VALUE ===> 91/09/21 18:08.09
UPD USER ID ===> ADRXF
UPD DATE TIME VALUE ===> 95/11/01 16:18.22

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.

5/28/2007 CopyBook Creation 33


The Home Depot, Inc.
HISTORY INFORMATION:
CREATED BY, DATE, TIME ===> ADRVD 2006-12-29 14.03.40
MOD BY, DATE, TIME ===> ADRVD 2007-02-22 16.31.48

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.

5/28/2007 CopyBook Creation 34


The Home Depot, Inc.
Creating the New Element

• The recommended steps for creating a new element:


– Determine components of the element name using accepted Home Depot standard abbreviations
from the GLOSSARY entity and ending in a standard class word also in that same entity.
– Match on an element with similar characteristics.
– Change the element name you matched on to the new element name.
– Enter a STATUS of RQ if you are a developer or DQ if you are a Data Modeler.
– Enter a VERSION of 0.
– For BUSINESS NAME, enter an appropriate description of the element.
– For the remaining sections of the map, modify any parameter different than the modeled element.
– Issue EDIT.INSERT or EI command to add new element.
– Enter TD to provide a text description.

• 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.

5/28/2007 CopyBook Creation 35


The Home Depot, Inc.
The element that the new element
will be based on is displayed.

5/28/2007 CopyBook Creation 36


The Home Depot, Inc.
The following fields were
changed:
•ELEMENT NAME
•STATUS
•VERSION
•BUSINESS NAME

EI command used to insert


new element.

5/28/2007 CopyBook Creation 37


The Home Depot, Inc.
Components of element name
representing abbreviations are
expanded.

5/28/2007 CopyBook Creation 38


The Home Depot, Inc.
Map was scrolled to the bottom
to illustrate “HISTORY
INFORMATION” before
typing“TD” command to provide
text description.

5/28/2007 CopyBook Creation 39


The Home Depot, Inc.
A text description is provided.

Administrative notes can be


provided using the “ADN”
command. This is usually done
by a Data Modeler.

5/28/2007 CopyBook Creation 40


The Home Depot, Inc.
DISPLAY SPECIAL
• In Brownstone, there was a special element type code, DS, representing “Display Special”.
These elements typically had a non-standard PICTURE clause or represented a data type in
Brownstone that was not directly supported; namely INTEGER or DECIMAL.

• 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.

• The table on the following page will provide some examples.

5/28/2007 CopyBook Creation 41


The Home Depot, Inc.
Brownstone ---------------------------------------------- ARz/OS ---------------------------------------------
PICTURE PICTURE DATA TYPE LENGTH DECIMAL SIGN COMMAS

9(5) blank NUMERIC 5 0 N N

S9(9) blank NUMERIC 9 0 Y N

-9(9).9(2) -9(9).9(2) NUMERIC 13 2 Y N

-ZZZZZZ -ZZZZZZ NUMERIC 7 0 N N

ZZ,ZZZ,ZZ9 ZZ,ZZZ,ZZ9 NUMERIC 10 0 N Y

5/28/2007 CopyBook Creation 42


The Home Depot, Inc.
3. Creating Generated Copybooks
• To start off, have an idea of what elements will exist in your copybook. Make a list and specify
the order.

• 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.

• Determine if any element will have “88” levels.

• 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

5/28/2007 CopyBook Creation 43


The Home Depot, Inc.
• A copybook will consist of a record possibly having one or more group items and
one or more elementary items.

• 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.

5/28/2007 CopyBook Creation 44


The Home Depot, Inc.
• Status values for elements:

– APPRV Elements in an approved status

– RQ Elements in a request status awaiting to be approved


Created by developers

– DQ Elements in a request status awaiting to be approved


Created by data modelers

– INUSE Elements used in the environment that should be managed but are not
Should be approved and changed to APPRV

– RET Elements that have been retired

• 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.

5/28/2007 CopyBook Creation 45


The Home Depot, Inc.
Copybook Metamodel

5/28/2007 CopyBook Creation 46


The Home Depot, Inc.
CopyBook Flows
ARz/OS

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

5/28/2007 CopyBook Creation 47


The Home Depot, Inc.
BROWNSTONE ARz/OS
CPYLIB COPYBOOK

STRUCT RECORD

STRUCT GROUP

ELM ELEMENT
ELM ELEMENT

This slide illustrates the similarities between Brownstone and ARz/OS in how generated
copybooks are structured.

5/28/2007 CopyBook Creation 48


The Home Depot, Inc.
3.1 Building Record

From the main screen, go to the


“RECORD” type in the “DEV”
dialog.

If already in the “DEV” dialog,


just use “VT RECORD” .

TOC

5/28/2007 CopyBook Creation 49


The Home Depot, Inc.
The way a screen is viewed
(horizontal versus vertical ) may
be toggled with command “VM”
(View Mode).

For data entry mode, use a


vertical screen.

5/28/2007 CopyBook Creation 50


The Home Depot, Inc.
Key information is first entered;
NAME, STATUS and
VERSION. Use the values
shown for STATUS and
VERSION.

The record name should be


unique.

New records initially have a


status of “AD” .

A question mark (?) may be


entered to present a window of
the valid choices you may
select from.

5/28/2007 CopyBook Creation 51


The Home Depot, Inc.
Choose the appropriate
programming language that will
use the record.

Most likely, you will use COBOL


and the code value will be a “C”.

5/28/2007 CopyBook Creation 52


The Home Depot, Inc.
Command “EI” (Edit Insert) is
used to add the record.

If you made an error in the


record name after the insert,
simply change the name and
do an “EU” (Edit Update).

5/28/2007 CopyBook Creation 53


The Home Depot, Inc.
Note, when the record is
inserted, audit information is
maintained. See the last two
fields on the screen.

5/28/2007 CopyBook Creation 54


The Home Depot, Inc.
To continue, the fields must be
added to the record.

One way is to use the toolbar


approach to drill down to the
“Quick Record” facility:

OPTIONS -> QUICK -> REC

A shortcut is to use command


“QREC”.

5/28/2007 CopyBook Creation 55


The Home Depot, Inc.
Position cursor on “MAX” to
maximize the screen in order
to see more data and press
<ENTER>.

5/28/2007 CopyBook Creation 56


The Home Depot, Inc.
Group level item was entered
and line command “I” used to
insert a new line.

Note, all of the line commands


you are familiar with may be
used:
D - Delete
I - Insert
C - Copy
M - Move
A - After
B - Before

Make the group item name


unique. Verify against the
“GROUP” type.

5/28/2007 CopyBook Creation 57


The Home Depot, Inc.
Command “VLE” can be
executed on the “GROUPS”
entity for groups beginning with
“EMPL_” to verify if not only the
record but any group items
already exists.

The example to the left illustrates


the record name and group items
after our record has been built.

5/28/2007 CopyBook Creation 58


The Home Depot, Inc.
You must select the elements
from a list:
1. Enter a prefix followed by a “?”
in the “GROUP / ELEMENT
NAME” column.
2 Change the status to “APPRV”
3. Blank out version
4. Press the <ENTER> key.

A list of elements beginning


with that prefix in the
“APPRV” status and any
version will be displayed.

5/28/2007 CopyBook Creation 59


The Home Depot, Inc.
Results are shown. Select one or
more of the elements, scrolling if
necessary.

Press <ENTER> when you have


finished selecting the fields.

5/28/2007 CopyBook Creation 60


The Home Depot, Inc.
Selected element now appears
in the record structure.

Also note that the level number


for this field was changed to “03”
to make it subordinate to the field
above; in effect make that field a
group item.

5/28/2007 CopyBook Creation 61


The Home Depot, Inc.
Another group item has been
added again making the name
unique. Recall the line
command “I” was used to
insert new lines.

The second line will be used to


insert new fields. The “LVL”
was changed to “03”.

5/28/2007 CopyBook Creation 62


The Home Depot, Inc.
Three more elements were
selected.

Now it is desired to rearrange


some of the fields. Again line
commands which you are
already familiar with are used.

Note, it is not necessary to


complete a record structure in
one sitting. You can save along
the way by using the toolbar
option “PROCESS”.

5/28/2007 CopyBook Creation 63


The Home Depot, Inc.
Record structure is illustrated
after fields have been rearranged
and one more field is added.

Note, if you know the element


name, type it followed by a
question mark (?). If only one
version exists, it will
automatically be selected.

5/28/2007 CopyBook Creation 64


The Home Depot, Inc.
To examine a field’s attributes,
choose the tool bar “DETAIL”
option and then ‘VIEWEDIT”
from the drop down list. You
must select a field first.

5/28/2007 CopyBook Creation 65


The Home Depot, Inc.
Elements with a version of “0”
are typically the “preferred”
element.

You may view the view the


element in the “ELEMENT”
entity. One of the attributes is
the “PREFERRED” flag.

5/28/2007 CopyBook Creation 66


The Home Depot, Inc.
Once you have selected all of
the fields to build the record,
you must use the “PROCESS”
command to apply the changes.
Simply, position the cursor on
the toolbar option and press
<ENTER>.

Press <F3> to exit the


QuickRec facility.

5/28/2007 CopyBook Creation 67


The Home Depot, Inc.
3.2 Add Copybook

The next step is to add the


“COPYBOOK” instance. Use
command “VT COPYBOOK” to
go to that type.

TOC

5/28/2007 CopyBook Creation 68


The Home Depot, Inc.
You may use the “VLE”
command to list similar
copybooks and then use one of
them as a model to insert the
new copybook.

5/28/2007 CopyBook Creation 69


The Home Depot, Inc.
Select the record you wish to
model. As explained on the next
slide, it should be from the same
subsystem.

5/28/2007 CopyBook Creation 70


The Home Depot, Inc.
Command “EI” is used to insert
the record. The record you
modeled should be for the same
subsystem; otherwise, you must
change to the correct sub-
system code. You may put a
question mark “?” to see a valid
list to choose from.

You should also change the


“GENR VALUE CLAUSES”
and “GENR 88 LEVELS” to a
“Y” if you desire those features.
Note, if you change these fields
after the initial insert, you must
use the “EU” command to
update; otherwise, you will get a
message that the entity has
been changed but not updated.

5/28/2007 CopyBook Creation 71


The Home Depot, Inc.
3.3 Relate Copybook to Record

The next step is to go the


“COPY REC” relationship
using the command:
GOTO COPY REC

This entity will relate the


copybook to the record(s) it
contains.

TOC

5/28/2007 CopyBook Creation 72


The Home Depot, Inc.
The record name, status and
version are entered as
illustrated.

Then the “EI” command is


used to insert the relationship.

If you are unsure of the entire


RECORD NAME, you may
enter a partial name and use
the VLT (View List
Target) to present a list to
choose from.

5/28/2007 CopyBook Creation 73


The Home Depot, Inc.
The “COPY REC”
relationship is illustrated after
the insert.

5/28/2007 CopyBook Creation 74


The Home Depot, Inc.
COPYBOOK This slide contains the metadata model for our new copybook. Not all GROUPs,
TIDA9001 ELEMENTs, etc. are shown.
1089046 557
GROUPS
EMPL_KEY_001_GRP001
COPY REC
1089045 25434
TIDA9001.
REC MAP
EMPL_REC_001
EMPL_REC_001.
1089047 570 FIELD
EMPL_KEY_001_GRP001
EMPL_KEY_001_GRP001.
1089058 25434
RECORD EMPL_SSN_NBR

EMPL_REC_001 1089052 207

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

REC MAP RM VALUE


GROUP VALUE
EMPL_REC_001. EMPL_REC_001.
FEMALE
EMPL_KEY_001_GRP001
SEX_TYP_CD.7 SEX_TYP_CD.7.FEMALE
1090827 209
1089045 25434
1089059 25434 1090828 25438

5/28/2007 CopyBook Creation 75


The Home Depot, Inc.
3.4 Generate Copybook

Final step is to “Generate” the


record.

This action is done in the


“COPYBOOK” entity. You may
use the “GOTO” command to
get to that entity.

Once you have generated your


copybook, it may be used in
COBOL compiles initiated in
Endevor. However, if you have
any element that is not in
APPRV (approved) status, it
can not be checked in.

TOC

5/28/2007 CopyBook Creation 76


The Home Depot, Inc.
Enter “G” on the command line
to begin the process and then
press <ENTER>.

5/28/2007 CopyBook Creation 77


The Home Depot, Inc.
Slide illustrates PDS location
where copybook member is
saved. The group will be
“BMPX” if you are using the
production version of ARz/OS.
This presentation was
constructed using the test
version.

5/28/2007 CopyBook Creation 78


The Home Depot, Inc.
Review how the copybook
looks. Again, you should have
an idea of which fields should
be present and their associated
attributes. If you see one or
more errors, use <F3> to
cancel operation and then make
corrections before reattempting
the generate.

If satisfied with the output, enter


the “GO” command and press
<ENTER>.

5/28/2007 CopyBook Creation 79


The Home Depot, Inc.
Operation submits a job. Note
the job name and number and
go to SDSF to check the
results.

5/28/2007 CopyBook Creation 80


The Home Depot, Inc.
The operation was successful
as indicated by the condition
codes.

5/28/2007 CopyBook Creation 81


The Home Depot, Inc.
The next few slides will illustrate
examining the copybook, its
record and finally the elements.

First, the “JUMP RECORD”


command will be used to get to
the “RECORD” entity.

5/28/2007 CopyBook Creation 82


The Home Depot, Inc.
Next, the “JUMP ELEMENT”
command is used.

5/28/2007 CopyBook Creation 83


The Home Depot, Inc.
“VM” command is used to toggle
to vertical mode.

5/28/2007 CopyBook Creation 84


The Home Depot, Inc.
Only the elementary elements
are displayed. If you scroll right
far enough, you will see other
attributes such as data type and
length.

5/28/2007 CopyBook Creation 85


The Home Depot, Inc.
3.5 Check-In Copybook

In order for your new copybook


to be migrated, you will need to
check it in. This process will add
it as a new element having a
type of CPY to Endevor.

It is very important that all of your


elements are in the “APPRV”
status; otherwise, the check-in
process will fail. The next three
slides illustrate if one or more
fields are not in “APPRV” status.

Use the command “CI” to initiate


this process.

TOC

5/28/2007 CopyBook Creation 86


The Home Depot, Inc.
When you view your job output in
SDSF and select the first file
(JESMSGLG), the condition
code (CC) will equal 0012.

If you view the last (SYSER01),


you will see the field(s) having an
incorrect status. You must get
these elements approved before
executing the check-in process
again.

Note, the ST option for SDSF


was chosen. If you use the held
output option (H), the last two
output files to the left will be in
separate listings.

5/28/2007 CopyBook Creation 87


The Home Depot, Inc.
Output file illustrates the field(s)
that are not approved as well as
their status and version.

5/28/2007 CopyBook Creation 88


The Home Depot, Inc.
To see the error information to the
left:
1. Log onto Development CICS
(C02TA09)
2. Use transaction code AAD1
3. Fastpath to dialog ALOGLST
4. Enter your TSO ID in USER
ID field and press <ENTER>.
5. Put an “S” in the SELECT
column of the 1st row and
press <PF9>.

The relevant information will be


found in the SDSF job output as
noted on the prior slide.

5/28/2007 CopyBook Creation 89


The Home Depot, Inc.
After the “CI” command is
issued, this is the next panel
the user will see.

Slide illustrates the attributes


to be used when adding the
element to Endevor as well as
the job card information for
the job.

The “COMMENT” comes from


the “DESCRIPTION” when the
copybook was added.

Press <ENTER> to continue.

5/28/2007 CopyBook Creation 90


The Home Depot, Inc.
Operation submits a job. Note
the job name and number and
go to SDSF to check the
results.

5/28/2007 CopyBook Creation 91


The Home Depot, Inc.
The operation was successful
as indicated by the condition
codes.

5/28/2007 CopyBook Creation 92


The Home Depot, Inc.
This is the PDS used by the
compile process confirming
success.

Again note, “AD” in the PDS


name as the test system was
used.

5/28/2007 CopyBook Creation 93


The Home Depot, Inc.
Element detail is illustrated in
Endevor.

5/28/2007 CopyBook Creation 94


The Home Depot, Inc.
3.6 Check-Out Copybook

Once an element has been


migrated beyond “AD” or
“AT”, it can be checked out
using the command “CO”.
Because the listed copybook
is at “ST”, it will be checked
out from that LCP to “AD”.

TOC

5/28/2007 CopyBook Creation 95


The Home Depot, Inc.
Element detail is illustrated in
Endevor.

5/28/2007 CopyBook Creation 96


The Home Depot, Inc.
Operation submits a job. Note
the job name and number and
go to SDSF to check the
results.

5/28/2007 CopyBook Creation 97


The Home Depot, Inc.
The operation was successful as
indicated by the condition codes.
.

5/28/2007 CopyBook Creation 98


The Home Depot, Inc.
Now there are two versions in
ARz/OS.

5/28/2007 CopyBook Creation 99


The Home Depot, Inc.
… and there are two versions
in Endevor.

5/28/2007 CopyBook Creation 100


The Home Depot, Inc.
3.7 Defining Special Clauses

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

5/28/2007 CopyBook Creation 101


The Home Depot, Inc.
OCCURS / DEPENDING
BROWSE CPRTA.SH.BMPX.AD.COPYSHR(AADA0201) Line 00000081 Col 001 080
Command ===> Scroll ===> CSR
05 AADA0201-DFLT-MAX-BU-CNT PIC S9(04) COMP
05 AADA0201-DFLT-BUS-UNT OCCURS 00050 TIMES
INDEXED BY AADA0201-BU-TYP-CD-IDX.

BROWSE CPRSS.SH.BMPX.CPYSRC(AADF0031) Line 00000008 Col 001 080


Command ===> Scroll ===> CSR
05 AADF0031-CAN-STEP-ARRAY OCCURS 1 TO 1300 TIMES DEPENDING
ON AADF0031-CAN-STEP-IDX-NBR.
10 AADF0031-CAN-STEP-NBR PIC S9(4) COMP.
10 AADF0031-CAN-STEP-ACTN-CD PIC X(1).

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).

5/28/2007 CopyBook Creation 102


The Home Depot, Inc.
Use the <F11> key to scroll
right and overtype the zero in
the “OCC 1” column to the
number of occurrences you
desire, 50 in our example
(see next slide).

If the number of occurrences


also varies, overtype the zero
in the “OCC 2” column to the
max number of occurrences
you desire, 1300 in the
second example on the prior
page.

5/28/2007 CopyBook Creation 103


The Home Depot, Inc.
Note the other columns:
OCC2 Max number of
occurrences

FNC Function defined


on field

VAL “88” levels


defined on field

5/28/2007 CopyBook Creation 104


The Home Depot, Inc.
ASCENDING KEY / DESCENDING KEY
BROWSE CPRSS.SH.BMPX.CPYSRC(AADD0101) CHARS 'ASCEND' found
Command ===> Scroll ===> CSR
05 AADD0101-BP-SOBJ-ATTR.
10 AADD0101-BP-SOBJ-ATTR-TBL OCCURS 50 TIMES ASCENDING
KEY IS AADD0101-SOBJ-ATTR-ID INDEXED BY
AADD0101-SOBJ-ATTR-INDX.
15 AADD0101-SOBJ-ATTR-ID PIC X(24).
15 AADD0101-DATA-TYP-IND PIC X(9).
15 AADD0101-ATTR-VAL PIC X(30).

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”.

5/28/2007 CopyBook Creation 105


The Home Depot, Inc.
Select the field that has the
clause (AADD0101-BP-SOBJ-
ATTR-TBL on the prior
page )and then position cursor
on the toolbar option “DETAIL”
and then press < ENTER>.

Arrow down to “FUNCTION”


and press <ENTER> again and
finally choose the “KEY”
function and press <ENTER>
one final time.

Note, one field may have more


than one function. This one has
two.

5/28/2007 CopyBook Creation 106


The Home Depot, Inc.
The target name field should
be the field in the clause
“ASCENDING KEY”.

Do not include the record


prefix.

5/28/2007 CopyBook Creation 107


The Home Depot, Inc.
INDEXED BY
BROWSE CPRTA.SH.BMPX.AD.COPYSHR(AADA0201) Line 00000081 Col 001 080
Command ===> Scroll ===> CSR
05 AADA0201-DFLT-MAX-BU-CNT PIC S9(04) COMP
05 AADA0201-DFLT-BUS-UNT OCCURS 00050 TIMES
INDEXED BY AADA0201-BU-TYP-CD-IDX.

The “INDEXED BY ” clause is defined as the “INDEX BY” function.

5/28/2007 CopyBook Creation 108


The Home Depot, Inc.
Select the field that has the
clause (AADD0101-DFLT-
BUS-UNT on the prior
page ) and then position
cursor on the toolbar option
“DETAIL” and then press <
ENTER>.

Arrow down to “FUNCTION”


and press <ENTER> again
and finally choose the
“INDEX BY” function and
press <ENTER> one final
time.

5/28/2007 CopyBook Creation 109


The Home Depot, Inc.
The target name field should be
the field in the clause
“INDEXED BY”.

Do not include the record prefix.

5/28/2007 CopyBook Creation 110


The Home Depot, Inc.
REDEFINES
BROWSE CPRSS.SH.BMPX.CPYSRC(AADA0201) CHARS 'REDEFINES' found
Command ===> Scroll ===> CSR
05 AADA0201-PFKEY-AREA PIC X(228).
05 AADA0201-PFKEY-AREA-REDF REDEFINES
AADA0201-PFKEY-AREA OCCURS 12 TIMES INDEXED BY
AADA0201-PFKEY-AREA-IDX.
10 AADA0201-PFKEY-ASSG-CD PIC X(08).
10 AADA0201-PFKEY-SCRN-DESC PIC X(10).
10 AADA0201-DSPL-PFKEY-FLG PIC X(01).
88 AADA0201-DSPL-PFKEY-ON VALUE 'Y'.
88 AADA0201-DSPL-PFKEY-OFF VALUE 'N'.

The “REDEFINES” clause is defined as the “REDEFINE” function.

5/28/2007 CopyBook Creation 111


The Home Depot, Inc.
Select the field that has the
clause (AADDA0201-PFKEY-
AREA-REDF on the prior page
) and then position cursor on
the toolbar option “DETAIL”
and then press < ENTER>.

Arrow down to “FUNCTION”


and press <ENTER> again and
finally choose the choose the
“REDEFINE” function and
press <ENTER> one final time.

5/28/2007 CopyBook Creation 112


The Home Depot, Inc.
The target name field should
be the field being redefined.

Do not include the record


prefix.

5/28/2007 CopyBook Creation 113


The Home Depot, Inc.
VALUE
BROWSE CPRSS.SH.BMPX.CPYSRC(AADA0201) Line 00000141 Col 001 080
Command ===> Scroll ===> CSR
05 AADA0201-ACCS-PRTCL-IND PIC X(08) VALUE 'HTTP'.
88 AADA0201-ACCS-PRTCL-BMS VALUE 'BMS'.
88 AADA0201-ACCS-PRTCL-HTTP VALUE 'HTTP'.
88 AADA0201-ACCS-PRTCL-CICS VALUE 'CICS'.

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.

5/28/2007 CopyBook Creation 114


The Home Depot, Inc.
Select the field that has the clause
(AADA0201-ACCS-PRTCL-IND
on the prior page ) and then
position cursor on the toolbar
option “DETAIL” and then press
< ENTER>.

Select the first option,


VIEWEDIT, and press
<ENTER>.

5/28/2007 CopyBook Creation 115


The Home Depot, Inc.
Scroll forward until you see
“INITIAL VALUE” as
indicated to the left. Type in
the initial value using single
quotes if the field is not
numeric.

5/28/2007 CopyBook Creation 116


The Home Depot, Inc.
88 Levels

BROWSE CPRSS.SH.BMPX.CPYSRC(AADA0201) Line 00000011 Col 001 080


Command ===> Scroll ===> CSR
05 AADA0201-API-RTN-CD PIC S9(4) COMP.
88 AADA0201-RTN-CD-OK VALUE 0.
88 AADA0201-RTN-CD-WRN VALUE 1.
88 AADA0201-RTN-CD-FA VALUE -1.

“88” levels are defined as the “LEVEL-88” function.

5/28/2007 CopyBook Creation 117


The Home Depot, Inc.
Select the field that has the
clause and then position
cursor on the toolbar option
“DETAIL” and then press <
ENTER>.

Arrow down to “FUNCTION”


and press <ENTER> again
and finally choose the desired
function again by highlighting
the desired function and
pressing <ENTER> one final
time.

5/28/2007 CopyBook Creation 118


The Home Depot, Inc.
Type the “88” level in the
“VALUE NAME” column and
the value(s) in the “VALUE”
column.

You may enter a “?” in the


“VALUE NAME” column and
press <ENTER> to select
from a list.

If your “88” level is not


defined, use a status of “AD”
and a version of “0”.

“88” levels are stored in the


“VALUE” dialog type. You can
examine that entity if need be.

5/28/2007 CopyBook Creation 119


The Home Depot, Inc.
FILLER
BROWSE CPRSS.SH.BMPX.CPYSRC(AADR3021) Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
******************************** Top of Data **********************************
******************************************************************
* COPYBOOK FOR STANDARD REPORT HEADERS *
******************************************************************
01 AADR3021-RFM-STD-RPT-HDR.
05 AADR3021-RFM-HDR-LINE-1.
10 FILLER PIC X(01).
10 AADR3021-RFM-HDR-RPT-ID PIC X(08).
10 FILLER PIC X(42).
10 AADR3021-RFM-HDR-CO-NM PIC X(30).
10 FILLER PIC X(35).
10 AADR3021-RFM-PG-LIT PIC X(06)
VALUE 'PAGE: '.
10 AADR3021-RFM-PG-NBR PIC ZZ,ZZZ,ZZ9.

Each FILLER is handled by selecting the field and then using the DETAIL option of VIEWEDIT
to provide the length.

5/28/2007 CopyBook Creation 120


The Home Depot, Inc.
FILLER field is selected and
DETAIL option of VIEWEDIT
is chosen.

5/28/2007 CopyBook Creation 121


The Home Depot, Inc.
The length for the first FILLER
is 1. Enter that value in the
“MAXIMUM LENGTH” field.
Continue for the remaining
fields having FILLER.

5/28/2007 CopyBook Creation 122


The Home Depot, Inc.
Instead of using the toolbar
options to invoke the “DETAIL”
options, there are commands
you may use.

The screen to the left, pulled


down with the “SYSTEM”
toolbar option and then
“COMMANDS” option illustrates
your choices. For example, 88
levels use command “LEVEL-
88”. Remember you can
customize these commands.

5/28/2007 CopyBook Creation 123


The Home Depot, Inc.
3.8 Special Topics

This section will discuss methods for handling the following type of special cases:

• Multiple Records in a Copybook


• Reuse Existing Group Element

TOC

5/28/2007 CopyBook Creation 124


The Home Depot, Inc.
Multiple Records in a Copybook

• Normally one copybook contains a single record.

• However, it is possible to have multiple records in a single copybook.

• You create the copybook and records in the same manner.

• The connection is made in the COPY REC relationship.

• 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.

5/28/2007 CopyBook Creation 125


The Home Depot, Inc.
After creating the COPYBOOK
and each of the 3 RECORDs, a
“GOTO COPY REC” was done
for the first of three records.

For “COPY INFORMATION”, the


copybook name, status, and
version are entered. The name
will be the same for all records.

For RECORD/GROUP
INFORMATION, the record
name, status and version are
entered.

Under DETAIL PARAMETERS,


the sequence number (1,2,3) is
specified.

Repeat process for other 2


records.

5/28/2007 CopyBook Creation 126


The Home Depot, Inc.
Slide illustrates the effect of
jumping from COPYBOOK
(AADA9991) to RECORD after
entering the COPY REC info
for each of the 3 records.

Next two slides illustrate the


generated copybook.

5/28/2007 CopyBook Creation 127


The Home Depot, Inc.
BROWSE CADTA.SH.BMPX.AD.COPYSHR(AADA9991) Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
******************************** Top of Data **********************************
******************************************************************
* NAME: AADA9991
* STATUS: AD
* VERSION: 0
* SYNTAX GENERATED ON 05/15/2007 AT 13:08:39
* GENERATED BY: ADRVD
******************************************************************
* GENERATION FLAGS: VALUE-CLAUSE=Y LEVEL-88=Y

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
*****************************************************************
******************************************************************

5/28/2007 CopyBook Creation 128


The Home Depot, Inc.
01 AADA9991-RFM-DATA-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-DATA-FLD-TXT PIC X(1198).
************************************************************
* NAME: RFM_END_BLK
* STATUS: AD
* VERSION: 0
* SYNTAX GENERATED ON 05/15/2007 AT 13:08:40
* 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 AADA9991-SORT-FLD-TXT OF AADA9991-RFM-DATA-BLK > SPACES

5/28/2007 CopyBook Creation 129


The Home Depot, Inc.
Reusing Existing Group Element

• A group element consists of one or more elementary fields.

• 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.

5/28/2007 CopyBook Creation 130


The Home Depot, Inc.
QuickRec layout prior to any
changes.

5/28/2007 CopyBook Creation 131


The Home Depot, Inc.
First change was to DEFAULT
STATUS to APPRV. Most fields
will be elementary instead of
group and this saves time when
entering new non-group fields.

First field was overtyped with


new group, REX_SORT_KEY,
and status and version
specified.

A new line is to be inserted after


the new group field.

5/28/2007 CopyBook Creation 132


The Home Depot, Inc.
Inserted line was used to
specify 1st field of sort key, the
field that was overtyped with the
new group. The question mark
after the field, RPT_ID?, is
required to make the connection
to pull in the element’s info.
Status and version are also
specified.

5/28/2007 CopyBook Creation 133


The Home Depot, Inc.
Change the level (LVL) of the
two remaining fields of the sort
key.

After pressing <ENTER> make


sure you use the toolbar option
PROCESS to apply your
changes before exiting (F3).

5/28/2007 CopyBook Creation 134


The Home Depot, Inc.
The QuickRec facility was
invoked for the second record.

The first field was overtyped


with the new group name
including the question mark,
REX_SORT_KEY?. The status
and version were also typed.

The next two fields will be


deleted.

5/28/2007 CopyBook Creation 135


The Home Depot, Inc.
You are done or the second
record! Note, the three fields of
the group item have been pulled
in.

Again, use the toolbar option


PROCESS.

Repeat this process for the third


record.

5/28/2007 CopyBook Creation 136


The Home Depot, Inc.
BROWSE CADTA.SH.BMPX.AD.COPYSHR(AADA9991) Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data *********************************
******************************************************************
* NAME: AADA9991
* STATUS: AD
* VERSION: 0
* SYNTAX GENERATED ON 05/15/2007 AT 15:09:53
* GENERATED BY: ADRVD
******************************************************************
* GENERATION FLAGS: VALUE-CLAUSE=Y LEVEL-88=Y

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.

5/28/2007 CopyBook Creation 137


The Home Depot, Inc.
4. Creating DBDT Copybooks

• DBDT copybooks represent DB2 tables.

• Copybooks are created by Database Administrators using ARz/OS while in the “ TABLE” type.

• The “CIDB” command is used to kick off the process.

• Before this command may be used, following attributes must exist:


– “RECORD PREFIX”
– “DESCRIPTION”

• “RECORD PREFIX” can not be updated on the screen while “DESCRIPTION” may be.

• “RECORD PREFIX” will be DBDTnnn1 where:


– DBDT is a constant
– nnn represents short table ID and comes from the tablespace name.
– 1 is a constant

TOC

5/28/2007 CopyBook Creation 138


The Home Depot, Inc.
• An ARZOS table will store the “RECORD PREFIX”:

SELECT ENT_ID, SUBSTR(TB_NAME,1,18) , STATUS, VERSION, RECORD_PREFIX


, SUBSTR(QUAL_TABLE_NAME,1,45)
FROM AD6IS.DBX_DB2_TABLES --
WHERE TB_NAME = 'JOB_DRVR_PARM'
WITH UR

ENT RECORD
ID COL1 STATUS VERSION PREFIX COL2
----------- ------------------ -------- ------- --------------- --------
958879 JOB_DRVR_PARM AT 0 DBDTA441 NP1.AD1T

• Notice how it ties to the tablespace name:

SELECT CREATOR, NAME, TSNAME FROM SYSIBM.SYSTABLES


WHERE
CREATOR = 'AD1TI'
AND NAME = 'JOB_DRVR_PARM'
WITH UR

CREATOR NAME TSNAME


-------- ------------------ --------
AD1TI JOB_DRVR_PARM AD1TIA44

5/28/2007 CopyBook Creation 139


The Home Depot, Inc.
• The “CIDB” command:
– Submits a batch job. You should check that each step is successful in SDSF.
– May be used only when the table’s STATUS is AD or AT.

• Upon successful completion:


– A new “COPYBOOK” entity will exist in ARz/OS (DBDTnnn1).
– A new PDS member will exist.
– A new Endevor element will exist.

• 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.

5/28/2007 CopyBook Creation 140


The Home Depot, Inc.
• For a STATUS of “AD”, the Endevor attributes are as follows:

ENDEVOR Location:
ENVIRONMENT.. DEVL
SYSTEM....... TA
SUBSYSTEM.... DB
ELEMENT...... DBDTnnn1
TYPE......... DBCPY

• For a STATUS of “AT”, the Endevor attributes are as follows:

ENDEVOR Location:
ENVIRONMENT.. ARCH
SYSTEM....... TA
SUBSYSTEM.... DB
ELEMENT...... DBDTnnn1
TYPE......... DBCPY

5/28/2007 CopyBook Creation 141


The Home Depot, Inc.
Invoke the “DBA” dialog and
the “TABLE” type.

5/28/2007 CopyBook Creation 142


The Home Depot, Inc.
Start by using the “VLE”
command to list the table you
wish to create the DBDT
copybook for.

5/28/2007 CopyBook Creation 143


The Home Depot, Inc.
Switch view mode to vertical
mode from horizontal.

5/28/2007 CopyBook Creation 144


The Home Depot, Inc.
You might wish to do a cross
reference before proceeding.

5/28/2007 CopyBook Creation 145


The Home Depot, Inc.
Cross reference display is
depicted. Screen size was
switched to MAX.

5/28/2007 CopyBook Creation 146


The Home Depot, Inc.
Update the “DESCRIPTION” if
not present using the “EU” (Edit
Update) command).

You will have to scroll forward to


see this attribute.

If omitted, the “CIDB” command


will fail. Pressing <F1> will
provide a descriptive error
message.

5/28/2007 CopyBook Creation 147


The Home Depot, Inc.
The “CIDB” command which
stands for “Check-In DataBase”
initiates the process to create
the DBDT record.

5/28/2007 CopyBook Creation 148


The Home Depot, Inc.
Slide illustrates PDS location
where copybook member is
temporarily saved. The group
will be “BMPX” if you are using
the production version of
ARz/OS. This presentation was
constructed using the test
version.

As this process continues and


adds the element to Endevor,
the PDS will be:

Test
CADSS.SH.BMPX.AD.CPYSRC
Prod
CADSS.SH.BMPX.CPYSRC

5/28/2007 CopyBook Creation 149


The Home Depot, Inc.
Review how the DBDT structure
looks. Again, you should have
an idea of which table columns
should be present and their
associated attributes. If you see
one or more errors, use <F3>
to cancel operation and then
make corrections before
reattempting the operation.

5/28/2007 CopyBook Creation 150


The Home Depot, Inc.
If satisfied with the output, enter
the “GO” command and press
<ENTER>.

5/28/2007 CopyBook Creation 151


The Home Depot, Inc.
If the structure has one or
more elements not in
approved status (APPRV),
you will see a panel showing
the fields and their status and
version.

Note, this is from a different


table containing columns not
representing elements in the
“APPRV” status.

5/28/2007 CopyBook Creation 152


The Home Depot, Inc.
Operation submits a job. Note
the job name and number and
go to SDSF to check the
results.

5/28/2007 CopyBook Creation 153


The Home Depot, Inc.
The operation was successful
as indicated by the condition
codes.

5/28/2007 CopyBook Creation 154


The Home Depot, Inc.
You may browse the copybook
from the COPYBOOK entity.

5/28/2007 CopyBook Creation 155


The Home Depot, Inc.
DBDT copybook depicted in
the PDS used for compiles.
Again note, in production,
“AD” will not be in the dataset
name.

5/28/2007 CopyBook Creation 156


The Home Depot, Inc.
DBDT copybook depicted in
Endevor illustrating type,
environment, system and
subsystem.

5/28/2007 CopyBook Creation 157


The Home Depot, Inc.
Copybook master information is
displayed in Endevor.

5/28/2007 CopyBook Creation 158


The Home Depot, Inc.
5. Creating Non-Generated Copybooks

• These type of copybooks are created in Endevor preferably using the QuickEdit facility.

• They first must be registered in ARz/OS by adding to the COPYBOOK entity.

• They represent either BMS symbolic maps or Vendor supplied copybooks.

• If the copybook is a BMS symbolic map, then the correct name should be used and the BMS map

should exist.

• The name should be:


– ssDSnnn1
• ss 2 character subsystem code
• DS constant
• nnn three digit number
• 1 constant

• The BMS map that should exist will have a name the same as the symbolic map except minus
the third character “D”.
TOC

5/28/2007 CopyBook Creation 159


The Home Depot, Inc.
• For example, if the symbolic map is ‘TIDS3101”, the BMS map will be “TIS3101” and also:

– be the member name in the source library C<LCP><SYS>SH.BMPX.CMPLSRC(TIS3101)

– value of the DFHMSD macro in the source code:

TIS3101 DFHMSD TYPE=&SYSPARM, X


LANG=COBOL, X
MODE=INOUT, X
TERM=3270-2, X
CTRL=FREEKB, X
DATA=FIELD, X
CURSLOC=YES, X
STORAGE=AUTO, X

5/28/2007 CopyBook Creation 160


The Home Depot, Inc.
• The exception is if the copybook represents a BMS symbolic map and its BMS map
is already defined in Endevor. That means the naming conventions have been
followed as outlined on the previous slide. Then when the copybook is added to
Endevor, it is automatically approved.

• 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.

5/28/2007 CopyBook Creation 161


The Home Depot, Inc.
--------------------- BEFORE
--------------- -------------- AFTER ---------------
AR/zos Endevor AR/zos
BMS Type In Non-Genr ARz/OS Job Non-Genr
in Endevor ARz/OS ? Approved Flag Dataset Name Max CC Approved Flag

No No N/A COPYSHR 12 N

Yes No N/A CPYSRC 0 Y

No Yes Y CPYSRC 0 Y

N/A No N/A COPYSHR 12 N

N/A 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.

5/28/2007 CopyBook Creation 162


The Home Depot, Inc.
If your non-generated copybook
is a BMS symbolic map, verify
that the BMS exists in Endevor
first. That way, as long as the
proper naming conventions are
followed, your copybook will
automatically be approved when
it is added to ARz/OS.

5/28/2007 CopyBook Creation 163


The Home Depot, Inc.
Register the copybook in
ARz/OS by entering the
information as depicted to the
left.

The “DESCRIPTION” and


“PROGRAMMING LANGUAGE”
attributes are required.

You will not be able to set the


“ENDEVOR ELEMENT TYPE”.
When you create the copybook
in Endevor, this field will be
updated to “NGCPY” from
“CPY”.

5/28/2007 CopyBook Creation 164


The Home Depot, Inc.
Use the “CR” command and
complete the Endevor location
attributes as indicated to the
left. You will also want to
specify a CCID and a
comment.

5/28/2007 CopyBook Creation 165


The Home Depot, Inc.
If the copybook has not been
registered in AR/zOS, you can
not create it in Endevor.

5/28/2007 CopyBook Creation 166


The Home Depot, Inc.
Rather than type your BMS
symbolic map from scratch,
either copy in an architecture
shell member or another from
your system and subsystem.

The example illustrates an


architecture shell member.

5/28/2007 CopyBook Creation 167


The Home Depot, Inc.
The member after being
copied in.

5/28/2007 CopyBook Creation 168


The Home Depot, Inc.
To change the field prefix, use
the “CHANGE ALL”
command.

5/28/2007 CopyBook Creation 169


The Home Depot, Inc.
Command is used again.

5/28/2007 CopyBook Creation 170


The Home Depot, Inc.
Generally, the lines you will
be modifying are between the
header and the footer or the
“SCRN-INPUT”.

5/28/2007 CopyBook Creation 171


The Home Depot, Inc.
When you exit from making
changes, a batch job will be
submitted to add your element
to Endevor.

5/28/2007 CopyBook Creation 172


The Home Depot, Inc.
Output in SDSF indicates a
successful operation.

5/28/2007 CopyBook Creation 173


The Home Depot, Inc.
Because the BMS map existed
in Endevor prior to creating the
symbolic map, the process was
able to approve the copybook.

5/28/2007 CopyBook Creation 174


The Home Depot, Inc.
Copybook can be browsed in
ARz/OS.

5/28/2007 CopyBook Creation 175


The Home Depot, Inc.
Endevor master detail is
displayed.

5/28/2007 CopyBook Creation 176


The Home Depot, Inc.

Vous aimerez peut-être aussi