Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Rexx tool for deleting a particular step in jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Rexx tool for deleting a particular step in jcl
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

Senior Member


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

PostPosted: Wed Apr 22, 2009 6:40 pm    Post subject: Reply to: Rexx tool for deleting a particular step in jcl
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    Post subject:
Reply with quote

maybe using IEBEDIT (Edit Job Stream) Program

found at:
http://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

Site Director


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

PostPosted: Fri Apr 24, 2009 10:12 pm    Post subject: Reply to: Rexx tool for removing a step from JCL.
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    Post subject: Reply to: Rexx tool for deleting a particular step in jcl
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us