Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

automate searching loadlib data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: automate searching loadlib data
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    Post subject: Re: automate searching loadlib data
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    Post subject: Thank you
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Nov 22, 2007 4:19 pm    Post subject: Reply to: automate searching loadlib data
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us