View previous topic :: View next topic
|
Author |
Message |
sabarishas2k
New User
Joined: 09 Jan 2009 Posts: 3 Location: Kerala
|
|
|
|
Hi, Any one created a rexx tool for deleting a particular step in jcl or proc. eg: in our jcl we have put a bridge step for converting some steps in some 1000 procs, So we need to delete that particular step from that jcl manually rather than delete it manually. So if you please provide a similar rexx tool for that it would be helpful. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
we need to delete that particular step from that jcl manually rather than delete it manually |
It is not clear what you mean. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Do not post the same question multiple times. . .
d |
|
Back to top |
|
|
sabarishas2k
New User
Joined: 09 Jan 2009 Posts: 3 Location: Kerala
|
|
|
|
I have made a mistake in my query.. Actual requirement is
we have inserted a bridge step for converting some files.The same step is inserted in some 1000 procs. Now we need to delete that bridge step. Deleting that step in these 1000 procs manually is a tedious task. It would be very helpful if any one provide a rexx tool, or tell me how to create a rexx tool for solving this issue. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
REXX Documentation
Pick your O/S type and download the documentation so that you can understand the following.
This Script places all member names of a PDS into a variable,
Script name is GETMBRSR:
Code: |
/* REXX */
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT MACRO
/****************************************************************/
/* GETMEMBERS */
/* */
/* WILL BUILD A TABLE CONTAINING ALL MEMBER OF THE PDS THAT YOU */
/* ARE CURRENTLY EDITING */
/* */
/****************************************************************/
"ISREDIT ("DATA1") = DATAID"
"ISREDIT ("CURMEM") = MEMBER"
"ISREDIT ("PDSNAME") = DATASET"
/* */
ADDRESS ISPEXEC "LMOPEN DATAID("DATA1") OPTION(INPUT)"
LMRC = RC
IF LMRC <> 0 THEN
DO
SAY BAD LMOPEN LMRC
ISPEXEC "LMCLOSE DATAID("DATA1")"
ISPEXEC "LMMLIST DATAID("DATA1") OPTION(FREE)"
EXIT
END
/* */
MBRNAME= ' '
LMRC = 0
MBRLIST = ''
TRACE ?R
DO WHILE LMRC = 0
ISPEXEC "LMMLIST DATAID("DATA1,
") OPTION(LIST) MEMBER(MBRNAME,
) STATS(NO)"
LMRC = RC
IF LMRC = 0 THEN
DO
MBRLIST = MBRLIST||MBRNAME||'#'
END
END
ISPEXEC "LMMLIST DATAID("DATA1") OPTION(FREE)"
ISPEXEC "LMCLOSE DATAID("DATA1")"
ISPEXEC "VPUT (MBRLIST) SHARED"
EXIT
|
The next is a REXX Macro, CALLMBRS, will access the variable - MBRLIST,
and invoke and EDIT SESSION for each member with an Initial Macro called DOTHIS.
Code: |
/* REXX */
/* */
/* CALLMBRS */
/* */
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT MACRO
"ISREDIT READ$MSG"
"ISREDIT GETMBRSR"
ISPEXEC "VGET (MBRLIST) SHARED"
ISPEXEC "VERASE (MBRLIST) SHARED"
PTR = 1
LISTLEN = LENGTH(MBRLIST)
/* TRACE ?R */
DO WHILE PTR < LISTLEN
MSGZU = SUBSTR(MBRLIST,PTR,8)
AUFRUF = STRIP(MSGZU)
"ISPEXEC EDIT DATASET('YYOE.DISPAT.COBOL("AUFRUF")') MACRO(DOTHIS)"
END
PTR = PTR + 9
END
EXIT
|
your IMAC - DOTHIS will find your unwanted step and remove the step.
yes, you have to code your own DOTHIS REXX MACRO
this can be done a million ways (GETMBRSR and CALLMBRS),
this just happens to be what I wanted.
you could combine GETMBRSR and CALLMBRS, modify the arguments and make yourself a new REXX Script which would not be a macro, and you would not need to edit/view the PDS.
have fun.
By the way, in the two days that you wasted waiting on an answer, you could have done the task by hand. |
|
Back to top |
|
|
|