A Checklist for Migrating Big Iron Cobol Applications

Transcription

A Checklist for Migrating Big Iron Cobol Applications
• Cognizant 20-20 Insights
A Checklist for Migrating Big Iron Cobol
Applications
Migrating common business oriented language (Cobol) applications from
HP NonStop Tandem systems to IBM z/OS mainframes requires detailed
analysis of program structuring, variable declaration and keywords and a
methodical conversion approach.
Executive Summary
CIOs facing the rising challenges of higher total
cost of operations (TCO) of HP NonStop Tandem
systems need to find alternatives.1 The bulk of
applications created for these HP systems use
the Cobol programming language. IBM z/OS
mainframes provide an alternative with stability
and reliability similar to the HP NonStop
Tandem systems. However, migrating Cobol
applications written for HP Tandem to IBM
mainframes is fraught with complexity and is
often time-consuming.
This white paper delves into recent versions
of Cobol on both systems and provides a
comprehensive listing of code differences and
similarities. The aim is to provide all the relevant
information CIOs and application developers
need when considering migrating from HP
Tandem to the IBM z/OS mainframe.
The differences and similarities covered include:
•
•
Program organization and format. Identification division.
cognizant 20-20 insights | june 2013
•
•
•
Environment division.
Data division.
Procedure division.
Also included is a case study that offers insights
into compilation issues found when recompiling
an HP Tandem COBOL program on the IBM z/
OS mainframe COBOL Enterprise compiler. The
paper concludes by assessing various conversion
approaches and tools.
Not covered is the use of Screen COBOL
(SCOBOL) language to find differences. The SCOBOL language on HP Tandem is similar to Cobol
and is used to generate graphical user-based
interfaces. In addition, we do not tackle embedded SQL programming.
Program Organization and Format
Figure 1 (on next page) illustrates the difference
between the HP Tandem and IBM Cobol reference
format.
Organization of the Two Reference Formats
Tandem Reference Format
Margin: C A
B
IBM Reference Format
Column: 1 2 3 4 5 6 7 8 9 10 … nx
Area A
Indicator Area
1 2 3 4 5 6 7 8 9 10 11 12 13 … 71 72
Sequence Area
Area A
Area B
Indicator Area
R
x
n<= 132
Area B
Line
Figure 1
The differences can be summarized as shown in
Figure 2.
Identification Division
Identification division must be the first division
in each Cobol source program. It names the program, the date of compilation and other documentary information (see Figure 3, on next page).
Configuration Section
This optional section can be used to describe the
computer environment on which the program is
compiled and executed. Figure 4 (on next page)
compares the paragraph of the configuration
section.
Input-Output Section
Environment Division
Figure 5 (on page 4) compares the paragraph of
the input-output section.
Environment division is optional. It contains
two sections, namely CONFIGURATION and
INPUT-OUTPUT.
The function of the FILE-CONTROL paragraph is
described in detail below.
Summary of Differences in the Two Formats
HP Tandem COBOL
IBM z/OS Enterprise COBOL
Number of columns where code lines are
accepted is 132.
Number of columns where code lines are accepted is 72.
There is no area known as “Sequence Number
Area.”
The first six columns are taken as “Sequence Number Area”
which is used to label a source statement line.
The indicator area begins at column 1. It can be
empty or it can contain a single character that
describes the type of information on the line.
?
Compiler directive
*
Ordinary comment
/
Comment for top of next page
D
Debugging line
d
Debugging line
-
Continuation line
The indicator area begins at column 7. It can be empty or
it can contain a single character that describes the type of
information on the line.
*
Ordinary comment
/
Comment for top of next page
D
Debugging line
d
Debugging line
-
Continuation line
Space Text line
Space Text line
There is no distinction made between Area A
and Area B.
Specific items must begin in Area A.
• Division headers
• Section headers
• Paragraph headers or paragraph names
• Level indicators (FD and SD) or level-numbers (01 and 77)
• DECLARATIVES and END DECLARATIVES
Specific items must begin in Area B.
• Entries, sentences, statements and clauses
• Continuation lines
Figure 2
cognizant 20-20 insights
2
Identification Divisions: Defined and Compared
PARAGRAPH
HP Tandem COBOL
IBM z/OS Enterprise COBOL
PROGRAM-ID
The paragraph specifies the name by which
the program is known and assigns selected
program attributes to that program.
Present.
Provides an optional clause of
RECURSIVE to recursively enter a
program while previous invocation
is still active.
AUTHOR
Name of the author of the program.
Present and similar in both versions.
INSTALLATION
Name of the company or location.
DATE-WRITTEN
Date the program was written.
DATE-COMPILED
Date the program was compiled.
SECURITY
Level of confidentiality of the program.
Figure 3
The Paragraph uses the SELECT clause to connect
an operating system file name to Cobol file name.
The various files possible along with the detailed
clause such as ASSIGN, ORGANIZATION, ACCESS
MODE, RECORD KEY, etc. are described.
The ASSIGN clause associates the name of a
file in a program with the actual external name
of the data file. The #DYNAMIC used in Tandem
COBOL cannot be used in Enterprise COBOL;
instead an alphanumeric literal must be mentioned. During the execution of the program, a
job control language (JCL) assignment by the use
of data dictionary (DD) and data source name
(DSN) commands takes care of assigning the
external name of the file. The PASSWORD clause
is present only in Enterprise COBOL which
controls access to files.
Figure 6 (on page 5) summarizes the File-Entry
clause for both HP Tandem COBOL and IBM z/OS
Enterprise COBOL. As seen, the requirement is
the same in both versions; wherever differences
are present on Enterprise COBOL, they have been
marked with a dark gray background.
The SORT-MERGE file is not mentioned here
as the handling for them is the same in both
versions of Cobol dialect.
Data Division
The Data division is the place where all variables
to be used in the program are defined at various
levels, namely from 01-49, 66, 77 and 88. The
level has similar meaning in both the HP Tandem
COBOL and IBM z/OS Enterprise COBOL.
Configuration Section Paragraphs: Defined and Compared
PARAGRAPH
HP Tandem COBOL
IBM z/OS Enterprise COBOL
SOURCE-COMPUTER
The paragraph describes the
computer on which the source
text is to be compiled.
The syntax is similar in both the versions of Cobol.
OBJECT-COMPUTER
The paragraph specifies the
system for which the object
program is designated.
An additional clause of “CHARACTERSET” is present which enables it to
specify the national character set
defining the ALPHABETIC data class.
The syntax is similar to HP
Tandem COBOL with the
absence of “CHARACTERSET” clause.
SPECIAL-NAMES
The paragraph assigns userdefined names to certain
system-name parameters.
An additional “SYSTEM-NAME”
clause having values of CONSOLE,
MYTERM, CHANNEL-1 through
CHANNEL-2 is available.
“SYSTEM-NAME” clause is
absent.
More options available to aid
in object-oriented program
development.
Figure 4
cognizant 20-20 insights
3
The Data division is optional. It contains four
optional sections on HP Tandem COBOL.
•FILE.
• WORKING-STORAGE.
•EXTENDED-STORAGE.
•LINKAGE.
The EXTENDED-STORAGE section is specific to HP
Tandem COBOL, wherein variables will exceed the
64KB boundary. This section is completely absent
in IBM z/OS Enterprise COBOL which has a section
named LOCAL-STORAGE which is not a replacement of the EXTENDED-STORAGE. Figure 7
(on page 6) describes more of the Cobol sections.
The data-types of NATIVE-2, NATIVE-4 and
NATIVE-8 available on HP Tandem COBOL are not
available on IBM z/OS Enterprise COBOL. These
data types will be replaced by corresponding
signed numeric data types on IBM z/OS Enterprise COBOL. In addition, there are options for
double byte character set (DBCS) type literals
which are specific to IBM z/OS Enterprise COBOL.
Procedure Division
Procedure division is the place where Cobol verbs
and statements carry out the business logic
determined for the program. This section details
the verbs and word names only; a detailed syntax
can be found in the respective COBOL manuals
(mentioned in the reference section).
Declarative Section
Declaratives provide one or more special-purpose
sections that are executed when an exceptional
condition occurs on a program file. Each declarative section starts with a USE statement that
identifies the section's function. The series of
procedures that follow specify the actions that
are to be taken when an exception occurs. Each
declarative section ends with another sectionname followed by a USE statement or with the
keywords END DECLARATIVES.
The USE statement has three formats in which
the EXCEPTION/ERROR and DEBUGGING declaratives are similar in both HP Tandem COBOL and
IBM z/OS Enterprise COBOL. The LABEL declarative is present only in Enterprise COBOL.
Statements
There are many statements present in HP Tandem
COBOL but not on IBM z/OS Enterprise COBOL,
and vice versa. They are divided into imperative
and conditional types.
•
Imperative statements: This either specifies
an unconditional action to be taken by the
Input-Output Section Paragraphs: Defined and Compared
PARAGRAPH
HP Tandem COBOL
FILE-CONTROL
A file-control entry connects an
operating system file name to a
Cobol file name, specifies the file’s
organization and keys and provides
additional information needed for
input and output.
The Paragraph is present in both versions and is described in detail
in the text on pages 2 and 3.
I-O-CONTROL
The optional I-O-CONTROL
paragraph specifies positioning
information for a tape file
or the sharing of a memory
area by more than one file.
The Paragraph is similar in both versions. The one difference is that
Enterprise COBOL contains APPLY WRITE-ONLY Clause.
RECEIVE-CONTROL
The Paragraph is specific to HP
Tandem COBOL by which the interprocess message (IPM) communication known as $RECEIVE is enabled.
The reading of $RECEIVE is not
mandatory for the batch category
of programs whereas it’s mandatory
for the online category of programs
that deal with user interaction.
Figure 5
cognizant 20-20 insights
4
IBM z/OS Enterprise COBOL
The Paragraph is absent as
the $RECEIVE concept is not
available. An alternative to the
online category of programs
is possible by use of customer
information control system
(CICS) calls and IBM’s message
queue (MQ) mechanism.
> SUBTRACT
> UNSTRING
program or is a conditional statement terminated by its explicit scope terminator.
The following statements are available in both
HP Tandem COBOL and Enterprise COBOL:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
ACCEPT
ADD
ALTER
CALL
CANCEL
CLOSE
COMPUTE
CONTINUE
COPY
DELETE
DISPLAY
DIVIDE
ENTER
EVALUATE
EXIT
GOTO
IF
>
>
>
>
>
>
>
>
>
INITIALIZE
INSPECT
MERGE
MOVE
MULTIPLY
OPEN
PERFORM
READ
RELEASE
REPLACE
RETURN
REWRITE
SEARCH
SET
SORT
START
STOP
STRING
> USE
> WRITE
The statements present only on HP Tandem
COBOL are shown in Figure 8 (on page 7).
The statements present only in Enterprise COBOL:
>
>
>
>
>
>
•
ENTRY
EXIT PROGRAM
GOBACK
INVOKE
XML GENERATE
XML PARSE
Conditional statements: The conditional
statement specifies that the truth value of
a condition is to be determined and that the
subsequent action of the object program is
dependent on this truth value.
All the conditional statements present on HP
Tandem COBOL are present on Enterprise
COBOL. The additional ones on Enterprise
COBOL are noted below.
File-Entry Clauses
CLAUSE
SEQUEN- QSAM/
TIAL
VSAM
LINE SELINE SEQUENTIAL QUENTIAL
RELATIVE VSAM
INDEXED
SELECT
Required
Required
Required
Required
ASSIGN
Required
Required
Required
Required
RESERVE
Optional
Optional
Optional
Optional
ORGANIZATION
(Default
SEQUENTIAL)
Optional
Optional - Line
Sequential
Required Relative
Required Indexed
PADDING
CHARACTER
Optional
NA
Not applicable
NA
NA
RECORD
DELIMITER
Optional
NA
NA
NA
ACCESS MODE
Sequential
Sequential
Sequential
Random
Dynamic
Sequential
Random
Dynamic
RECORD KEY
NA
NA
NA
Required
RELATIVE KEY
NA
NA
Optional if access
mode is sequential.
Required for Random and Dynamic
access modes.
NA
ALTERNATE
RECORD KEY
Optional
NA
Optional
Optional
PASSWORD
Optional
NA
Optional
Optional
FILE STATUS
Optional
Optional
Optional
Optional
NA
NA
NA
Note: QSAM = Queue Sequenced Access Method, VSAM = Virtual Sequenced Access Method
Figure 6
cognizant 20-20 insights
5
VSAM
>
>
>
>
>
>
XML GENERATE ... ON EXCEPTION
XML GENERATE ... NOT ON EXCEPTION
XML PARSE ... ON EXCEPTION
XML PARSE ... NOT ON EXCEPTION
INVOKE ... ON EXCEPTION
INVOKE ... NOT ON EXCEPTION
Figurative Constants
Figurative constants are reserved words that
name and refer to specific constant values. The
constants NULL and NULLS are available only
in Enterprise COBOL and not in Tandem COBOL.
All other constants are the same in both versions.
Reserved Words
Common Phrases
A reserved word is a character string with a
predefined meaning in a Cobol source unit. In
addition to the similar keywords, there are some
keywords that are specific to HP Tandem COBOL
and Enterprise COBOL which are mentioned
in Figure 9 (on page 8). It needs to be checked
in programs for conversion planning.
The following phrases common to arithmetic and
data manipulation statements are used similarly
in both HP Tandem COBOL and Enterprise COBOL:
>
>
>
>
>
>
CORRESPONDING
GIVING
ROUNDED
SIZE ERROR
FROM
INTO
Data Division Sections: Defined and Compared
SECTION
HP Tandem COBOL
IBM z/OS Enterprise COBOL
FILE
The section identifies a
file and the various layouts
by which the file can be
accessed.
The section syntax is similar in
both versions, with an additional
clause of “REPORT” which is not
present in Enterprise COBOL.
It is also possible to ASSIGN a file
to the DEFINE name parameter
which is passed onto the program.
Syntax is similar.
An additional clause of “RECORDING
MODE” having value of F (Fixed),
V (Variable), U (Fixed/Variable) or
S (Spanned) for a QSAM file.
Assigning a file to the DEFINE
name parameter is not possible.
WORKING-STORAGE
The various variables used
to perform the business
functionality in the program
are declared and, if required,
defined as well.
Usage of the section is similar in
both versions.
HP limits the size of variable in the
section to 63,400 bytes, above which
the variables must be declared in the
EXTENDED-STORAGE section, which
has a limit of up to 133,693,440 bytes.
There’s also a binder limit of 32767
words on the total WORKING-STORAGE memory of all bound COBOL
programs.
IBM z/OS allows a limit of
134,217,727 bytes which is higher than
the total of WORKING-STORAGE and
EXTENDED-STORAGE sections on
HP Tandem COBOL.
EXTENDED-STORAGE
The section is required in
case the variable size is too
big to fit in the WORKINGSTORAGE section.
The section is used when variables
cannot be fit in the WORKING-STORAGE section.
The section is absent.
LINKAGE
The section is used in case
the program is going to call
and pass on parameters to
other modules.
The section usage is similar in both the versions.
LOCAL STORAGE
The section is used to create
recursive programs.
Not present.
The section is used to create recursive programs. The data-variables
declared in this section are initialized
on each invocation of the recursion,
thereby insulating different instances.
A program not containing this section
can’t be recursive and an attempt
leads to run-time system error.
Figure 7
cognizant 20-20 insights
6
Intrinsic Functions
An intrinsic function is a function that a program
can use without needing to declare or code it
explicitly in the program. It returns a value that
is computed at the time of reference during the
execution of the object program.
The following intrinsic functions are available
both in Enterprise COBOL and in Tandem COBOL.
The functions themselves are explained in
detail in their respective manuals listed under the
reference:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
ACOS
ANNUITY
ASIN
ATAN
CHAR
COS
CURRENT-DATE
DATE-OF-INTEGER
DAY-OF-INTEGER
FACTORIAL
INTEGER
INTEGER-OF-DATE
INTEGER-OF-DAY
INTEGER-PART
LENGTH
WHEN-COMPILED
LOG
LOG10
LOWER-CASE
> MAX
> MEAN
> MEDIAN
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
MIDRANGE
MIN
MOD
NUMVAL
NUMVAL-C
ORD
ORD-MAX
ORD-MIN
PRESENT-VALUE
RANDOM
RANGE
REM
REVERSE
SIN
SQRT
STANDARDDEVIATION
SUM
TAN
UPPER-CASE
VARIANCE
The following intrinsic functions are present only
on Enterprise COBOL:
>
>
>
>
>
>
>
>
DATE-TO-YYYYMMDD
DATEVAL
DAY-TO-YYYYDDD
DISPLAY-OF
NATIONAL-OF
UNDATE
YEAR-TO-YYYY
YEARWINDOW
Availability Statistics and Performance
HP NonStop Tandem’s availability statistics
and performance (ASAP) product monitors the
HP Tandem operating system and application
resources. The related calls can be coded in
programs to gain insights into critical applications running on HP NonStop Tandem systems.
This investigation enables users to plan for the
infrastructure growth as required.
Tivoli software can be used to measure current
response times of programs running on IBM
z/OS for good and bad transactions, the use
of resources, amount of MQ messages and
DB2 calls.
Based on further investigations, a product similar
to ASAP – Application Performance Analyzer2 –
exists on the IBM platform.
Transaction Management Facility
The HP NonStop Tandem transaction management facility (TMF) product furnishes transaction protection, database consistency and data-
HP-Only Imperative Statements
Statements
HP Tandem COBOL
IBM z/OS Enterprise COBOL
CHECKPOINT
STARTBACKUP
SYNCDEPTH phrase of OPEN
FREE
ALLOCATE
The statements are used to develop
fault-tolerant programs known as
Nonstop Process pairs.
Such fault-tolerant programming
is not available.
LOCKFILE
UNLOCKFILE
UNLOCKRECORD
The statements are used to LOCK
and UNLOCK the accessibility of a
file during the program execution.
The option to LOCK/UNLOCK a file
exists by use of JCL statements. But
the locking is applicable throughout
the execution of the program and
not on an as-needed basis, which is
available on HP Tandem COBOL.
USING and GIVING Phrase
of ENTER statement
The statement is used to perform
mixed-language programming wherein
sources in languages other than Cobol
are called within Cobol programs.
The statement is not available. The
CALL statement is used to perform
the mixed-language programming.
Figure 8
cognizant 20-20 insights
7
base recovery critical in high-volume transaction
processing. It sustains high performance for
online transaction processing (OLTP) applications, as well as online query processing (OLQP)
activities, batch processing applications and
decision-support systems.
•
Database consistency: On the IBM z/OS
Enterprise COBOL, an invocation of a program unit containing DB2 leads to a starting
of a DB2 thread which encapsulates all the
transactions till a COMMIT statement is used
to finalize the transaction onto the database.
The similar action is available on the HP
Tandem COBOL by the use of TMF-based calls
of BEGINTRANSACTION, ENDTRANSACTION
and ABORTTRANSACTION.
•
Restart mechanism: This mechanism is a
methodology to ensure transactions in a large
Key Words Specific to Respective COBOL Versions
Key words present only
in HP Tandem COBOL
Key words present only
in Enterprise COBOL
Key words present only
in HP Tandem COBOL
Key words present only
in Enterprise COBOL
APPROXIMATE
BASIS
PLUS
SHIFT-IN
CD
BEGINNING
PRINTING
SHIFT-OUT
CF
CBL
PROGRAM-STATUS
SKIP1
CH
CLASS-ID
PROGRAM-STATUS-1
SKIP2
CHARACTER-SET
COM-REG
PROGRAM-STATUS-2
SKIP3
CHECKPOINT
COMP-1
PROMPT
SORT-CONTROL
CLOCK-UNITS
COMP-2
PROTECTED
SORT-CORE-SIZE
COLLATING
COMP-4
PURGE
SORT-FILE-SIZE
COLUMN
COMPUTATIONAL-1
QUEUE
SQL
COMMUNICATION
COMPUTATIONAL-2
RD
TITLE
CONTROL
COMPUTATIONAL-4
RECEIVE
TRACE
CONTROLS
DBCS
RECEIVE-CONTROL
WHEN-COMPILED
DE
DISPLAY-1
REPLY
WRITE-ONLY
DESTINATION
EGCS
REPORT
ZEROS
DETAIL
EJECT
REPORTING
XML
DISABLE
FUNCTION-POINTER
REPORTS
XML-CODE
EGI
GOBACK
RF
XML-EVENT
EMI
GROUP-USAGE
RH
XML-NAMESPACE
ENABLE
ID
SEGMENT
EXCLUSIVE
INHERITS
XML-NAMESPACEPREFIX
EXTENDED-STORAGE
INVOKE
SEND
XML-NNAMESPACE
FINAL
JNIENVPTR
SHARED
GENERIC
KANJI
XML-NNAMESPACEPREFIX
GROUP
LOCAL-STORAGE
SOURCE
XML-NTEXT
GUARDIAN-ERR
METHOD
STARTBACKUP
XML-SCHEMA
HEADING
METHOD-ID
SUB-QUEUE-1
XML-TEXT
INDICATE
MORE-LABELS
INITIATE
OBJECT
LAST
OVERRIDE
LIMIT
PROCEDURE-POINTER
LIMITS
PROCESSING
LINE-COUNTER
READY
LOCKFILE
RECORDING
MESSAGE
RELOAD
NUMBER
RETURN-CODE
PAGE-COUNTER
RETURNING
PF
SELF
PH
SERVICE
SUB-QUEUE-2
SUB-QUEUE-3
SUM
SYNCDEPTH
TAL
TERMINAL
TERMINATE
TEXT
UNLOCK
UNLOCKFILE
UNLOCKRECORD
Figure 9
cognizant 20-20 insights
8
data file are processed only once when a process failure is identified. This is possible in both
HP Tandem COBOL and IBM z/OS Enterprise
COBOL by use of appropriate programming.
The suggested option is to create the specifications of the business logic which need to
be migrated to IBM and then do the development of the necessary logic on IBM z/OS from
scratch by use of CICS and Cobol by using MQ
as the message tunnel between the user GUI
and COBOL program.
Compiler Directives
The compiler directive is the word that directs
the compiler to perform a certain action when
the program is being compiled to create the final
runnable object. Both Cobol versions provide the
option to enable this action in different manners.
The directive “?SOURCE” is heavily used in HP
Tandem COBOL to source-in different modules or
a data dictionary. An alternative for “?SOURCE”
is achieved by entering “BASIS” on the IBM z/OS
Enterprise COBOL.
The rationale behind the suggested option:
> The SCOBOL code is very different than
CICS and hardly any similarities can be
found.
> The handling of user interaction in SCOBOL
is very different than CICS and automated
conversion is not feasible.
•
The directives “?LIST ?NOLIST ?PAGE” have
similar meanings on both HP Tandem COBOL and
IBM z/OS Enterprise COBOL.
The processing accomplished by directives of
“?CONSULT” and “?SEARCH” is possible on IBM
z/OS Enterprise COBOL by use of JCL scripting
statement of STEPLIB which enables a program
to use information from a library of load modules.
The directives listed below have no alternative on
IBM z/OS Enterprise COBOL:
The rationale behind the suggested option:
> A lot of similarities exist which can be leveraged to have an automated conversion of
batch programs.
> An automated approach will enable enterprises to reduce the development cost.
HEADING, SAVE, INSPECT, SYMBOLS, ICODE,
HEAP, SAVEABEND, ANSI, TANDEM, IF, ENDIF,
IFNOT, SETOG PORT, NONSTOP, SECTION, NOBLANK
•
Conclusion
Based on the investigations using a sample HP
Tandem COBOL program converted into Enterprise COBOL by the use of Cobol and CICS/VS
Command Level Conversion Aid (CCCA) tool, the
following conclusions were reached:
•
Application with a combination of both
types of programs: The conversion approach
depends on the ratio of online to batch
programs present in the application.
The more online programs present in the
application, the more the option suggested
for online-only programs should be used.
The same rationale also applies when the
application is laden with batch programs and
fewer online programs are present.
Application with online programs only:
Such an application is heavily driven by use
of SCOBOL requestor programs interacting with a Cobol server which provides the
business logic.
cognizant 20-20 insights
Application with batch programs only: This
approach works with systems heavily driven
by the use of Cobol programs that provide the
business logic in batch mode and where the
concept of IPM is rarely used. The suggested
option is to create the conversion specifications known as language conversion program
(LCP) and use the CCCA tool for automated
conversion. A certain minimum level of manual
conversion may still be required.
9
Quick Take
Cobol Compilation at a Global Banking Major
At a Netherlands-based financial institution with worldwide operations, an exercise to check the feasibility of migrating Cobol applications from HP to IBM was performed to select a future IT platform for
building current account and payment engine applications.
Business Situation
To identify the modifications required for
ensuring correct compilation of HP Tandem
COBOL on the IBM z/OS system.
Challenges and Actions Taken
• Creating a sample Cobol program on the
HP Tandem system using many of the
Cobol functions, statements, etc.
• Ensuring correct compilation on the HP
Tandem system and then aligning the code
correctly for compilation using the IBM
z/OS Enterprise COBOL compiler.
• Compile the code on the IBM z/OS system
and identify the errors received and actions
to overcome them.
Benefits
The following is a comprehensive table indicating the actions to be taken on treating the possible compilation errors that can occur on compiling a HP Tandem Cobol program on an IBM z/OS system.
HP Tandem COBOL Code
Snippet
Errors Received
Replacement in Enterprise COBOL
SELECT FILE1 ASSIGN
TO #DYNAMIC
ENTER "COBOLASSIGN"
USING
Non-COBOL character(s) were
found starting with "#" in
column 44. The characters
were discarded. "DYNAMIC"
was found in the "ASSIGN"
clause. The clause was discarded.
The #DYNAMIC is not used in
Enterprise COBOL; instead, an alphanumeric literal must be mentioned.
During the execution of the program,
a JCL assignment by use of DD and
DSN commands takes care of assigning the external name of the file. The
ENTER "COBOLASSIGN" statement is
not required.
?NOLIST
A character other than
The compiler directives must not
"*", "D", "/" or "-" was
start with “?”.
found in column 7. A blank
was assumed. "NOLIST"
should not begin in area "A".
It was processed as if found
in area "B".
"NOLIST" was invalid. Scanning was resumed at the next
area "A" item, level-number or
the start of the next clause.
02 Y NATIVE-2
"NATIVE-2" was invalid. Scan- Replace the NATIVE-2 with picture
ning was resumed at the next clause PIC S9(4).
area "A" item, level-number,
or the start of the next clause.
cognizant 20-20 insights
10
SELECT FILE5 ASSIGN
TO FILE5
ORGANIZATION IS
SEQUENTIAL
ACCESS MODE IS
SEQUENTIAL
FILE STATUS IS FST-FILE5.
FD FILE5.
01 FILE5-REC.
03 FILE5-ID.
05 FIELD-5
PIC X(06).
05 TEST-9
PIC X(35).
05 TEST-10
PIC X(80).
A "RECORDING MODE" of "F"
was assumed for file "FILE5".
The “RECORDING MODE” clause is
mandatory option for Sequential/
QSAM files.
SELECT FILE1 ASSIGN
TO FILE1
ORGANIZATION IS RELATIVE
ACCESS MODE IS RANDOM
RELATIVE KEY IS KEY-FILE1
FILE STATUS IS FST-FILE1.
01 KEY-FILE1 PIC S9(6)
COMP.
"RELATIVE KEY" "KEYFILE1" was not defined as an
unsigned integer data item.
The key was discarded.
The Relative Key must not be a
signed integer.
MOVE FUNCTION ACOS (-1)
TO MF-A
Numeric function "NUMERIC
FUNCTION ACOS" was not
allowed in this context. The
statement was discarded.
For Numeric and Integer Intrinsic
functions, MOVE is not allowed.
A COMPUTE statement must be
mentioned.
MOVE CORRESPONDING
No "CORRESPONDING"
W-ADD-GR-1 TO W-ADD-GR-2 operands were found.
ADD CORRESPONDING
The statement had no effect.
W-ADD-GR-1 TO W-ADD-GR-2
01 W-ADD-GR-1.
03 W-GR1
PIC 9(02).
03 W-GR2
PIC 9(02).
01 W-ADD-GR-2.
03 W-GR3 PIC 9(02).
03 W-GR4 PIC 9(02).
The subordinate data items present
in the group data items must be of
the same name.
OPEN INPUT FILE1 SHARED
"SHARED" was not defined
as a file-name. The statement
was discarded.
The options of SHARED/PROTECTED/
EXCLUSIVE are not available in Enterprise COBOL. It needs to be taken
care by use of JCL statements.
START FILE4 KEY = TEST-8
OF FILE4-ID OF FILE4-REC
GENERIC
"GENERIC" was invalid.
Skipped to the next verb,
period or procedure-name
definition.
The options of GENERIC, EXACT,
APPROX mode to position a key to
read a record are not available.
Further Steps
A more complicated program containing all the elements possible in an HP Tandem COBOL Program
to be compiled on both the systems to find ways to overcome more compiler errors on the IBM
z/OS system.
cognizant 20-20 insights
11
Footnotes
1
Ian Bramley, “Declining HP Integrity NonStop Far Outclassed by IBM System z10 Mainframe,”
Enterprise e-Infrastructure Analysis, September 2009, ftp://public.dhe.ibm.com/common/ssi/rep_
wh/n/ZSL03066USEN/ZSL03066USEN.PDF.
Product information, IBM site, http://www-03.ibm.com/software/products/fr/fr/apa/.
2
References
•HP Nonstop Tandem COBOL Reference manuals, http://bizsupport2.austin.hp.com/bc/docs/support/
SupportManual/c02121195/c02121195.pdf.
•IBM z/OS Enterprise COBOL Reference manuals, http://pic.dhe.ibm.com/infocenter/pdthelp/v1r1/
topic/com.ibm.entcobol.doc_4.2/PGandLR/igy3pg50.pdf.
About the Authors
Ameen Abbas is an Associate within Cognizant’s Banking and Financial Services Business Unit. He has
over five years of application-building experience with Cobol and the C programming language across
the complete SDLC lifecycle. His areas of expertise include requirements rationalization and designing,
building and deploying banking applications for European financial institutions. He holds a bachelor of
engineering degree in computer science from Anna University affiliated college in India. Ameen can be
reached at [email protected]. Linkedin http://www.linkedin.com/in/ameenabbas.
Janani Karunanithi is an Associate within Cognizant’s Banking and Financial Services Business Unit.
She has over five years of application-building experience with Cobol and the C programming language
for European banks across the complete SDLC lifecycle. Her areas of expertise include current account
engine enhancement, functional requirements gathering and designing, building and deploying banking
applications for European financial institutions. She holds a bachelor of engineering degree in electronics and communication from Anna University affiliated college in India. Janani can be reached at
[email protected]. Linkedin http://in.linkedin.com/pub/janani-karunanithi/17/23b/991.
Thilakam Ponnuraj is an Associate within Cognizant’s Banking and Financial Services Business Unit.
She has over five years of application-building experience using the Cobol programming language for
European banks and has been involved in the complete SDLC lifecycle. Her areas of expertise include
payment engine enhancement, functional requirements rationalization and designing, building, deploying and providing third-line support of banking applications for European banks. She holds a bachelor of engineering degree in electronics and communication from Anna University affiliated college in
India. Thilakam can be reached at [email protected]. Linkedin http://www.linkedin.com/pub/
thilakam-ponnuraj/50/a23/502.
Meenakshi Sundaram Arunachalam is a Senior Manager within Cognizant’s Banking and Financial
Services Business Unit. He has 13-plus years of experience as solution architect and HP Tandem
NonStop technical architect for domestic and cross-border payments projects. His areas of expertise
involve pre-sales, payment engine application designing, building, deploying and large scale project
management. He holds a master of computer applications degree from Madurai Kamaraj University
in India. Meenakshi can be reached at [email protected]. Linkedin http://www.
linkedin.com/pub/meenakshi-sundaram-arunachalam/4/116/193.
Rammurthy Mudaliar is a Senior Associate within Cognizant’s Banking and Financial Services Business
Unit. He has eight-plus years of experience in application building with Cobol, TAL and C languages
for European banks using Wallstreet Systems’ Atlas/GBS product suite. His areas of expertise involve
designing, building, deploying, third-line support and project management for FX, money-market,
treasury and cross-border payments applications involving a globally distributed team. He holds a bachelor of engineering degree in electronics from Mumbai University. He can be reached at Rammurthy.
[email protected]. Linkedin http://www.linkedin.com/pub/rammurthy-mudaliar/19/2a2/27b.
cognizant 20-20 insights
12
About Cognizant
Cognizant (NASDAQ: CTSH) is a leading provider of information technology, consulting, and business process
outsourcing services, dedicated to helping the world’s leading companies build stronger businesses. Headquartered
in Teaneck, New Jersey (U.S.), Cognizant combines a passion for client satisfaction, technology innovation, deep
industry and business process expertise, and a global, collaborative workforce that embodies the future of work.
With over 50 delivery centers worldwide and approximately 162,700 employees as of March 31, 2013, Cognizant is a
member of the NASDAQ-100, the S&P 500, the Forbes Global 2000, and the Fortune 500 and is ranked among the
top performing and fastest growing companies in the world.
Visit us online at www.cognizant.com for more information.
World Headquarters
European Headquarters
India Operations Headquarters
500 Frank W. Burr Blvd.
Teaneck, NJ 07666 USA
Phone: +1 201 801 0233
Fax: +1 201 801 0243
Toll Free: +1 888 937 3277
Email: [email protected]
1 Kingdom Street
Paddington Central
London W2 6BD
Phone: +44 (0) 207 297 7600
Fax: +44 (0) 207 121 0102
Email: [email protected]
#5/535, Old Mahabalipuram Road
Okkiyam Pettai, Thoraipakkam
Chennai, 600 096 India
Phone: +91 (0) 44 4209 6000
Fax: +91 (0) 44 4209 6060
Email: [email protected]
­­© Copyright 2013, Cognizant. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the express written permission from Cognizant. The information contained herein is
subject to change without notice. All other trademarks mentioned herein are the property of their respective owners.