Page 1 of 2

Run ISREDIT in Batch

PostPosted: Fri Mar 11, 2011 4:09 pm
by storage
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...

Re: Run ISREDIT via REXX

PostPosted: Fri Mar 11, 2011 4:12 pm
by enrico-sorichetti
//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

Re: Run ISREDIT via REXX

PostPosted: Fri Mar 11, 2011 4:51 pm
by storage
I tried IKJEFT01 but that also didnt work...any sample job to run ISPF for batch.

Re: Run ISREDIT via REXX

PostPosted: Fri Mar 11, 2011 5:04 pm
by NicC
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.

Re: Run ISREDIT in Batch

PostPosted: Fri Mar 11, 2011 6:29 pm
by storage
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

Re: Run ISREDIT in Batch

PostPosted: Fri Mar 11, 2011 6:42 pm
by Robert Sample
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.

Re: Run ISREDIT in Batch

PostPosted: Mon Mar 14, 2011 2:38 pm
by storage
What is the advantage of using below?

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

Re: Run ISREDIT in Batch

PostPosted: Mon Mar 14, 2011 2:49 pm
by prino
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.

Re: Run ISREDIT in Batch

PostPosted: Mon Mar 14, 2011 5:34 pm
by storage
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

Re: Run ISREDIT in Batch

PostPosted: Mon Mar 14, 2011 6:03 pm
by NicC
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.