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

Address Constant declaration in assembly language


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

New User


Joined: 02 Mar 2009
Posts: 3
Location: Hyderabad

PostPosted: Fri Sep 17, 2010 6:20 pm
Reply with quote

Hello,

I have an requirement wherein i need to convert the variable declared in assembly language to its equivalent COBOL and that too of storage type A or V (Address Constant)

E.g.
CONST1 DC A(CONST)
here the address of CONST is stored in the storage area CONST1

CONST2 DC A(*)
CONST3 DC A(Home+2)

I need to find out the equivalent COBOL declaration of these address constant storage type in assembler....
Also what exactly is the difference between A-type and V-type address constant in terms of conversion to COBOL..??
I tried finding it in forum but did not get any clue....As m very new to Assembly language..it would be really helpful if some one can explain me this conversion or can provide me with some link where in i can get this conversion process understoop by self.....


Thanks in Advance...
manojG.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Sep 17, 2010 6:26 pm
Reply with quote

the approach is completely wrong!
when converting from one language to another one
the process implementation must be converted/rewritten
not the language constructs ( that might not even have an equivalent )
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: Fri Sep 17, 2010 6:28 pm
Reply with quote

Unless you're using OS/VS COBOL, constants (DC's) are a thing of the past in VS/COBOL II and greater.

WS relies upon either VALUE clauses or initialization at execution time and are effectively defined as DS's.

You need to post more of the Assembler program and perhaps you might get a better opinion (no guarantees).

Bill
Back to top
View user's profile Send private message
mannu_gr8

New User


Joined: 02 Mar 2009
Posts: 3
Location: Hyderabad

PostPosted: Mon Sep 20, 2010 1:25 pm
Reply with quote

@enrico-sorichetti

Here we are not manually converting the Assembler to Cobol so "the process implementation must be converted/rewritten " will not work....

We are developing a tool which will be doing this....
If you have some inputs on this..it would be really helpful....

@ Bill O'Boyle
I do not have exact assembler code as of now....as the tool mentione above is on it's initial phase...

If you have any idea or a link from where i can get the exact use of Address Constant in Assembler , it would be very helpful...


Cheers...
manojG
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 20, 2010 2:40 pm
Reply with quote

Quote:
We are developing a tool which will be doing this....

good luck

Quote:
As m very new to Assembly language..

more than just good luck You will need

spending more time on this issue is just a waste of time for everybody

telling how to <convert> an address constant declaration without having the whole picture is ... see the above sentence

and anyway it will a waste of time for also for a different reason
in assembler language the declarations are not type binding they just define address and length of a storage area
inferring anything else is just making wrong assumptions

the only way to <type> a variable is by looking at the assembler instructions using it

Quote:
if you have any idea or a link from where i can get the exact use of Address Constant in Assembler , it would be very helpful...


the assembler manual will tell all You want to know about assembler constructs

if You do not even know the basics on how to look/search for docs,
how do You expect to be able to write any tool icon_question.gif icon_evil.gif
Back to top
View user's profile Send private message
mannu_gr8

New User


Joined: 02 Mar 2009
Posts: 3
Location: Hyderabad

PostPosted: Mon Sep 20, 2010 3:01 pm
Reply with quote

Thanks a lot.... icon_exclaim.gif
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 Sep 20, 2010 7:32 pm
Reply with quote

Hello,

Quote:
We are developing a tool which will be doing this....
Suggest you reconsider. . .

People who know assembler very well would find this a daunting task. Because there is an infinite numer of ways people wrote assembler over the last 4 decades. . .

To make this less likely to succeed, it sounds like the people trying to implement the tool don't even have a beginner's level of knowledge of assembler. Address Constants are one of the simpler "things assembler can do". . .
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 Routing command Address SDSF to other... TSO/ISPF 2
No new posts PL/1 Callback address logic in z/OS C... PL/I & Assembler 1
No new posts Access an specific memory address exp... COBOL Programming 1
No new posts IMS DB using Natural Language IMS DB/DC 0
No new posts Selecting multiple constant records DB2 3
Search our Forums:

Back to Top