Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Change a string using macro & submit via a batch job - h

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
crazyf1

New User


Joined: 05 May 2006
Posts: 27

PostPosted: Fri May 05, 2006 2:32 pm    Post subject: Change a string using macro & submit via a batch job - h
Reply with quote

I am just new with REXX programming and would want to do this as I am always getting a RC(-3)

Thanks

Objective:
From an input dataset, i want to change all READ,WRITE,ALLOC into R,W,A and del all EXEC

REXX
----------------------------
Code:

/**REXX**************************************
********************************************/
 PARSE ARG DSNAME MACRO1                     
 ADDRESS ISPEXEC                             
 "EDIT DATASET('"DSNAME"') MACRO("MACRO1")" 
 EXIT                                       


MACRO - MACRO01
-----------------------------------
Code:

/* REXX */                   
ISREDIT MACRO               
ISREDIT CHANGE READ R ALL   
ISREDIT CHANGE WRITE W ALL   
ISREDIT CHANGE ALLOC A ALL   
ISREDIT CHANGE EXEC(L) '' ALL
ISREDIT CHANGE EXEC(A) '' ALL
END                         


JCL
-------------------------------------
Code:

//REXPROC1 PROC                                         
//STEP010  EXEC PGM=IKJEFT01,DYNAMNBR=20,               
//         PARM='%EDITREXX &ARG01 &ARG02'               
//SYSPRINT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//SYSTSPRT DD SYSOUT=(G,,JOHN)                           
//SYSTSIN  DD DUMMY                                     
//SYSPROC  DD DSN=TSGP.PDS.JASON.WORK.REXX,DISP=SHR     
//         PEND                                         
//STEP01   EXEC REXPROC1,ARG01=TSGS.TEST.IDS,ARG02=MACRO01
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri May 05, 2006 6:25 pm    Post subject: Re: Change a string using macro & submit via a batch job
Reply with quote

OK.

#1.
Code:

/* REXX */                   
ISREDIT MACRO               
ISREDIT CHANGE READ R ALL   
ISREDIT CHANGE WRITE W ALL   
ISREDIT CHANGE ALLOC A ALL   
ISREDIT CHANGE EXEC(L) '' ALL
ISREDIT CHANGE EXEC(A) '' ALL
END                         

This is NOT valid REXX code, and your ISPF Editor indicates such. ISREDIT and END are not valid REXX constructs. It is, however, valid CLIST code (minus the /* REXX */ statement, of course).

#2.
In your JCL, I don't see any ISPSTART command to invoke ISPF or any DD allocations for the requisite ISPF libraries (ISPLLIB, ISPPLIB, ISPSLIB, ISPMLIB, ISPPROF, ISPTABL, ISPTLIB, ISPLOG, ISPLIST).

For more details on the ISPSTART command, see here in the z/OS V1R7.0 ISPF Dialog Developer's Guide.
Back to top
View user's profile Send private message
crazyf1

New User


Joined: 05 May 2006
Posts: 27

PostPosted: Fri May 05, 2006 8:25 pm    Post subject:
Reply with quote

if I am to invoke this as a CLIST, do i need to have ISPSTART command in my jcl?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri May 05, 2006 8:39 pm    Post subject: Re: Change a string using macro & submit via a batch job
Reply with quote

You only need to invoke ISPSTART if you want to use ISPF services.
Back to top
View user's profile Send private message
crazyf1

New User


Joined: 05 May 2006
Posts: 27

PostPosted: Sun May 07, 2006 8:08 pm    Post subject:
Reply with quote

Where do i put ISPSTART in my jcl? do i need to also to do DD allocations for the requisite ISPF libraries? or can i just use ISPSTART?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon May 08, 2006 3:04 am    Post subject: Re: Change a string using macro & submit via a batch job
Reply with quote

here is a great example of an IPSF batch job in the z/OS V1R7.0 ISPF Dialog Developer's Guide.
Back to top
View user's profile Send private message
crazyf1

New User


Joined: 05 May 2006
Posts: 27

PostPosted: Mon May 08, 2006 8:59 am    Post subject:
Reply with quote

thank you very much! icon_smile.gif
Back to top
View user's profile Send private message
crazyf1

New User


Joined: 05 May 2006
Posts: 27

PostPosted: Mon May 08, 2006 12:40 pm    Post subject:
Reply with quote

Can someone please help with this... getting a MAXCC=12
Also, I tried searching for my id (using 3.4) and it seems only 'T62811.ISPF.ISPPROF' is only available... so i tried using DUMMY/SYSOUT=* however, job failed.
Code:

