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 

Execute "Search" in Foreground using REXX !!
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Mon Nov 21, 2005 10:44 pm    Post subject: Execute "Search" in Foreground using REXX !! Reply with quote

Hi, I am coding a REXX which finds a string in a list of 2-3 dsns. I can do this using option 3.15 in ISPF, but I have a production requirement in which I need to execute the Search through REXX in Foreground and not through a Batch job execution of pgm ISRSUPC.
I have a production system and I cannot submit any job and so I need to execute search in foreground and I am doing it through REXX as I have to find a String in PARM datasets and the PARM member name in PROC datasets and the PROC member name in JCL datasets. This is the reason I need to automate the manual foreground search thru REXX. It is our project requirement.

Please let me know how can I achieve this/If this is not possible also do let me know.

Thanks,
Amit Joshi
Singapore.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Nov 22, 2005 2:27 am    Post subject: Reply with quote

amit4u79,

Check this link below.
http://mvsforums.com/helpboards/viewtopic.php?t=3271&highlight=isrsupc+rexx

All you need to do is to allocate the input & output files of SUPERC in your REXX itself (In Batch, JCL does this allocation for you). Then invoke the ISRSUPC program using ISPF SELECT command.

Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Nov 22, 2005 4:08 am    Post subject: Reply with quote

Hi Phantom,
First of all thanks a lot for your response. Actually my requirement is to take a file name search string then search the string in 3 PARM PDS datasets. Now get the PARM member name in which file name is found, search that PARM member in another 3 PROC PDS data sets. Get the corresponding PROC member name and search that PROC member in 3 JCL PDS data sets and list out the JCL member as output. I have done this using ISRSUPC in batch thru REXX, but I am not clear about your this response of using ISPF SELECT command. Can you kindly provide me some more detail keeping in mind my requirements.

Thanks a lot to all techfundoos for helping me.

Regards,
Amit Joshi.
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: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Nov 22, 2005 5:22 am    Post subject: Reply with quote

amit4u79,

You are asking for a cross reference listing of a parm. check this post

http://mvsforums.com/helpboards/viewtopic.php?p=9444#9444

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
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Nov 22, 2005 5:22 am    Post subject: Reply with quote

amit4u79,

Quote:

Can you kindly provide me some more detail keeping in mind my requirements.


Nothing bit at all. Instead of calling the ISRSUPC program via JCL, you call it from a REXX routine - online. The only thing you need to do before calling the program is to allocate all the input, output and sysout datasets using TSO ALLOC command and then issue a call to ISRSUPC from REXX.

Since you are calling online - REXX waits till ISRSUPC completes. Now take the output of first search, and again call ISRSUPC with the new PDS and new search string. Continue this process three times one PARM PDS, one for PROC PDS and once for JCL PDS.

In Batch, you will be having 3 steps. When you call via REXX, you will have everything embedded in your rexx program itself.

ISPF SELECT command is used to invoke a program from REXX.
Code:

  "ISPEXEC SELECT(pgm).....


Let me know if you need more information.

Thanks,
Phantom
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Nov 22, 2005 5:25 am    Post subject: Reply with quote

For more information on SELECT Service, Check this link.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISPZSG40/2.56?DT=20050713030339

Thanks,
Phantom
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Nov 22, 2005 11:51 am    Post subject: Reply with quote

Also note that (almost) anything you can call from JCL you can call through Rexx. Just allocate the ddnames to appropriate files and use either the program name, TSO CALL command, the ISPF EXEC PGM() PARM() commands, or any of several other methods to call the program. There is a general misunderstanding on this and other MVS boards that JCL does some magic that can not be reproduced online, but there is no magic. Allocate and invoke... that is all that JCL does and Rexx can do that and much, much more.
Back to top
View user's profile Send private message Visit poster's website
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Nov 22, 2005 9:47 pm    Post subject: Reply with quote

Hey Techfundoos thanks a lot for all your help.
I still have one issue while calling the search pgm ISRSUPC through REXX in Foreground. When I see the batch JCL generated for my search in 3.15 it looks like the one below :
Code:

