Run ISREDIT in Batch



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Run ISREDIT in Batch

Postby storage » Fri Mar 11, 2011 4:09 pm

Hi Everyone,

I have to make mass updates to various pds's,hence I have first run super search and got the members which needs to be updated.
Second step I have extracted the member name using rexx and next step I have written edit macro to make changes to the members.

Here's my code:

//STEP02 EXEC PGM=IRXJCL,PARM='TEST1'
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DISP=SHR,DSN=TEST.REXX.PDS
//IN DD DISP=SHR,DSN=TEST.SRCH.LIST
//SYSTSIN DD *
**************************************************************
TEST1
*****************************************************************
/*REXX */
TRACE(I)
"EXECIO * DISKR IN ( STEM INP. FINIS"
TOT=INP.0;CNT=1
DO VV=1 TO TOT
IF ((SUBSTR(INP.VV,41,15) = 'STRING(S) FOUND')) THEN
DO
MEM=SUBSTR(INP.VV,3,8)
OUTP.CNT=MEM ; CNT=CNT+1
FILENAME="TEST.TEST.PDS("STRIP(MEM)")"
ISPEXEC "EDIT DATASET('"FILENAME"') MACRO(SFIND)"
END
END

----------------------------------------------------------------------------

Since there would be many members which would need below edit macro I have used ISPEXEC "EDIT DATASET('"FILENAME"') MACRO(SFIND)" to run below macro

/* REXX */
"ISREDIT MACRO"
ADDRESS ISREDIT
"ISREDIT FIND TEST ALL"
"ISREDIT (FINDS) = FIND_COUNTS"
DO FINDS
"ISREDIT CHANGE * TEST1"
D1="This is test run"
"ISREDIT LINE_BEFORE .ZCSR =(D1)"
"ISREDIT END"
END

But I am getting the below error....
>O> "ISPEXEC EDIT DATASET('TEST.TEST.PDS(TEST1)') MACRO(SFIND)"
+++ RC(-3) +++

The macro is running fine when I do it manually..
Let me know if any further information is required.


Thanks...
storage
 
Posts: 28
Joined: Tue Nov 11, 2008 3:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run ISREDIT in Batch

 

Re: Run ISREDIT via REXX

Postby enrico-sorichetti » Fri Mar 11, 2011 4:12 pm

//STEP02 EXEC PGM=IRXJCL,PARM='TEST1'


You are running with IRXJCL which does not implement a full TSO environment
an most important You need to run not just under TSO , but also under ISPF control
search the forum on how to run ISPF in batch or ... look at
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IKJ4BK90
and
http://publibz.boulder.ibm.com/cgi-bin/ ... s/ISPZPM70
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Run ISREDIT via REXX

Postby storage » Fri Mar 11, 2011 4:51 pm

I tried IKJEFT01 but that also didnt work...any sample job to run ISPF for batch.
storage
 
Posts: 28
Joined: Tue Nov 11, 2008 3:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run ISREDIT via REXX

Postby NicC » Fri Mar 11, 2011 5:04 pm

Suggest you re-read Enrico's post - you cannot just run under TSO which is what IKJEFT01 is. You need to start ISPF. And there are examples in this section of the forum which will show you the way - as stated by Enrico.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Run ISREDIT in Batch

Postby storage » Fri Mar 11, 2011 6:29 pm

okay,I will check that...I was trying the below....

//STEP02 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EDIT 'TEST.MOVE' DATA NONUM
C 'TEST' 'TEST1' ALL
END SAVE

Can someone let me know where I can find the syntax for excuting other commands like the above...I mean where can I find which edit/other functions can be used under IKJEFT01...I tried to find some manual but couldnt get...


Also, if there are other ways to do my requirement please let me know..

Thanks
storage
 
Posts: 28
Joined: Tue Nov 11, 2008 3:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run ISREDIT in Batch

Postby Robert Sample » Fri Mar 11, 2011 6:42 pm

Finding manuals is not hard. Look at the IBM web site and search for "tso/e edit" It took less than 2 minutes to find http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ikjb400/ikj4b48092.htm and open up the Command Refernce on the left side of the screen. All the Edit subcommands are listed under Edit.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Run ISREDIT in Batch

Postby storage » Mon Mar 14, 2011 2:38 pm

What is the advantage of using below?

ISPEXEC "EDIT DATASET('"FILENAME"') MACRO(TEST)"
storage
 
Posts: 28
Joined: Tue Nov 11, 2008 3:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run ISREDIT in Batch

Postby prino » Mon Mar 14, 2011 2:49 pm

storage wrote:What is the advantage of using below?

ISPEXEC "EDIT DATASET('"FILENAME"') MACRO(TEST)"


It works, if you have set up an ISPF environment. Your code doesn't.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 536
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: Run ISREDIT in Batch

Postby storage » Mon Mar 14, 2011 5:34 pm

Thanks Prino for the clarification...

Can anyone let me know how to run ISPF macro in batch(batch JCL)...one sample job would be fine..

Thanks
storage
 
Posts: 28
Joined: Tue Nov 11, 2008 3:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Run ISREDIT in Batch

Postby NicC » Mon Mar 14, 2011 6:03 pm

Several examples in this section - have you looked? There is a search button and it gets quite annoyed if it is not used often - especially when it can find the answer quicker than waiting for someone to reply to YET ANOTHER request for an example.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Next

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post