IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cancel program to be converted to COBOL


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bnveena

New User


Joined: 29 May 2007
Posts: 50
Location: hyderabad

PostPosted: Wed May 20, 2009 2:11 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 20, 2009 3:09 pm
Reply with quote

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
View user's profile Send private message
bnveena

New User


Joined: 29 May 2007
Posts: 50
Location: hyderabad

PostPosted: Wed May 20, 2009 4:26 pm
Reply with quote

we dont have any program specifications or documentation ... we have to analyse the assembler program and convert to COBOL...
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed May 20, 2009 4:36 pm
Reply with quote

Doesn't anyone in your shop have some Assembler background?

Regards,
Back to top
View user's profile Send private message
bnveena

New User


Joined: 29 May 2007
Posts: 50
Location: hyderabad

PostPosted: Wed May 20, 2009 4:39 pm
Reply with quote

Nopes ... that is the problem....
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed May 20, 2009 4:47 pm
Reply with quote

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". icon_rolleyes.gif

I understand your dilemma all too well....

Regards,
Back to top
View user's profile Send private message
bnveena

New User


Joined: 29 May 2007
Posts: 50
Location: hyderabad

PostPosted: Wed May 20, 2009 4:58 pm
Reply with quote

Hmm... its just a trial and error skill on the developer....
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 20, 2009 5:08 pm
Reply with quote

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
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu May 21, 2009 2:34 am
Reply with quote

Does the program use MGCR macro to send commands? I don't know if there is a COBOL function for this.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 21, 2009 3:02 am
Reply with quote

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
View user's profile Send private message
bnveena

New User


Joined: 29 May 2007
Posts: 50
Location: hyderabad

PostPosted: Thu May 21, 2009 9:02 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 21, 2009 9:06 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu May 21, 2009 9:10 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 21, 2009 9:36 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu May 21, 2009 10:06 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 21, 2009 10:19 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top