View previous topic :: View next topic
|
Author |
Message |
sath_vino
New User
Joined: 15 Apr 2009 Posts: 3 Location: India
|
|
|
|
I'm Trying to find a string inside a Load-module without opening the member(load-module).
Say For Eg. If my program name is M102345A, I need to find number of occurances of M102345A inside the load-module of this program.
Please help me to solve this. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
open the load module in browse,
do a find all
upper right of your screen will indicate number of hits.
I personally do not know how to read a load module with REXX,
nor have I tried to invoke an edit session for a load module,
which is RECFM=U.
a more knowledgeable rexx person may offer you a solution. |
|
Back to top |
|
|
sath_vino
New User
Joined: 15 Apr 2009 Posts: 3 Location: India
|
|
|
|
Thanks for your suggestion...
We cant open load-module in edit mode, it will automatically substitute browse mode.
Can we do this without Opening the Member? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Didn't we see this exact same topic last week? And wasn't the recommended solution to use the SUPERC program for the search? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Of course not. . .
One way or another, there has to be an "open" in order for there to be a "read".
You should be able to do what you need using the searchfor opton of superc. . .
Quote: |
I need to find number of occurances of M102345A inside the load-module |
What value is there in knowing the number of occurrances? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Sorry 'bout that, Kevin
I'd opened this and started the reply and then was called away for a while. . .
d |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Your question isn't clear. What are you trying to do exactly? A load module on disk contains lots of information that will not be in storage when the load module is loaded. If you really want to scan the image that is on disk, copy it to another file that EXECIO can read. For example, copy it to a Unix file (USS) and back to a fixed file. Don't forget to account for the places where the string might start at the end of one 'record' and continue to the next 'record'.
If you want to see what it will look like in storage, you need to load it and get the address of the loaded storage which you can't do in pure rexx(*) but some programs like ISRDDN can load a module and show you the storage.
* technically, you probably can do it using TSO TEST commands, or some other programmable debugger but don't bother. |
|
Back to top |
|
|
sath_vino
New User
Joined: 15 Apr 2009 Posts: 3 Location: India
|
|
|
|
I think, I am not clear. Sorry for all the confusion.
Here is my requirement:
In my project, the production version will be identified with the level number. Say, there are 2 versions of program, M10245A1M and M10245A1T with level number as 115 and 120 respectively.
If the version A1T is in production, then the load-module will have "120M10245A1T". So to find the production version, we will search for the program and see the three digit before the program number as shown.
Given the Background, we need to find production version for some 200 programs which I though of doing it using Rexx.
Please note the occurance of the program will be in many place inside the load-module. So I need to do a Repeat-find till I get the level number.
Basically, I need to find the instant of the program and read the content by moving the cursor position 3 place towards left.
Somebody, please help me to implement this using Rexx. Thanks. |
|
Back to top |
|
|
|