//TSOBTCH1  EXEC PGM=IKJEFT01                   
//ISPPROF   DD DSN=TS62811.ISPF.ISPPROF,DISP=SHR
//ISPPLIB   DD DSN=ISP.SISPPENU,DISP=SHR       
//ISPMLIB   DD DSN=ISP.SISPMENU,DISP=SHR       
//ISPSLIB   DD DSN=ISP.SISPSENU,DISP=SHR       
//          DD DSN=ISP.SISPSLIB,DISP=SHR       
//ISPTLIB   DD DSN=TS62811.ISPF.TABLES,DISP=SHR
//ISPTLIB   DD DSN=ISP.SISPTENU,DISP=SHR       
//               DD DSN=ISP.SISPTLIB,DISP=SHR       
//ISPTABL   DD DSN=TS62811.ISPF.TABLES,DISP=SHR
//ISPLOG    DD DSN=TS62811.ISPF.LOG,DISP=SHR   
//ISPLLIB   DD DSN=TS62811.ISPF.LOAD,DISP=SHR 
//SYSEXEC   DD DSN=ISP.SISPEXEC,DISP=SHR           
//SYSPROC   DD DSN=TSGP.PDS.JASON.WORK.REXX,DISP=SHR
//SYSPRINT  DD SYSOUT=*                             
//SYSOUT    DD SYSOUT=*                             
//SYSTSPRT  DD SYSOUT=*                             
//SYSTSIN   DD *                                   
  PROFILE PREFIX(TS62811)                           
  ISPSTART CMD(%EDITREXX TSGS.TEST.IDS MACRO1)     
/*                                                 


TSGS.TEST.IDS ---> Dataset i want to edit
MACRO1 ----> Macro that will edit the dataset
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon May 08, 2006 5:44 pm    Post subject: Re: Change a string using macro & submit via a batch job
Reply with quote

Please post the error message(s).
Back to top
View user's profile Send private message
crazyf1

New User


Joined: 05 May 2006
Posts: 27

PostPosted: Tue May 09, 2006 10:30 am    Post subject:
Reply with quote

I am getting a MAXCC=12 abend 0C4 using this JCL. i really can't find any library allocated to my ispf.
Using 3.4 and searching for my id as HLQ

    TS62811.CPPTEMP1.SCPPWORK
    TS62811.CPPTEMP2.SCPPWORK
    TS62811.CPPTEMP3.SCPPWORK
    TS62811.HCD.MSGLOG
    TS62811.HCD.TERM
    TS62811.HCD.TRACE
    TS62811.ISPF.ISPPROF
    TS62811.ISPF.ISPPROF.CPUG
    TS62811.LOG.MISC
    TS62811.SPFLOG1.LIST
    TS62811.SPFTEMP0.CNTL
    TS62811.SRCHFOR.LIST
    TS62811.SUPERC.LIST


JCL <-- substituted all files with SYSOUT=*
---------------------------------------------------------------
Code:

//TSOBTCH1  EXEC PGM=IKJEFT01                   
//ISPPROF   DD SYSOUT=*
//ISPPLIB   DD DSN=ISP.SISPPENU,DISP=SHR       
//ISPMLIB   DD DSN=ISP.SISPMENU,DISP=SHR       
//ISPSLIB   DD DSN=ISP.SISPSENU,DISP=SHR       
//*          DD DSN=ISP.SISPSLIB,DISP=SHR       
//ISPTLIB   DD SYSOUT=*
//ISPTLIB   DD DSN=ISP.SISPTENU,DISP=SHR       
//               DD DSN=ISP.SISPTLIB,DISP=SHR       
//ISPTABL   DD SYSOUT=*
//ISPLOG    DD SYSOUT=*   
//ISPLLIB   DD SYSOUT=* 
//SYSEXEC   DD DSN=ISP.SISPEXEC,DISP=SHR           
//SYSPROC   DD DSN=TSGP.PDS.JASON.WORK.REXX,DISP=SHR
//SYSPRINT  DD SYSOUT=*                             
//SYSOUT    DD SYSOUT=*                             
//SYSTSPRT  DD SYSOUT=*                             
//SYSTSIN   DD *                                   
  PROFILE PREFIX(TS62811)                           
  ISPSTART CMD(%EDITREXX TSGS.TEST.IDS MACRO1)     
/*                               
[/list]
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us