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

How To Find a String inside a Load-module


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sath_vino

New User


Joined: 15 Apr 2009
Posts: 3
Location: India

PostPosted: Fri Apr 17, 2009 8:18 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 17, 2009 9:35 pm
Reply with quote

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
View user's profile Send private message
sath_vino

New User


Joined: 15 Apr 2009
Posts: 3
Location: India

PostPosted: Mon Apr 20, 2009 9:40 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Apr 20, 2009 9:52 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Apr 20, 2009 11:25 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Apr 20, 2009 11:27 pm
Reply with quote

Sorry 'bout that, Kevin icon_redface.gif

I'd opened this and started the reply and then was called away for a while. . .

d
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Mon Apr 20, 2009 11:36 pm
Reply with quote

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
View user's profile Send private message
sath_vino

New User


Joined: 15 Apr 2009
Posts: 3
Location: India

PostPosted: Wed Apr 22, 2009 3:59 pm
Reply with quote

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
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top