MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Tool to search a string in all programs

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kappurajesh
Beginner


Joined: 29 Mar 2004
Posts: 19
Topics: 13
Location: India

PostPosted: Tue May 04, 2004 11:48 am    Post subject: Tool to search a string in all programs Reply with quote

If I have 600 Cobol Program, I want to search Pic x(10) is located within 600 program, and display the file name


And more doubts when I am transfering data from VSAM to DB2 for one lakh record. How long it takes time meanwhile can I use VSAM files
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 04, 2004 12:41 pm    Post subject: Reply with quote

Kappurajesh,

Try to post topics with meaningful titles. Your title " which tool used" is not apt. A better title would be " Tool to search a string in programs" . I am editing the title.

Quote:

If I have 600 Cobol Program, I want to search Pic x(10) is located within 600 program, and display the file name


Did you mean display program name? Assuming that you have all your programs in a pds, then the following JCL will give you desired results.

Code:

//SEARCH  EXEC PGM=ISRSUPC,                                           *
//            PARM=(SRCHCMP,                                           
//            '')                                                       
//NEWDD  DD DSN=YOUR.PDS.WITH.PROGRAMS,                                   
//          DISP=SHR                                                   
//OUTDD  DD SYSOUT=(*)                                                 
//SYSIN  DD *                                                           
SRCHFOR  'PIC X(10)'                                                   
/*                                   


You can do the same thing with 3.14 or 3.15 option. You can also use SORT, FILE-AID to search a string. 3.14 and 3.15 options are present in all mainframes, but yout might not have file-aid and sort at every shop.

Quote:

And more doubts when I am transfering data from VSAM to DB2 for one lakh record. How long it takes time meanwhile can I use VSAM files


Most people in USA barring Indians are not used to the term Lakh. So please code the number when you are referring lakhs and crores.

Just for reference of members who are not aware of terms lakh & crores.
Code:

1 Lakh is equivalent to hundred thousand(1,00,000 (one lakh) = 100,000 (one hundred thousand))

10 Lakhs is equivalent to a one Million(10,00,000 (10 lakh) = 1,000,000 (1 million))

1 Crore is 100 lakhs which is 10 Million( 1,00,00,000 (1 crore) = 10,000,000 (10 million))

Now back to your question.

The time depends on the way you are transferring the records to DB2. If you are using a load utility then the time taken will be less when compared to program reading the file and inserting into to the table. The use of the vsam file while transfering the contents to DB2 will be depend on the SHAREOPTIONS parm while defining the vsam cluster.

search for SHAREOPTIONS in this link

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt1v403/3.7.1.2?SHELF=&DT=19990113080956&CASE=

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mfjin
Beginner


Joined: 26 Apr 2003
Posts: 94
Topics: 17

PostPosted: Tue May 04, 2004 3:55 pm    Post subject: Reply with quote

Quote:
. You can also use SORT, FILE-AID to search a string


Kolusu,
How can be SORT be used to search for strings?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 04, 2004 4:22 pm    Post subject: Reply with quote

mfjin,

You can use substring(SS) option of sort to scan for the string, since you don't know the position of the string. It would be a tedious job as you have concatenate all the members to sortin.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mfjin
Beginner


Joined: 26 Apr 2003
Posts: 94
Topics: 17

PostPosted: Tue May 04, 2004 4:26 pm    Post subject: Reply with quote

Got it Kolusu

Cheers mate !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group