Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Cancel program to be converted to COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Cancel program to be converted to COBOL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed May 20, 2009 3:09 pm    Post subject: Reply to: Cancel program to be converted to COBOL
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    Post subject: Reply to: Cancel program to be converted to COBOL
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed May 20, 2009 4:36 pm    Post subject: Reply to: Cancel program to be converted to COBOL
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    Post subject: Reply to: Cancel program to be converted to COBOL
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed May 20, 2009 4:47 pm    Post subject: Reply to: Cancel program to be converted to COBOL
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    Post subject: Reply to: Cancel program to be converted to COBOL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed May 20, 2009 5:08 pm    Post subject: Reply to: Cancel program to be converted to COBOL
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    Post subject:
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

Site Director


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

PostPosted: Thu May 21, 2009 3:02 am    Post subject:
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    Post subject: Reply to: Cancel program to be converted to COBOL
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

Site Director


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

PostPosted: Thu May 21, 2009 9:06 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu May 21, 2009 9:10 am    Post subject: Reply to: Cancel program to be converted to COBOL
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

Site Director


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

PostPosted: Thu May 21, 2009 9:36 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu May 21, 2009 10:06 am    Post subject: Reply to: Cancel program to be converted to COBOL
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

Site Director


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

PostPosted: Thu May 21, 2009 10:19 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us