//XXXXXX JOB (XXXXXX),'FILE REPORT',                   
//            MSGCLASS=O,NOTIFY=&SYSUID                   
//SEARCH  EXEC PGM=ISRSUPC,                               
//            PARM=(SRCHCMP,                             
//            '')                                         
//NEWDD  DD DSN=XXXXX.TEST.REXX,                         
//             DISP=SHR                                     
//             DD DSN=XXXXX.TEST.JCLLIB,                       
//             DISP=SHR                                     
//             DD DSN=YYYYY.TEST.REXX,                         
//             DISP=SHR                                     
//OUTDD  DD DSN=WWWWW.SRCHRSLT.OUT,
//             DISP=SHR                                   
//SYSIN  DD *                                             
SRCHFOR  'AMIT'                                           
SELECT  MEMBERS OF THE NEWDD DSNS
SELECT  MEMBERS OF THE NEWDD DSNS
SELECT  MEMBERS OF THE NEWDD DSNS
/*

I have 3 issues while calling "ISPEXEC SELECT PGM(ISRSUPC) PARM('SRCHCMP','')"

a) There are 3 DSNs in NEWDD DDName so should I use TSO ALLOC as 2nd ALLOC with same DDName will replace the first DSN and so only my last DSN would be actually allocated and CONCATD does not work in my shop. Is there any other way I can concatenate DSNs to the DDName NEWDD here ??
b) In the JCL there is a SYSIN Card, so how should I achieve this using REXX ??
c) Also the Search string in the JCL is shown in SYSIN Card, so how do I achieve this ?? Can I write the entire SYSIN Card to a PS Dataset and call ISRSUPC ?? Would this work ??

Kindly help me. I would be grateful for your helping response.

Thanks,
- Amit Joshi.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Nov 22, 2005 11:50 pm    Post subject: Reply with quote

Hey Techfundoos....please ignore my previous mail....i was able to use ISRSUPC with parms SRCHCMP and 'ANYC' in foreground for my search purpose.

But hey the response I get for all my tech issues is really heartening. Keep helping people.

My best luck to the forum.

Regards,
Amit Joshi
Singapore.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Nov 23, 2005 12:48 am    Post subject: Reply with quote

amit4u79,

Glad that we were able to help you out.

Thanks,
Phantom
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Wed Nov 23, 2005 7:35 am    Post subject: Reply with quote

Amit,

To concatenate datasets in the ALLOC command you do something like this:

Code:
ALLOC DD(NEWDD) DS('XXXXX.TEST.REXX',
                   'XXXXX.TEST.JCLLIB',
                   'YYYYY.TEST.REXX') SHR REUSE

_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Wed Nov 23, 2005 8:49 pm    Post subject: Reply with quote

Hi Mervyn, yes this is what I have exactly done. Thanks for your response. I really appreciate it.

Regards,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Thu Nov 24, 2005 4:23 am    Post subject: Reply with quote

Hey Techfundoos, I am hit with another issue while using foreground Search through REXX. If I give my search argument as lower case, the search shows me that there is no string matching my request.
I do not know why this is happening as I am calling ISRSUPC with PARMS(SRCHCMP,'ANYC') Options.
Also, when I saw a batch JCL which got generated thru 3.15, there is only this 2 PARMS passed to ISRSUPC.
Can someone help me with this small issue. I do not want to use REXX UPPER function as there might be scenarios where NEWDD dsns might contain the string in lower case and my search string in upper cases.

Regards,
Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
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: 12372
Topics: 75
Location: San Jose

PostPosted: Thu Nov 24, 2005 7:06 am    Post subject: Reply with quote

amit4u79,

your string will be translated to uppercase when you SUBMIT the job. So better the jcl to a dsn and use that to submit the job.

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
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Nov 24, 2005 11:07 am    Post subject: Reply with quote

What you have works for me. The following finds a the lower case 'lower' correctly:
Code:
//SEARCH  EXEC PGM=ISRSUPC,         
//            PARM=(SRCHCMP,'ANYC') 
//NEWDD  DD DSN=NADEL.PRIVATE.CNTL, 
//          DISP=SHR                 
//OUTDD  DD SYSOUT=(A)               
//SYSIN  DD *                       
SRCHFOR  'lower'                     
/*

and the corresponding Rexx exec also works:
Code:
/* rexx */
"ALLOC F(NEWDD) SHR REUSE DA('NADEL.PRIVATE.CNTL')"
"ALLOC F(OUTDD) DA(*) REUSE"
"ALLOC F(SYSIN) REUSE NEW DEL dso(ps) lrec(80) blks(0) recfm(f)"
"MAKEBUF"
Queue "SRCHFOR 'LOWER'   "
"EXECIO "queued()" diskw sysin (FINIS"
"CALL *(ISRSUPC) 'SRCHCMP,ANYC' "
"DROPBUF"
"FREE F(NEWDD OUTDD SYSIN)"



The ANYC option means that the case of the input does not matter. Are there any other messages at the bottom of the listing?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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