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

how to handle pointers in cobol


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

New User


Joined: 05 Jul 2007
Posts: 3
Location: chennai

PostPosted: Mon Jul 09, 2007 11:29 am
Reply with quote

hi friends,

I am doing assembler to cobol migration,how to handle base registers ,registers and addresses in cobol.i supposes that it should be replaced by pointer variables and i am not sure abt that......


pls some one help me....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jul 09, 2007 11:34 am
Reply with quote

You should not have to worry aboutbase registers in COBOL, and general register usage can pretty much ignored to.
Dsect in assembler is where you would use COBOL pointers and the linkage section.
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: Mon Jul 09, 2007 12:25 pm
Reply with quote

Hello,

As i've mentioned in the past when this is asked, one good way to convert assembler to cobol is to determine what business rules the code is supporting and working toward that goal.

Trying to replace assembler with cobol instruction by instruction is most frustrating and unproductive. Working routine by routine will be more effective.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Jul 09, 2007 12:30 pm
Reply with quote

sathyashree wrote:
Thanks for ur reply,but wat to do with that registers,while convering from assembler to cobol instead of registers v should use pointer variable know...?
Registers are used for many reasons, each usage has an equivalent in COBOL.
The general base registers can be ignored since COBOL will take care of that.
Registers can provide dsect addressability, pointers and linkage section items can substitute there.
Registers can be used for incrementing and decrementing, such as indexes and subscripts.
Back to top
View user's profile Send private message
haibrs

New User


Joined: 03 Jan 2007
Posts: 8
Location: Mumbai

PostPosted: Tue Jul 17, 2007 5:01 pm
Reply with quote

Hi,
Conversion from Assembler to COBOL is to make the Application Programming more user friendly. In assembly mostly we use registers, adressing concepts more. Recently i have worked one the same kind of projects. So i can suggest U the best way is try to understand the Businees of the application and extract the "businees rules" and create the new requirements for the same in COBOL. but it requires lot of efforts and also time.
All the best!!!

Regards,
BRS.
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 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
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top