MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Addressability issues for literals when using YREGS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mkusamy
Beginner


Joined: 07 Nov 2008
Posts: 9
Topics: 6

PostPosted: Tue Oct 27, 2009 9:44 am    Post subject: Addressability issues for literals when using YREGS Reply with quote

When YREGS macro is used to equate Register numbers before the first CSECT, addressability issues are coming for literals.

Test listings when using YREGS before the CSECT

Code:
 Active Usings: None                                                   
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement             
                                      1          PRINT NOGEN           
                                      2          YREGS                 
000008                00008 00068    21 YREGS1   CSECT                 
000008 90EC D00C            0000C    23          STM   R14,R12,12(R13) 
00000C 0DC0                          24          BASR  R12,0           
                 R:C  0000E          25          USING *,R12           
00000E 50D0 C01E            0002C    26          ST    R13,VSAVAREA+4   
000012 41D0 C01A            00028    27          LA    R13,VSAVAREA     
000016 0000 0000            00000    29          L     R2,=F'123'       
** ASMA307E No active USING for operand =F'123'                         
** ASMA435I Record 11 in ABC.XYZ.JOB00120.D0000101.? on volume:
00001A 58D0 D004            00004    31          L     R13,4(,R13)     
00001E 98EC D00C            0000C    32          LM    R14,R12,12(R13) 
000022 1BFF                          33          SR    R15,R15         
000024 07FE                          34          BR    R14             
000026 0000                                                             
000028 0000000000000000              36 VSAVAREA DC    18A(0)           
000008                               38          END   YREGS1   
000000 0000007B                      39                =F'123' 


In the above listing

1. Addressability issues have come for literal =F'123.
2. CSECT starts at loc 08. Why not starts at location 00?
3. Literal F'123' starts at location 00.


But this is not the case, when YREGS is used inside the CSECT.

Code:
  Active Usings: None                                                   
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement             
000000                00000 0006C     1 YREGS1   CSECT                 
                                      2          PRINT NOGEN           
                                      3          YREGS                 
000000 90EC D00C            0000C    23          STM   R14,R12,12(R13) 
000004 0DC0                          24          BASR  R12,0           
                 R:C  00006          25          USING *,R12           
000006 50D0 C01E            00024    26          ST    R13,VSAVAREA+4   
00000A 41D0 C01A            00020    27          LA    R13,VSAVAREA     
00000E 5820 C062            00068    29          L     R2,=F'123'       
000012 58D0 D004            00004    31          L     R13,4(,R13)     
000016 98EC D00C            0000C    32          LM    R14,R12,12(R13) 
00001A 1BFF                          33          SR    R15,R15         
00001C 07FE                          34          BR    R14             
00001E 0000                                                             
000020 0000000000000000              36 VSAVAREA DC    18A(0)           
000000                               38          END   YREGS1           
000068 0000007B                      39                =F'123'         


Of course, we can simply use YREGS inside the CSECT to fix this, but I would like to know the reasons behind this.

Can any one please clarify this? Thanks in advance!!
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Oct 27, 2009 1:24 pm    Post subject: Reply with quote

mkusamy,

you might want to take a look at this

http://www.ibm.com/support/docview.wss?uid=isg1PQ82515

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mkusamy
Beginner


Joined: 07 Nov 2008
Posts: 9
Topics: 6

PostPosted: Wed Oct 28, 2009 4:47 am    Post subject: Reply with quote

Thanks Kolusu! I would check with System guys to have this PTF.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group