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

Free space in program .


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

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Sun Aug 16, 2009 9:22 pm
Reply with quote

I guess discussion is moving in to CSECT size , and what i said is in context to my problem , wherein I need to find the frees space spared by the base registers.

CSECT size - Area(bytes) my base registers are capable to address. It can go way beyond 4096 if I use more than 1 BR.
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: Mon Aug 17, 2009 1:21 pm
Reply with quote

I am trying to read the listing of a compiled program in order to find an alternative of knowing the base registers . The program is having one CSECT only . In the following USING map , Registers 3,4,9,12 are for DSECT addressability and Registers 10 and 11 are the base registers declared for the CSECT .

So this CSECT is capable of addr 8192 bytes . Please correct me as I am just guessing and dont know how to decipher the USING map.
Code:

            Using Map                                               
                                                  HLASM R5.0  2009/08
--------Using----------------- Reg Max     Last Label and Using Text
      Value    Range     Id        Disp    Stmt                     
    00000000 00001000 FFFFFFFD   3 00036   8121 CURORDER,R03         
    00000000 00001000 FFFFFFFC   4 004C2   7854 BJ2DSHEZ,R04         
    00000000 00001000 FFFFFFFF   9 00C7E   7956 COMMAREA,R09         
    00000FFF 00001000 FFFFFFFF  12 00F3E   8080 COMMAREA+4095,R12   
    00000000 00001000 00000001  15 00014   5751 *,R15               
                                15              R15                 
    000                           Using Map              R10         
    000                                                  4095,R11   
       Action ----------------Using----------------- Reg             
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Aug 18, 2009 9:41 am
Reply with quote

This has been explained already, but a CSECT is just a block of memory that contains code and data. It does not address anything and the number of base registers used in the program has nothing to do with the total size of a CSECT. If you want the size of a CSECT, the USING MAP will not give you anything useful. I think you need to get the terminology correct because now it seems no one can figure out what you are asking.
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: Tue Aug 18, 2009 11:04 am
Reply with quote

icon_neutral.gif sorry i asked this question , but still cant understand what was so confusing in the question , Did no body ever find such a situation where a need to find the free space arose . I agree that there are special techniques as pointed by Enrico to address without base registers , But i have been asking right from the begining that my requirement is,given a set of base registers to establish the addresibilty ..is there any convinient way to find the free space .
Anyways thanks all for giving time in the discussion...this surely has given some valauble info icon_smile.gif ..but not a perfect solution icon_sad.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 18, 2009 2:12 pm
Reply with quote

Quote:
...but not a perfect solution


why blame others icon_evil.gif for Your unwillingness to ...
- listen and understand what is being told
- amend Your understanding of addressability and csect size
- learn the proper terminology , nothing as free space in a csect
- learn the basics, for donkey programming the number of base registers needed is csectsize/4096

since the beginning you were told that your question did not make sense.
no reason at all to complain
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: Tue Aug 18, 2009 7:36 pm
Reply with quote

Hello,

Quote:
Did no body ever find such a situation where a need to find the free space arose
No one that i've worked with or managed using various assemblers has needed/wanted this. . .

We still don't understand why you believe you need this. . .

Actually, i'm not sure we understand just what you are looking for . . .

Keep in mind that while your question is completely clear and logical to you, it has not been to others.
Back to top
View user's profile Send private message
milind suman
Warnings : 1

New User


Joined: 19 Aug 2009
Posts: 55
Location: Pune

PostPosted: Tue Aug 25, 2009 1:44 pm
Reply with quote

If I understand this question correctly , Assuming the question is about the addressability and by free space you mean the space left within USING range with a set of base registers . Keeping apart some exceptional cases as mentioned by the senior members above , Follow these steps to calculate the Bytes you can insert in your program so that not to get the compilation error ' Beyond active using range' :

1) Find your CSECT with type SD, Its length and ID in External symbol dic. of listing :

Code:
ยป                                                                     
                                               External Symbol Dictiona
 Symbol   Type   Id     Address  Length   Owner Id Flags Alias-of     
 PGMXYZ    SD 00000001 00000000 00000000             00               
 ABC       SD 00000002 00000000 00000018             00               
 XYZ       SD 00000003 00000018 0000001A             00               


2) Next , Map the ID number in USING MAP and find the total registers allocated
Code:
         Using Map                                   
                                               HLASM R
-----Using----------------- Reg Max     Last Label and
   Value    Range     Id        Disp    Stmt         
 00000006 00001000 00000002   3 00010      9 *,3,4   
 00001006 00001000 00000002   4 00000                 
 0000001E 00001000 00000003   5 00010     22 *,5,6   
 0000101E 00001000 00000003   6 00000                 


e.g csect xyy - id - 00003 ,length - 1A , base registers 5 nd 6
space = 1000*2 - 1A

This might not be a generic way , and may require some observation in using map . But with your requirement this will help you to reach the conclusion in short cut .
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 Goto page 1, 2  Next

 


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 DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top