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
 

 

Free space in program .
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Fri Aug 14, 2009 6:05 pm    Post subject: Free space in program .
Reply with quote

Hi ,

Is it possibel to determine the free space in the ASM program by looking at listing . I want to know know how much space is still left with the base registers .

Thanks

Reason for the BAN: Respect our Moderators.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Aug 14, 2009 6:13 pm    Post subject: Reply to: Free space in program .
Reply with quote

reading a listing will let You discover anything You want to know about an assembler program
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: Fri Aug 14, 2009 6:15 pm    Post subject: Reply to: Free space in program .
Reply with quote

Are you referring to CSECT Base-Registers? What does your CSECT USING statement specify?

What is the LENGTH of the program after Assembly?

Is this CICS/Assembler or Batch?

Actually, the question should refer to register "addressability" and not "space".

Bill
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Fri Aug 14, 2009 6:31 pm    Post subject:
Reply with quote

I am using this calculation for free space :

(Number of base register * 4096 - 1) - ( current location counter - start of pgm LC)

But this is taking some time to find all the parametrs . The PGm is batch.
Is it possible ..does soemthing in listing can tell me directly without going thru the above cal.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Aug 14, 2009 6:38 pm    Post subject: Reply to: Free space in program .
Reply with quote

any suggestion might be wrong unless You tell the base register allocation/use strategy
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Fri Aug 14, 2009 6:53 pm    Post subject:
Reply with quote

For example , I am declaring the base registers as :

PGM START 0
LM R3,R5,ADD
USING PGM,R3,R4,R5

.......
ADD DC A(PGM),A(PGM+4095),A(PGM+8191)

But this code being know to me , is easy to figure out the free space . My task gets time consuming when i analyze some complex modules having multiple csect . Is there any trick some listing data ..which can solve the purpose without doing manual calculation .
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: Fri Aug 14, 2009 8:35 pm    Post subject:
Reply with quote

Hello,

I must be having a brain-slow Friday. . . icon_confused.gif

I'm confused on exactly what the goal is.

Does each new csect not "start over" using a new set of registers?

How will the "answer" be used?
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Fri Aug 14, 2009 10:06 pm    Post subject:
Reply with quote

doing this whole thing on the real code(listing) is taking some time to figure out ,going in each csect and finding the number of registers used in base addressing , task becomes bit more time consuming when the program is having a number of USING declarative to establish desct addresiblity also , if the base addres registers is declared at two diff location in the same csect , it again consumes time to find the Total number of base registers used in csect .
Is this the only way to do this .can something be done to estimate this without going thu the trouble of this much analysis , is any tool available ?

Thanks
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: Fri Aug 14, 2009 10:10 pm    Post subject:
Reply with quote

Hello,

Yes, this will surely take an inordinate amount of time. . .

Quote:
Is this the only way to do this .can something be done to estimate this without going thu the trouble of this much analysis
Why do you have the "requirement" to do this in the first place?

What should "the answer" provide? Why is it worth the time to even do this?
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Fri Aug 14, 2009 10:20 pm    Post subject:
Reply with quote

I am developing a tool for debugging pgm in my application , wherien It will implant WTO macros in pgm to trace the trajectory of a record in pgm . I have to calculate the free space in pgm to decide how many WTO my tool can implant in the pgm .
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Sat Aug 15, 2009 6:08 am    Post subject:
Reply with quote

can you put a DC AL4(*-csectname) at the end and see what it gets as a value in the listing?
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Sat Aug 15, 2009 9:23 am    Post subject:
Reply with quote

Babu ,

I don't have system with me now so cant experiment with this code , But i believe DC AL4(*-csectname) wont solve the problem , as it will just give the length/size of CSECT.For free space anyhow the base registers should be identified .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Sat Aug 15, 2009 6:23 pm    Post subject:
Reply with quote

Quote:
as it will just give the length/size of CSECT
Since the CSECT is 4096 bytes at most, won't you be able to subtract the length/size from 4096 and find out exactly how many bytes are free? Without knowing the base register, even?
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Sat Aug 15, 2009 6:51 pm    Post subject:
Reply with quote

Please could you cross check this statement again , I guess may be some confusion is here or may be you are saying this in context to some specific situation .

Quote:


Since the CSECT is 4096 bytes at most



CSECT size may go way beyond 4096 bytes depending upon the number of base registers declared .
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Sat Aug 15, 2009 7:26 pm    Post subject:
Reply with quote

And you're not able to figure out how to generalize the formula?

You might want to rethink your approach and come up with a solution that you can understand and implement -- or if you cannot, perhaps you're not ready to develop such a tool yet.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Sat Aug 15, 2009 8:11 pm    Post subject: Reply to: Free space in program .
Reply with quote

Quote:
CSECT size may go way beyond 4096 bytes depending upon the number of base registers declared .


plain wrong...

a csect size will be what it will be
Code:

...
         l somereg,=a(thingy)
...
         ltorg
...
sample   csect
thingy   ds 247560cl1
         csect


the csect size does not depend on the addressability scheme used
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Sat Aug 15, 2009 8:22 pm    Post subject:
Reply with quote

With the advent of baseless assembler programming, it'll be interesting to see how you handle this the first time you come across it. Without a base register, how are you going to proceed?
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Sat Aug 15, 2009 9:06 pm    Post subject:
Reply with quote

Quote:
CSECT size may go way beyond 4096 bytes depending upon the number of base registers declared .

That is correct. The control section size and the addressability of a single base register are unrelated. One base register may not address the whole CSECT but that is why you can have multiple base registers. As Robert points out, it is not necessary to have base registers any more since you can use jump instead of branch, and use of immediate instructions for referencing short static data, and put everything you can't get from immediate instructions into a static CSECT which uses a non-dedicated base register and a DSECT for just the data, but somehow that seems impractical to me, probably because I've never tried to do it.[/quote]
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Sat Aug 15, 2009 9:20 pm    Post subject: Reply to: Free space in program .
Reply with quote

the statement as stated is just plain wrong
csect size and number of base registers are UNRELATED
all depends on the techniques being used

for a beginner it might be easier to use as many registers as needed ( csect_size / 4096 )
for a more experienced programmer not true
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Sun Aug 16, 2009 11:28 am    Post subject: Reply to: Free space in program .
Reply with quote

because the original question was related to addressability, I took "CSECT size" to mean "addressability within a CSECT", but strictly speaking, Enrico, you are correct that the way it is written states that the total length of the csect, not addresability within it, depends on the number of base registers and that statement, as written, is definitely wrong. I read too much into it.

It is not uncommon to have data areas at the end of a nonreentrant CSECT that are not addressable by the base registers which access the code but are addressed by index registers or temporary 'base' registers (pointers). An even more common case is a data only CSECT which has no base registers at all because it has no code.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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