On Mon, 8 Oct 2007 02:25:42 +0800, Johnny Luo wrote: >Actually took me some trouble to think of a way to accomplish this :) > >Reading directory of PDS/PDSE seems to be the solution, but it means a lot >of codes. > >LOAD it into jpa and then retrieve the info from CDE? Then I realized >that there is CSVQUERY. > >So my solution would be: > >1. First LOAD the module into JPA > >2. Retrieve the size of the module using CSVQUERY > >3. GETMAIN and do the real LOAD You are doing more work than you need to -- re-read the LOAD macro service documentation and pay more attention to what it returns in its registers. Specifically, pay attention to what it returns in register 0 and register 1 BUT ONLY IF register 15 has the expected/required return value. For example, your GETMAIN will need to be in the appropriate 31-bit/24-bit MODE (RMODE) and the hint for that is in the high-order bit of register 0. The GETMAIN length is derived from the low-order 3 bytes of register 1. (Be careful here: the length is DERIVED from the low-order 3 bytes -- you will need to do a little (simple) arithmetic AND pay attention to some special cases.) You only really need to use CSVQUERY if the low-order 3 bytes of register 1 are zero because the load module's length is greater than 16M, per the documentation. (And you might want to reconsider whether you really want that module loaded into dynamic ECSA if it is bigger than 16M... at least I would be more pensive under that condition.) -- Tom Schmidt Madison, WI
---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html