Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Naming Conventions
Copybooks
P-Steps
S-Steps
Flow files
and more
Why Standards?
Why Standards??
Training
To define expected quality of code to programmers.
Maintainability
To reduce the effort in modifying or enhancing the
system.
Readability
To create code that is quickly and easily understood
allowing for a better understanding of the system.
: <domain>
**
**
**
**
***************************************************************************************************
** RELEASE DESCRIPTION
**
**
**
** 6.2
6/28/01 - CTS - Modified program to update handle new process.
**
***************************************************************************************************
Identification Division
This section describes:
Copyright Information
Program-ID
Author
Date-Written
Source-Computer
Object-Computer
Date-Compiled
Installation
Security
Special-Names
Remarks
Program ID
PROGRAM-ID. prog-id.
Other Parameters Shown in overview not Permitted
Data Division
This section describes:
General Rules and Organization - Data Division
Level Numbers
Picture Clauses
Value Clauses
Field Definitions
Example
01 WS-SWITCHES-AND-INDICATORS.
05 WS-CVG-UWGDECN-CHG-IND
88 WS-CVG-UWGDECN-CHG-YES
88 WS-CVG-UWGDECN-CHG-NO
01 WS-COUNTERS.
05 WS-CTR-FILE1
05 WS-CTR-FILE2
05 WS-CTR-RPT-LINES
PIC X(01).
VALUE 'Y'.
VALUE 'N'.
Level Numbers
This section describes:
Level 01 through 49
Level 66
Level 88
PICture Class
Standard
The PIC abbreviation must be used.
All PIC clauses within an 01 level data grouping, must be aligned on the same
column.
PIC clauses are not permitted at the data group level. Their use is limited to
elementary data definitions.
The format of the data length is at least two digits surrounded by brackets for all
integers, except for output edit fields.
Example
01 WS-DATA.
05 WS-DATA-ITEM1
05 WS-DATA-ITEM2.
10 WS-DATA-ITEM2A
10 WS-DATA-ITEM2B
PIC X(01).
PIC S9(03)V9(02) COMP-3.
01 WS-REPORT-TOTAL-LINE.
05 FILLER
05 WS-REPORT-TOTAL-AMT
PIC X(20).
PIC ZZZ,ZZ9.99.
PIC S9(05)
COMP-3.
Values that control loop processing, table searches, and other values that do not vary must be
defined in the working storage rather than hard-coded in the procedural code.
Example
01 WS-CONTROL-FIELDS.
05 WS-MAX-LINES
PIC S9(08) COMP
VALUE +56.
05 WS-MAX-OPTIONS
PIC S9(08) COMP
VALUE +122.
The following figurative constants must be used rather than their corresponding hard-coded literal
strings:
ZERO
HIGH-VALUES
ZEROES
LOW-VALUES
SPACE
QUOTES
SPACES
Example
05 WS-FIELD-X PIC X(05)
VALUE SPACES.
05 WS-FIELD-9 PIC S9(05) COMP-3 VALUE ZEROES.
Values Clauses
Standard
All VALUE keywords within an 01 level data grouping must be aligned on the same column.
The continuation feature (hyphen in column seven) must not be used. If the entire literal does not
fit on the line, it must be placed on the next line, starting under the data element name.
Alternatively, the literal can be broken into several lines.
The VALUE clause must be used to initialize data fields that will not be altered during the
execution of the program.
The use of the VALUE clause is not permitted for those data fields whose values are altered during
program execution. They must be initialized in the procedural code.
Example
01 VALUE-EXAMPLE.
05 VALUE-LEVEL-05A
PIC X(05) VALUE SPACES.
05 VALUE-LEVEL-05B.
10 VALUE-LEVEL-10A PIC X(07) VALUE 'OPTION '.
10 VALUE-LEVEL-10B PIC X(08) VALUE 'NUMBER 1'.
Procedure Division
Copybook Definition
What to Code in Copybooks?
SELECT statements.
FD statements.
Record definitions.
Utility routines that are not contained in separate programs and that can be used by other
programs.
Formatting and Updating Copybooks
All copybooks must consist of the following elements:
Banner of asterisks marking the start of the copybook
The keyword MEMBER followed by the copybook name
The keyword REMARKS followed by a description of the copy member; if the description requires more than
one line, subsequent lines must be indented and aligned for processing copybooks only, the domain with
which the copybook is associated .
Continued..
A change box containing:
change number in columns one through six
date
release
brief description of change or reason for addition
The COBOL code, either data or procedural
A banner of asterisks marking the end of the copybook
When modifying a copybook, the change box must be updated.
Example
********************************************************************************
** MEMBER : copyname
**
** REMARKS: DESCRIPTION OF COPYBOOK LINE 1
**
**
DESCRIPTION OF COPYBOOK LINE 2, ETC
**
**
**
** DOMAIN : XX
**
********************************************************************************
** RELEASE DESCRIPTION
**
**
**
Chg no ** 6.2
COPYBOOK CREATED FOR STANDARDS
**
*********************************************************************************
01 xxxx-POLICY-DATA-REC.
05 xxxx-POL-NO
PIC X(10).
.
.
05 xxxx-LAST-FIELD
PIC X(02).
********************************************************************************
**
END OF COPYBOOK copyname
**
********************************************************************************
P-Steps
Components
Com
p.
Po
s.
Description
Valid Values/Value
Descriptions
aa
1-2
Unique identifier
BF
bbbb
3-6
Business Function
Identifier
Separator
Dash
Type identifier
P-Step
Extension separator
Period
10
File extension
P-Step
Business Function
S-Steps
Each S-Step file represents an interaction with a user. S-Step files contain the
individual field definitions and attributes that are used by the client architecture
when communicating with the user interface.
Standard
S- Step file names must be matched to their corresponding HTML page name.
S-Step file names must have the following format and components.
Format
aabbbb-c.d
Example
BF0050-I.s
Input S-Step definition for the Application Control Retrieve (Inquiry) Business
Function
BF0050-O.s
Output S-Step definition for the Application Control Retrieve (Inquiry) Business
Function
ApplicationAnalysis.s
S-Step definition for Application Analysis
Components
Com
p.
Po
s.
Description
Valid Values/Value
Descriptions
aa
1-2
Unique identifier
BF
bbbb
3-6
Business Function
Identifier
Separator
Dash
Type identifier
I
O
Input page
Output page
Extension separator
Period
10
File extension
S-Step
Business Function
HTML Pages
HTML files contain the layout and field definitions for the individual HTML page
that is sent to the users web browser.
Standard
HTML file names must be matched to their corresponding S-Step file name.
HTML file names must have the following format and components
Format
aabbbb-c.ddd
or
eeeeeeeeeeeeeeeeeeee.fff
Example
BF0050-I.htm
Input HTML page for the Application Control Retrieve (Inquiry) business function
BF0050-O.htm
Output HTML page for the Application Control Retrieve (Inquiry) business
function
ApplicationAnalysis.htm
HTML page used by Application Analysis
Components
Comp.
Pos.
Description
aa
1-2
Unique identifier
BF
bbbb
3-6
Separator
Dash
Type identifier
I
O
Input page
Output page
Extension separator
Period
ddd
10-12
File extension
htm
HTML page
Business Function
OR
Comp.
Pos.
Description
varies
xxxxx
varies
Extension separator
Period
fff
varies
File extension
htm
HTML page
Example
BF0050Retrieve.f
Application Control Retrieve (Inquiry) Process Flow
VulIndivSearch.f
VUL Application Entry Individual Search Process Flow
Comp.
Pos.
Description
eeeeeeee
eeeeeee
1-15
xxxxx
varies
Extension separator
Period
varies
File extension
Flow file
Co
mp.
P
o
s.
Description
aa
12
Unique
identifier
BF
bbb
b
36
Business
Function
Identifier
cccc
cccc
c
81
5
Business
Function Type
Business Function
v
ar
ie
s
Extension
separator
Period
v
ar
ie
s
File extension
Flow file
Sub-System
APEX Upload
Present Layer
Administration
Fund
B
C
F
New Business
Seg Fund
N
S
Utilities
Module Type
Copybook
Business Function
Valuation
Batch Parameter
TPI
Batch Job
Batch Procedure
Program
BM Main Program
BU Utility Program
RA Immed Ann Specific
RC Common Ins Worker
RF Function Driver
RH Health Ins Specific
RI Insurance Driver
RQ Seq or VSAM I/O
RR RRIF(CA) Specific
RS Sub-Function Driver
RT Trade Life Specific
RU Utility Program
RV Univ Life Specific
RW ISWL Specific
RY Country Specific
Insert Record
Browse Record
Initialize Table Layout
MIN/MAX Select
Delete Recs (Range)
I/O Buffering
Select Record
Browse All Rows
Update/Delete Record
Browse Prev. Record
Each individual Business Function (also known as BFID) supported by INGENIUM must
be assigned a unique identifier.
The identifier is a four digit numeric value.
Each identifier is defined within the INGENIUM Business Function (BFCN) database
table.
Business Functions that are related should be grouped together.
Business Functions that are related to the maintenance of a specific table should be
grouped together and should contain the following value as the last digit of the identifier.
0 - Retrieve (Inquiry)
1 - Create
2 - Update
3 - Delete
4 - List
EXERCISE
Use the Ingenium coding standards for the following:
Whats this?
1. CCFRPOL
2. CCPP9410
3. BF0050-P.p
4. CSLU1680
Write the Five business process naming conventions to perform the
functions on a Policy table.
THANK YOU