IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Rexx tool for deleting a particular step in jcl


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sabarishas2k

New User


Joined: 09 Jan 2009
Posts: 3
Location: Kerala

PostPosted: Wed Apr 22, 2009 5:44 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Apr 22, 2009 6:40 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Apr 22, 2009 6:51 pm
Reply with quote

maybe using IEBEDIT (Edit Job Stream) Program

found at:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt2u111/CONTENTS?SHELF=EZ2ZO108&DT=20020722161259#5.0

sorry, i don't think the above does not deal with procs

too bad you did not save your original jcl.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 24, 2009 10:12 pm
Reply with quote

Hello,

Do not post the same question multiple times. . .

d
Back to top
View user's profile Send private message
sabarishas2k

New User


Joined: 09 Jan 2009
Posts: 3
Location: Kerala

PostPosted: Fri Apr 24, 2009 10:19 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 24, 2009 11:20 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top