Page 1 of 1

How to directly address memory in rexx ?

PostPosted: Mon Jan 18, 2010 11:06 pm
by parthiban
How to directly address memory in rexx ? can any one explain me with an example.it would helpful for me to learn










Thanks in advance!
Parthibanj

Re: How to directly address memory in rexx ?

PostPosted: Tue Jan 19, 2010 3:57 am
by Bill Dennis
Here is a simple one to look thru control blocks in memory and locate the SYSTEM ID
/* REXX                                                     
 | NAME: SYSID                                               
 */                                                         
                                                             
MTYPE = ADDRESS()                                           
                                                             
        CVT    = STORAGE(10,4)                               
        DCVT   = C2D(CVT)                                   
        SMCA   = STORAGE(C2X(D2C(DCVT+X2D(C5))),3)           
        DSMCA  = C2D(SMCA)                                   
        SYSTEMID = STORAGE(C2X(D2C(DSMCA+X2D(10))),4)       
     SAY SYSTEMID