Page 1 of 2

Search a copybook in different libraries

PostPosted: Mon Nov 19, 2012 2:21 pm
by ramya_MF
Hi Folks,

i have a requirement to develop a rexx tool. in cobol program, place the cursor over copybook and press enter it will search for that copybook in different libraries (most probably Test region,UAT,Production) then display the libraries that are having that copybook member.

Please suggest me how to achive this, i am able to search in one library by using SYSDSN function, but coming to multiple libraries i am not able to list the copy member found libraries.


Thanks,
Ramya

Re: Search a copybook in different libraries

PostPosted: Mon Nov 19, 2012 2:36 pm
by Pandora-Box
My suggestion

You might need to decide upon if you need to look at which version of copybook

Do the SYSDSN function in loop from DEV till PROD

Re: Search a copybook in different libraries

PostPosted: Mon Nov 19, 2012 2:45 pm
by ramya_MF
Thanks Pandora for your reply,

But my requirement like to list out all the copybook found libraries in a screen, then accept the user input, based on his input we need to expand the copybook from user selected library.

Re: Search a copybook in different libraries

PostPosted: Mon Nov 19, 2012 3:21 pm
by Pandora-Box
What you could do is

Search the libraries for identifying the presence of the copybook and if present store the values along with the library names in the ISPF table and display them.

Then using select the needed record and try to view it

Re: Search a copybook in different libraries

PostPosted: Mon Nov 19, 2012 3:48 pm
by ramya_MF
Yes very good idea Pandora,

if you dont mind can u please share the related links or related code to store the libraries in a panel??? because till now i did not have experience on ISPF tables.

Re: Search a copybook in different libraries

PostPosted: Mon Nov 19, 2012 10:20 pm
by Pedro
identifying the presence of the copybook and if present store the values


I think you should display all of the copybook libraries in an ISPF table, with an indication of which have the member and which do not.

Re: Search a copybook in different libraries

PostPosted: Tue Nov 20, 2012 12:09 am
by Pandora-Box
Pedro,

I thought why display the all copybooks libraries even if it doesn't contain the member

So user can select only those present and which he needs

Also we wont be confusing

But It doesnt ring any bell for me if you said that for some other purpose

Re: Search a copybook in different libraries

PostPosted: Tue Nov 20, 2012 1:11 am
by NicC
I just display the relevant libraries. The list of libraries searched is available via Help.
Ramya, save the libraries that need to presented to the user in a stem. When you have finished searching then build a table. Refer to the Dialogue Developers Guide and Reference

Re: Search a copybook in different libraries

PostPosted: Tue Nov 20, 2012 10:33 am
by ramya_MF
Yes NicC, I need to display the relevent libraries only. No need to display all the libraries.

Re: Search a copybook in different libraries

PostPosted: Tue Nov 20, 2012 7:18 pm
by Pedro
My preference to display all of the libraries was in case you determine that the member is missing from a library where it is supposed to be.