|
View previous topic :: View next topic
|
| Author |
Message |
milinangalia
New User
Joined: 26 Mar 2007 Posts: 4 Location: Bangalore
|
|
|
|
I have made following Rexx routine for 3.14 search utility
/*REXX CODE TO DO SEARCH FROM PDS */
ARG ABC
ADDRESS ISPEXEC CONTROL ERRORS RETURN
ADDRESS ISPEXEC
"VIEW DATASET('abc.JCLLIB(SRCH) MACRO(CH1)')"
MACRO CH1
ISREDIT MACRO(ABC)
ISREDIT CHANGE 'XXXXX' &ABC
abc.JCLLIB(SRCH) contains JCL for batch search utility where search string is coded like " SRCHFOR 'XXXXX' "
My Rexx routine opens the JCL in view mode but cannot replace 'XXXXX' with the argument received. Please tell me how I can do that. I tried with ISREDIT macro but not able to do. |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Are you sure that the code you posted is right?
Shouldn't it look more like this:
*REXX CODE TO DO SEARCH FROM PDS */
ARG ABC
ADDRESS ISPEXEC CONTROL ERRORS RETURN
ADDRESS ISPEXEC
"VPUT ABC"
"VIEW DATASET('abc.JCLLIB(SRCH)') MACRO(CH1)"
MACRO CH1
ISREDIT MACRO
VGET ABC
ISREDIT CHANGE 'XXXXX' &ABC |
|
| Back to top |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
or simply change
| Code: |
| "VIEW DATASET('abc.JCLLIB(SRCH)') MACRO(CH1)" |
to
| Code: |
| "VIEW DATASET('abc.JCLLIB(SRCH)') MACRO(CH1) PARM(&ABC)" |
O. |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Aw, jeez, now that's embarrassing.
When I was double-checking the BROWSE syntax, I used the ISPF BROWSE model as a reference, and I swear that the model doesn't show the PARM parameter. I'll have to double-check it when I can. |
|
| Back to top |
|
 |
milinangalia
New User
Joined: 26 Mar 2007 Posts: 4 Location: Bangalore
|
|
|
|
| Thanks superk . I have used VPUT and VGET in my Rexx code. Now its working. |
|
| Back to top |
|
 |
|
|