Você está na página 1de 82

Migrating off the Mainframe:

Hard Lessons Learned


James Gilpin
Migrating off the Mainframe | August 18th, 2008 | Page 2
Agenda and Credits
Migrating off the Mainframe | August 18th, 2008 | Page 3
Agenda
The salesperson said what??????

Describe the Mainframe Migration project
State of North Dakota

Discuss lessons learned
Did you install the products yet?
Whose responsibility is it to test?
Are you really sure you need to migrate that?
If they are not migrating, why do we need to?
Who moved my files and why didnt you tell me?

Recommendations
Would I do it all over again...?
Migrating off the Mainframe | August 18th, 2008 | Page 4
State of North Dakota
Reference material for project
http://www.nd.gov/itd/
Open records act, all status reports, EVERYTHING is on this site.
Absolutly nothing to hide!

A great place to visit, work, play
http://www.nd.gov
#1 Most Secure place to live Small Towns
Rated by Farmers Insurance
#1 Least Stressful Small City
Rated by Sperlings` BestPlaces
Dakota is the Indian word for Friend

Migrating off the Mainframe | August 18th, 2008 | Page 5
You know you are in North Dakota when:
1) Your leave you keys in the car, and in the morning the car is still
there
2) You say Combine and people understand
3) The meat in your freeze is mostly Deer.
4) When someone says Manure Spreader, there are NOT referring
to the local congressman
5) Your kids define summer as 3 months of bad sledding
6) Your definition of a small town? Only 1 bar.
7) Down south means, Pierre, SD
Migrating off the Mainframe | August 18th, 2008 | Page 6
The salesperson said WHAT???!!!
Or What you can ignore
Migrating off the Mainframe | August 18th, 2008 | Page 7
Sales talk
Words to ignore

Like for Like

Transparent to the User

No-brainer

Migrating off the Mainframe | August 18th, 2008 | Page 8
Mainframe Migration
Or what I did with my last 3 years
Migrating off the Mainframe | August 18th, 2008 | Page 9
Mainframe Migration
The stated Goal:

To be economical and deliver more value per dollar, we have
initiated this project to move legacy applications to more
prevailing computer platforms. It is the intent for all of the
agency's software application systems to be migrated from the
mainframe into a Linux/Windows environment.

Executive Summary:
http://www.nd.gov/itd/hosting/mfmigration/index.html
Migrating off the Mainframe | August 18th, 2008 | Page 10
Bismarck Tribune 8/11/2008
Mike Ressler, assistant director of the state Information
Technology Department, said it is about 35 percent more
expensive for an agency to run its software on the state's
mainframe computer than it is to use servers.

Most agencies have removed their operations from the
mainframe, Ressler said, although North Dakota's departments
of Human Services and Transportation, the Bank of North
Dakota and the Legislature still use it.

http://www.bismarcktribune.com/articles/2008/08/11/news/local/162045.txt
Migrating off the Mainframe | August 18th, 2008 | Page 11
Mainframe Migration
Plain language:

Move everything from the mainframe to open systems

Problem:

Not everything can be moved. Some things have to be rewritten.
Migrating off the Mainframe | August 18th, 2008 | Page 12
Mainframe Migration
What you cannot move or change

Manual processes

Source code the does not exist
Do NOT count on binaries working the same way

Platform differences
EBCDIC vs. ASCII
Sort sequences





Migrating off the Mainframe | August 18th, 2008 | Page 13
Mainframe Migration
Process

Application Assessment
Break applications into phases
Begin work on phases, implementing each phase prior to the start of
the next phase


Migrating off the Mainframe | August 18th, 2008 | Page 14
Mainframe Migration
Lessons Learned #1

What did we miss in the assessment?

The assessment focused on the applications running in production.

Missed:

The creation of a linux development environment
A change control system to move code from development to production
Production data access to be used as test data


Migrating off the Mainframe | August 18th, 2008 | Page 15
What did we migrate?
Source

NATURAL
ADABAS
COBOL
CICS
JCL
Assembler
DYL280
FORTRAN


Target

NATURAL
ADABAS
COBOL
CICS
JCL
COBOL/C++/NATURAL
NATURAL
COBOL
Migrating off the Mainframe | August 18th, 2008 | Page 16
Mainframe Migration
Products part of migration effort

NATURAL
ADABAS
CONSTRUCT (NBS)
Entire NET-WORK
EntireX
Entire Access (DB2 and ORACLE)
MicroFocus
COBOL, JCL, CICS (yep.... CICS)
DB2
Appworx (Scheduler)
Co-Sort
Original chose SYNCSORT, but replaced it with Co-Sort

Also needed, but not on mainframe
ORACLE
Migrating off the Mainframe | August 18th, 2008 | Page 17
ESPBatch vs. MicroFocus JCL Engine
Lessons Learned #2

Acceptance of new technology

The state development staff did not accept the scripting technology that
was implemented using ESPBatch.

ESPBatch

Dynamic generater of scripts used in batch.

MicroFocus JCL Engine

Production release Spring of 2007
Looks like the mainframe, with a web interface
Migrating off the Mainframe | August 18th, 2008 | Page 18
Mainframe Migration
Applications were split into 4 Phases

Phase 1
BND, OMB, Attorney General, ITD, HL, Workforce Management
29 applications, 1,950 core objects*
Phase 2
G&F, DHS #1, NDPERS, Job Services, State Treasury
32 applications, 2,244 core objects*
Phase 3
HE, DPI, DOT
32 applications, 6,838 core objects*
Phase 4
DHS
23 applications, 6,362 core objects*

(NATURAL, COBOL, JCL)
Not shown: VSAM, ADABAS, Flat file, PROCs, Control Cards, etc.

Migrating off the Mainframe | August 18th, 2008 | Page 19
Under estimating the effort
Lessons Learned #3

Under estimated the effort

The effort to migrate, test, and implement the objects was seriously
underestimated.

Count EVERYTHING!

Simply counting the PROGRAM objects is not enough.

Things you might miss

VSAM conversion to ???
EBCDIC conversion to ASCII flat file processing
Migrating off the Mainframe | August 18th, 2008 | Page 20
Current Status
Migrating off the Mainframe | August 18th, 2008 | Page 21
Mainframe Migration
Current Status

Phase 1 August 2007 and November 2007

BND, OMB, Attorney General, ITD, HL, Workforce Management
29 applications, 2,005 core objects* (55 additional)










(NATURAL, COBOL, JCL)
Not shown: VSAM, ADABAS, Flat file, PROCs, Control Cards, etc.

Migrating off the Mainframe | August 18th, 2008 | Page 22
Do not try to force the users
Lessons Learned #4

User acceptance timelines may be out of your control

Migrating off the Mainframe | August 18th, 2008 | Page 23
Mainframe Migration
Current Status

Phase 2 December 2007 and January 2008

G&F, Job Services
8 applications, 2,244 core objects*
NDPERS was being rewritten during the migration
DHS decided to delay implementation after testing was completed









(NATURAL, COBOL, JCL)
Not shown: VSAM, ADABAS, Flat file, PROCs, Control Cards, etc.

Migrating off the Mainframe | August 18th, 2008 | Page 24
Communication
Lessons Learned #5

Communication between all parties is critical

ITD and NDPERS were working together to rewrite a major protion of the
application code. This was NOT effectively communicated to the project
team.
Migrating off the Mainframe | August 18th, 2008 | Page 25
Communication
Lessons Learned #5A

Informal Communication is important and must be documented

2 people who know the answer does not equate to 200 people
understanding the problem.
Migrating off the Mainframe | August 18th, 2008 | Page 26
Mainframe Migration
Current Status

Phase 3 March 2008 and August 2008
HE, DPI, DOT, HP
32 applications, 5,411 core objects*
DL removed 1,071 objects
RIMS reduced by 658 objects
HD2 added 297 objects
DOT dropped out July 2008

Phase 4
DHS not migrating
23 applications, 6,362 core objects*

(NATURAL, COBOL, JCL)
Not shown: VSAM, ADABAS, Flat file, PROCs, Control Cards, etc.

Migrating off the Mainframe | August 18th, 2008 | Page 27
Communication
Lessons Learned #5

User buy in - CRITICAL

If your user community does NOT believe in the migration...

Do NOT assume they will just take whatever you give them
Migrating off the Mainframe | August 18th, 2008 | Page 28
Testing
Or how to lose control of your project in one easy lesson
Migrating off the Mainframe | August 18th, 2008 | Page 29
Testing
To meet the testing objectives, test scripts and/or other verification
methods are required for all documented requirements of modules
affected by the migration.
Migrating off the Mainframe | August 18th, 2008 | Page 30
Testing
To test the functionality of the migrated applications, we developed
1,000+ test scripts contain specific instructions. These were created
by working with the end user, reviewed by the end user, and approved
by the end user.
Migrating off the Mainframe | August 18th, 2008 | Page 31
Testing
Lessons Learned #6

Testing of the ENTIRE application is CRITICAL

Typically the end user does not see 80-90% of the application

Schedule batch jobs result in some sort of output. The end user cares
about the output they receive. Not that the job ended in success or
failure.


Migrating off the Mainframe | August 18th, 2008 | Page 32
Testing
Lessons Learned #6A

Simply because the end user helped write, reviewed, and approved the
test scripts, does NOT mean it actually tests the application.


Migrating off the Mainframe | August 18th, 2008 | Page 33
Testing
Lessons Learned #7

Do not allow the end user to assume the application will work exactly the
same

Simply because the application looks the same, does not mean the logic
behind the screen has not changed.



Migrating off the Mainframe | August 18th, 2008 | Page 34
Testing
Lessons Learned #8

Do not expect the vendor to test for every business case

If is stows, it goes



Migrating off the Mainframe | August 18th, 2008 | Page 35
Should we migrate it or rewrite it
Or leave it alone?
Migrating off the Mainframe | August 18th, 2008 | Page 36
What to migrate
Lessons Learned #9

Only migrate what you are actually using

Use this process as a cleanup of the code, etc. That will extend the
deadlines, but brings a big payoff.



Migrating off the Mainframe | August 18th, 2008 | Page 37
What to migrate
Lessons Learned #9a

Verify what your users are using an application BEFORE you attempt to
migrate it



Migrating off the Mainframe | August 18th, 2008 | Page 38
The Technical Stuff
Enough of the preaching, on to the techincal challenges
Migrating off the Mainframe | August 18th, 2008 | Page 39
Technical Stuff
NATURAL

External Calls
Console messages converted to system logs

NATRJE
Converted to cassub Micro Focus command

DB2 Date fields
Converted A8 to D, modified move edited statements for display
Entire Access returns YYYYMMDD, not MMDDYYYY
If statement changed from > space to > 0
PREDICT and CONSTRUCT issue has been resolved
Aprx 6,000 lines of code were modified in 5 weeks


Migrating off the Mainframe | August 18th, 2008 | Page 40
Technical Stuff
NATURAL

Use of UNFORMATTED files to handle packed signed numeric data
between COBOL and NATURAL

NATPLAN / NDBPLNA
Connect string to DB2 vs. NATURAL for DB2
Binding from open systems?...

Checkpoints
ASCII to ASCII, no problem
ASCII to EBCDIC,
convert the value BEFORE sending it
This is a BINARY value and is NOT auto converted by NET-WORK
Migrating off the Mainframe | August 18th, 2008 | Page 41
Technical Stuff
NATURAL

Replaced DW/370 (Office Vision) with NATURAL application
Yes, we can talk about selling you a copy...

NEXT prompt, not on Open Systems
End user training
FETCH statements at end of programs
ON ERROR added to capture errors and correctly direct user

Terminal Emulation
Colours, @#@%@#$!@!@#
Mouse, @#%@!@%!@#@#
...
Migrating off the Mainframe | August 18th, 2008 | Page 42
Technical Stuff
NATURAL

NOT NULL
Requires length indicator to be > 0 even if field is spaces

HEX values
0018**ASSIGN #HEX = H'6D'
0019** NDSAG changed above hex value to it's equivalent in ascii
0020ASSIGN #HEX = H'5F

TRANSDEF statement added to ENTIRE NET-WORK
Tells NET-WORK how to convert the superdescriptor values
Migrating off the Mainframe | August 18th, 2008 | Page 43
Technical Stuff
NATURAL

New version of products released during project
NATURAL
6.1, 6.2, 6.3
Major FILEDIR.SAG change in 6.2
NDV, NSC, ...
ADABAS
5.1.x to 6.1.x
PREDICT
4.4.1 to 4.5.2
CONSTRUCT
4 to 5 (NBS)
ENTIRE X
7 to 8
ENTIRE NET-WORK
7.2 to 7.3

Migrating off the Mainframe | August 18th, 2008 | Page 44
Technical Stuff
Other upgrades

New version of products released during project
SuSE
ES 9 to 10
DB2 client
8 to 9 to 10
Oracle client
9 to 10 to 11 (?)
Micro Focus
4 to 5 to 5.3 to 5.4
Migrating off the Mainframe | August 18th, 2008 | Page 45
Code Examples
What changed, who changed, were does the blame lie
Migrating off the Mainframe | August 18th, 2008 | Page 46
What was Changed?
Platform Hardware

Operating System

Security Architecture

Location of flat files, data, program source, etc.

VSAM transfers to ADABAS, If accessed by NATURAL

ISAM structure used by Micro Focus COBOL emulates VSAM

development processes


Migrating off the Mainframe | August 18th, 2008 | Page 47
What are we migrating?
PRODUCTION applications that were identified
during the assessment in 2005. (plus TR5, which was added AFTER
project started)

DATA that is used by those applications


Migrating off the Mainframe | August 18th, 2008 | Page 48
How were we testing it?
Unit test did it run?

Linux only tech team

System and Integration test did it run correctly?

[ TEST LPAR AND LINUX test script executed in parallel ]

User Acceptance test does the user accept how it works?

Linux only with ability to compare back to the original TEST LPAR

Migrating off the Mainframe | August 18th, 2008 | Page 49
Products
Mainframe

NATURAL
COBOL
DYL280
REXX
ASSEMBLER
FORTRAN
JCL

LINUX

NATURAL
COBOL
NATURAL
Combination of perl and NATURAL
COBOL
COBOL
JCL, perl, scripts
Migrating off the Mainframe | August 18th, 2008 | Page 50
Developer Tools available
SPoD Single Point of Development

NATURAL for Windows

Net Express

Micro Focus COBOL for Windows

Server Express

Micro Focus COBOL for Linux


Migrating off the Mainframe | August 18th, 2008 | Page 51
Migrationware ADABAS SQL options
ADABAS SQL precompiler

Converts existing ADABAS statements within mainframe COBOL into
ADABAS direct calls


Migrating off the Mainframe | August 18th, 2008 | Page 52
Code Change Examples

NATURAL

COBOL

JCL


Migrating off the Mainframe | August 18th, 2008 | Page 53
Code Changes
Nothing DELETED, just commented out


Migrating off the Mainframe | August 18th, 2008 | Page 54
NATURAL - NATRJE
Changes to parameters

CARDS (A80/1:*) /* changed to variable length array
count (b4)
flag (a1)
rethex (b2)
workfile (a253) /* NEW FIELD


The value workfile is set by NATRJE and is passed on
subsequent calls. When the JCL is complete and
released, the workfile is deleted.
A replacement
NATRJE was created
to allow the current
NATRJE to work
with minor
modifiations.

Micro Focus provides
a command line
interface
`cassub`, which is
used by the NATRJE
replacement.
Migrating off the Mainframe | August 18th, 2008 | Page 55
NATURAL - NATRJE
CD1735 original code

CALL 'NATRJE' #CARD(1:#COUNT) #COUNT 'L' #RETHEX

CD1735 modified code

01 #WORKFILE (A253) /* NDSAG
01 #wk-cards(a80/1:*) /* if necessary to match receiving
field

EXPAND ARRAY #wk-CARDs TO (1:#I) /* NDSAG
#WK-CARDS(*) := #CARD(1:#COUNT)
CALLNAT 'NATRJE' #WK-CARDS(1:#COUNT) #COUNT 'L'
#RETHEX #WORKFILE /* NDSAG

A replacement
NATRJE was created
to allow the current
NATRJE to work
with minor
modifiations.

Micro Focus provides
a command line
interface
`cassub`, which is
used by the NATRJE
replacement.
Migrating off the Mainframe | August 18th, 2008 | Page 56
NATURAL CD9993
CD9993

Returns the RACF information stored in ADS account.

This code was converted a c routine written by ND

NO changes to the parameter list
The RACF Info is
now stored in your
Active Directory
account
Migrating off the Mainframe | August 18th, 2008 | Page 57
NATURAL CD9994
CD9994

Sets a CHECKPOINT value in ADABAS.

Rewritten as NATURAL and a modification to the
Migrationware

Note: The CHECKPOINT has to be converted to EBCDIC if
the target database is on EBCDIC.
ADABAS Checkpoints
can be used by the
DBA group to
restore data. The
utilities and
methods are diffent
on the linux
platform.

The basic steps are
to restore the files
and roll forward to
the checkpoint.
Migrating off the Mainframe | August 18th, 2008 | Page 58
NATURAL CD9995
CD9995 display message on console

Rewritten as NATURAL

Terminate with message

Message is displayed in the CMPRINT

IF ABORT flag is set to X,
a TERMINATE 254 is issued.
The concept of a
interactive console
does not exist under
the JCL Engine.

Note: first 3 phases
contains 400+ calls
to CD999x routines
that had to be
updated
Migrating off the Mainframe | August 18th, 2008 | Page 59
NATURAL online finalist calls
CD2305N0

NATURAL code written to make a web service call and
verify a single address using the FINALIST on the
mainframe.


Batch Finalist
replacement has
NOT been chosen by
ND
Migrating off the Mainframe | August 18th, 2008 | Page 60
NATURAL CD2305N0
CD2305N0

Uses Request DOCUMENT and PARSE

To make a http request to the web service and then parse
the xml return document

PARSE statement combines loop and decide logic
Migrating off the Mainframe | August 18th, 2008 | Page 61
NATURAL CD2305N0
#Url := 'http://ranch.state.nd.us:6105/cics/mvfn/cd2350?'
compress #Url 'addr1=' #PA-ADDR1 into #Url leaving no
compress #Url '&addr2=' #PA-ADDR2 into #Url leaving no
compress #Url '&city=' #PA-CITY into #Url leaving no
compress #Url '&state=' #PA-STATE into #Url leaving no
compress #Url '&zipcode=' #PA-ZIP into #Url leaving no

examine full #Url for ' ' replace '%20'

Migrating off the Mainframe | August 18th, 2008 | Page 62
NATURAL CD2305N0
REQUEST DOCUMENT from #Url
with USER #User
PASSWORD #Password
HEADER NAME "Accept" VALUE "text/*"
NAME "User-Agent" VALUE "Natural"
RETURN HEADER ALL #Return_Header
NAME " " VALUE #Header_Status
NAME "Content-Type" VALUE #Header_Content_Type
NAME "Location" VALUE #Header_Location
NAME "WWW-authenticate" VALUE
#Header_Authenticate
PAGE #Return_Page
RESPONSE #Response
GIVING #Error-num

Migrating off the Mainframe | August 18th, 2008 | Page 63
NATURAL CD2305N0
if #response = 200
PARSE XML #return_page into
PATH #OPERAND2 NAME #OPERAND3 VALUE
#OPERAND4
DECIDE ON FIRST #OPERAND2
VALUE 'Address'
RESET #pass-area #pass-error-message
VALUE 'Address/input/addr1/$'
#pa-addr1 := #operand4
VALUE 'Address/input/addr2/$'
#pa-addr2 := #operand4
VALUE 'Address/input/city/$'
#pa-city := #operand4

Migrating off the Mainframe | August 18th, 2008 | Page 64
NATURAL HISTOGRAM
**NDSAG Changed "ending at" to "to" forcing the target
database to do the comparison

HISTOGRAM(1) GF201010-V2 SUBSCRIPTION-NO STARTING
FROM #SUB-NO(#I) TO #SUB-NO(#I)

The comparsion for
the ending point
should be done by
the database to
avoid EBCDIC to
ASCII conversion
issues
Migrating off the Mainframe | August 18th, 2008 | Page 65
NATURAL Unique or ONE OFFs
ER3997

Had a ET inside the SORT statement, which was timing
out.

Put the ET in the AT END OF DATA

Migrating off the Mainframe | August 18th, 2008 | Page 66
NATURAL Unique or ONE OFFs
SS1397N2

001980 SELECT *
001990 INTO VIEW U112DBA-SS139710
002000 FROM U112DBA-SS139710
002010 WHERE (SEC_USERID >= #START.SEC_USERID)
002020 ORDER BY SEC_USERID
002030 OPTIMIZE FOR 15 ROWS
002040 **NDSAG Statement not available with v6.1
002050 * WITH UR


Uncommited Read
or `Dirty Read` not
available with
NATURAL v6.1

Expected NATURAL
v6.3 to allow this
SELECT statement




Migrating off the Mainframe | August 18th, 2008 | Page 67
COBOL ADABAS calls
Handling of JCL ABENDS

DISPLAY ADABAS-ERROR UPON CONSOLE.
* STOP 'ABORT ER7061 - ADABAS ERROR'.
MW200702
DISPLAY 'ABORT ER7061 - ADABAS ERROR
MW200702
MOVE 12 TO RETURN-CODE
MW200702
* STOP RUN
MW200704
CALL 'ILBOABN0' USING RETURN-CODE


This is unique to the
Micro Focus JCL
engine.

ILBOABN0 is
provided by MF
Migrating off the Mainframe | August 18th, 2008 | Page 68
COBOL Conversion of VSAM to ADABAS
If a VSAM file is hit by NATURAL, it has to be converted to
ADABAS

For Phase 1 and 2, less than 10 files




With ADABAS
triggers, we can
replicate the VSAM
file with READ ONLY
privileges
Migrating off the Mainframe | August 18th, 2008 | Page 69
COBOL ADABAS calls
Check point values

If TARGET is EBCDIC, Migrationware will automatically
convert, based on DDCARD setting in JCL


Migrating off the Mainframe | August 18th, 2008 | Page 70
COBOL DDM containing reserved word
`NAME` is a reserved word under Micro Focus cobol

Resolved by adding RW to field name



Affected BK and MB-
but only 3 objects
Migrating off the Mainframe | August 18th, 2008 | Page 71
JCL types of changes
Added Conversion Comment

Joblib and Steplib
was not currently supported, commented out

ADA Cards on NATURAL steps commented out
not supported, nor needed. Used COBOL object instead

DYL280 steps commented and replacement JCL put inline

NATURAL No need for SORTLIB

No need for TCPIP datasets

Migrating off the Mainframe | August 18th, 2008 | Page 72
JCL types of changes
NATURAL LOGON - batch

CD,BKBATCH
%*
BK1169

Changes to:

%*
LIBRARY,USERID,PASSWORD



Note: only 8 chars allowed, if first line is LONGER than 8
chars, an error will occur.



Migrating off the Mainframe | August 18th, 2008 | Page 73
JCL types of changes
NATURAL EXECUTE

EXEC changed to EX

Only EX or EXECUTE is supported.



Migrating off the Mainframe | August 18th, 2008 | Page 74
JCL types of changes
FTP

Format of calls changed to use LINUX client

CMPRTXX

IF CMPRTXX points to a dataset or workfile, then the
RECFM is set to LSEQ




Migrating off the Mainframe | August 18th, 2008 | Page 75
JCL types of changes
Format Step

Flat files that are being exported are being formatted
with lf/cr.

Unformat Step

Flat files that are being imported, have the lf/cr
removed


Issue: NATURAL reads the signed packed data incorrectly
from a formatted file.




Migrating off the Mainframe | August 18th, 2008 | Page 76
JCL types of changes
SMTP Email

converted to linux utility call using NATURAL code




Migrating off the Mainframe | August 18th, 2008 | Page 77
JCL types of changes
NATL215,216,220

These objects have been written by Micro Focus as
COBOL replacements to the original executables. They
call batch NATURAL via a script and environment
variables.



Note: the JCL
Engine only calls
what it knows
about. COBOL and a
handful of utilities
Migrating off the Mainframe | August 18th, 2008 | Page 78
Would I do it again?
Migrating off the Mainframe | August 18th, 2008 | Page 79
Would I do it again?
Yes

But,

I have learned a lot in the last 3 years, including what to not to do.

I would NOT do this without that experience.

If you are going to attempt this, bring in some experience, and give them the
right to say are you nuts?


Migrating off the Mainframe | August 18th, 2008 | Page 80
Demos?
Migrating off the Mainframe | August 18th, 2008 | Page 81
Demos
Micro Focus JCL Engine

Anything else? ( as time permits )


Thank You!

Você também pode gostar