View previous topic :: View next topic
|
Author |
Message |
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
Hi,
In mainframes CANCEL is program is written in assembler language. We want to convert to a COBOL program. How to understand the program and how to analyse the program. can any one help me in this regard |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
NO!
read the program specifications, the program documentation,
if the above items are clear, no need to examine the assembler source
just start from scratch |
|
Back to top |
|
|
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
we dont have any program specifications or documentation ... we have to analyse the assembler program and convert to COBOL... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Doesn't anyone in your shop have some Assembler background?
Regards, |
|
Back to top |
|
|
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
Nopes ... that is the problem.... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Has your shop's management been informed of this lack of Assembler expertise?
But then again, do they really care? They probably just want "results" and not "excuses".
I understand your dilemma all too well....
Regards, |
|
Back to top |
|
|
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
Hmm... its just a trial and error skill on the developer.... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
the only approach possible then, is to reverse engineer the specifications
I.E.:
analyze how the program is used and from the expected result
rewrite the specs and a new program |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Does the program use MGCR macro to send commands? I don't know if there is a COBOL function for this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
In mainframes CANCEL is program is written in assembler language. |
What happens when this program is called?
What parameters are passed to this program - possibly an abend code and a dump/no-dump indicator? |
|
Back to top |
|
|
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
Hello dick...
you are exactly rite the cancel program called in the COBOL program is in the assembler language and it indicates some dump or an abend code...
We are migrating the COBOL programs to AIX So it understands only COBOL not assembeler programs.
So We need to convert the CANCEL routine to COBOL
Code: |
********************************************************************
NEWCANCL EQU * **INTERPRET NEW FORMAT PARM
CLC 0(2,2),=H'4095' Q. IS ABEND CODE GT 4095
BNH CKDUMP N. USE ABEND CODE PASSED
MVC 0(2,2),=H'4095' Y. DEFAULT ABEND CODE IS 4095
CKDUMP LH 3,0(,2) LOAD ABEND CODE TO REG 3
CLI 2(2),C'D' Q. DO WE WANT A DUMP
BE NEWDUMP Y. SKIP TO ABEND W/DUMP
CLI 3(2),C'S' Q. DO WE WANT TO ABEND STEP TASK
BE STEPABND Y. SKIP TO ABEND STEP
ABEND (3) N. ABEND SUBTASKS ONLY/NODUMP
SPACE 3
STEPABND ABEND (3),,STEP ABEND TO JOBSTEP TASK/NODUMP
SPACE 3
NEWDUMP EQU * **NEW FORMAT: ABEND W/DUMP
CLI 3(2),C'S' Q. DO WE WANT TO ABEND STEP TASK
BE STEPDUMP Y. SKIP TO ABEND STEP/DUMP
ABEND (3),DUMP
SPACE 3
STEPDUMP ABEND (3),DUMP,STEP ABEND TO JOBSTEP TASK W/DUMP
END CANCEL
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
I believe this is not an assembler to cobol issue but rather it is an mvs to unix issue.
Suggest you talk with the unix sysadmins and ask how a process is supposed to handle a controlled abend on that system. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
in any decent migration plan ...
planners are usually aware of facilities not available in the new environment.
the facilities provided by the assembler snippet You posted are not available in the unix world
You/Your organization will have to reengineer the whole process
using the facilities of the new environment |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
You/Your organization will have to reengineer the whole process
using the facilities of the new environment |
Yup, but hopefully the only actual work for this situation will be to write a replacement module and all of the modules that call CANCEL will continue to work as coded. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
... the modules that call CANCEL will continue to work as coded |
my point was related not only to the assembler issue, but also/mostly to the surrounding unix environment
how will the shell scripts handle the abend / dump issue |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
but also/mostly to the surrounding unix environment
how will the shell scripts handle the abend / dump issue |
If it has not been done already, i'd suggest a list of "features" used by this application and how each of these features will be handled on unix. I'd also pick a modest set of tables. files, code, and batch process and go thru a proof of concept.
Depending on how the data is stored on the mainframe and how it is to be stored on unix may require data conversion software. In my experience, success was more easily had creating loadable files on the original system.
Some years ago i was assigned project lead to migrate 4 mvs mainframes to hp-ux. It took about 6 months to run the test case systems on unix. It took about 2.5 years to migrate the entire application inventory from mvs to hp-ux. |
|
Back to top |
|
|
|