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

automate searching loadlib data


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sks_tvpm

New User


Joined: 21 Nov 2005
Posts: 5

PostPosted: Thu Apr 27, 2006 1:25 pm
Reply with quote

Hi,

I have a requirement to search a string the loadlib of a cobol program.

I tried to open and read the loadlib member using EXECIO. This returned error since the loadlib pds is an unformatted one.

I able to open and view the member using the code given below.
OPEN_MEMBER:
ADDRESS ISPEXEC " VIEW DATASET ("TEMPNAME")"
ADDRESS TSO " FREE "
RETURN

But I actually want to automate the search rather than mannually opening and searching.
I tried to use OUTTRAP before ADDRESS ISPEXEC " VIEW DATASET ("TEMPNAME")" , but that also didn't work.

I would appreciate if anyone can help me to solve this problem.

thanks n regards
sks_tvpm
Back to top
View user's profile Send private message
antonrino.b

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Sun May 28, 2006 4:21 pm
Reply with quote

Hi,

Try reading the loadlib using the lmget service of ISPF. Find below a sample REXX routine to get the records from loadlib.

Code:
/*rexx*/                                                 
dsn1=anton.sample.load
"ispexec lminit   dataid(lmd1) dataset('"dsn1"')"         
"ispexec lmopen dataid("lmd1")"                           
"ispexec lmmfind dataid("lmd1") member(mymember)"         
"ispexec lmget dataid("lmd1") mode(invar) dataloc(inrec),
    datalen(inlen) maxlen(20000)"                         
    say inlen                                             
    say inrec                                             
"ispexec lmfree   dataid("lmd1")"     



lmget should be preceded by lmmfind.

Replace the following in the above code as per your requirement.

dsn1 - your load library
mymember - the member name which you want to read
maxlen - maximum length of the record in your load library

the record will be read into variable inrec. and the length of the record read will be stored into inlen.


Hope this would help.

Thanks and Regards,
Antu
Back to top
View user's profile Send private message
sks_tvpm

New User


Joined: 21 Nov 2005
Posts: 5

PostPosted: Thu Nov 22, 2007 4:16 pm
Reply with quote

icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 22, 2007 4:19 pm
Reply with quote

Quote:
I have a requirement to search a string the loadlib of a cobol program.


The ISPF searchfor utility will happily scan LOAD libraries...

the return code will tell if the string was found,
customizing the output You will simply get a member list with the indication whether the string was found or not
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top