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

Getting problem in submitting macro via batch


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Tue May 26, 2009 7:09 pm
Reply with quote

Hi,

I am new to macros and i am getting below error when i am submitting via batch. I have used the ISPF libraries in the JCL by looking via ISRDDN, kept the macro in ISRDDN specified library. Could some one help me out where i am wrong?

Error:
------
Code:

READY                                               
 ISPSTART CMD(%CHK1 AAAAAA.COPYBACK)               
     3 *-* ADDRESS ISREDIT                           
     4 *-* 'MACRO'                                   
       >L>   "MACRO"                                 
       +++ RC(20) +++                               
     5 *-* "CHG SEN THI ALL"                         
       >L>   "CHG SEN THI ALL"                       
       +++ RC(20) +++                               
     6 *-* 'END'                                     
       >L>   "END"                                   
       +++ RC(20) +++                               
 AAAAAA.CPU1.SPFLOG1.LIST has been kept.           
READY                                               
END                                                 


Macro:
--------
Code:

/*REXX*/             
TRACE I               
ADDRESS ISREDIT       
'MACRO'               
"CHG SEN THI ALL"     
'END'                 


JCL:
----
Code:

//S020     EXEC PGM=IKJEFT01                                           
//ISPPROF  DD DISP=(,DELETE),UNIT=SYSDA,SPACE=(TRK,(5,5,10)),           
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120)             
//ISPLLIB  DD DSN=DB2ACCT.QMF.SDSQLOAD,DISP=SHR                         
//         DD DSN=SYS9.MQ.Q2.SCSQAUTH,DISP=SHR                         
//         DD DSN=MQ2P.MA10.LOAD,DISP=SHR                               
//SYSEXEC  DD DSN=AAAAAA.ISPF.EXEC,DISP=SHR                           
//         DD DSN=CIPDEV.ISPF.EXEC,DISP=SHR                             
//         DD DSN=SYSSHR.CPU1.ISPEXEC,DISP=SHR                         
//         DD DSN=SYSSHR.CIP.ISPEXEC,DISP=SHR                           
//         DD DSN=SYSSHR.EDC.ISPEXEC,DISP=SHR                           
//         DD DSN=SYSSHR.EDC.ISPEDMAC,DISP=SHR                         
//         DD DSN=SYS1.SISPEXEC,DISP=SHR                               
//SYSPROC  DD DSN=AAAAAA.ISPF.CLIST,DISP=SHR                           
//         DD DSN=CIPDEV.ISPF.CLIST,DISP=SHR                           
//         DD DSN=SYSSHR.CIP.ISPCLIB,DISP=SHR                           
//         DD DSN=SYSSHR.EDC.ISPCLIB,DISP=SHR                           
//         DD DSN=SYS1.SISPCLIB,DISP=SHR                               
//         DD DSN=SYS1.SBLSCLI0,DISP=SHR                               
//         DD DSN=SYS3.PROJCL.PPJEXEC,DISP=SHR                         
//ISPMLIB  DD DSN=AAAAAA.ISPF.MSGS,DISP=SHR                           
//         DD DSN=CIPDEV.ISPF.MSGS,DISP=SHR                       
//         DD DSN=SYSSHR.CIP.ISPMLIB,DISP=SHR                     
//         DD DSN=SYSSHR.EDC.ISPMLIB,DISP=SHR                     
//         DD DSN=SYS1.SISPMENU,DISP=SHR                           
//         DD DSN=SYS1.SISFMLIB,DISP=SHR                           
//         DD DSN=SYS1.SBPXMENU,DISP=SHR                           
//ISPPLIB  DD DSN=AAAAAA.ISPF.PANELS,DISP=SHR                     
//         DD DSN=CIPDEV.ISPF.PANELS,DISP=SHR                     
//         DD DSN=SYSSHR.CPU1.ISPPLIB,DISP=SHR                     
//         DD DSN=SYSSHR.CIP.ISPPLIB,DISP=SHR                     
//         DD DSN=SYSSHR.EDC.ISPPLIB,DISP=SHR                     
//         DD DSN=SYS1.SISPPENU,DISP=SHR                           
//         DD DSN=SYS1.SISFPLIB,DISP=SHR                           
//         DD DSN=SYS1.SBPXPENU,DISP=SHR                           
//         DD DSN=SYS3.DV.CAIISPP,DISP=SHR                         
//         DD DSN=MQ2P.MA10.ISPPENU,DISP=SHR                       
//ISPSLIB  DD DSN=AAAAAA.ISPF.SKELS,DISP=SHR                     
//         DD DSN=CIPDEV.ISPF.SKELS,DISP=SHR                       
//         DD DSN=SYSSHR.CIP.ISPSLIB,DISP=SHR                     
//         DD DSN=SYSSHR.EDC.ISPSLIB,DISP=SHR                     
//         DD DSN=SYS1.SISPSENU,DISP=SHR                             
//         DD DSN=SYS1.SISPSLIB,DISP=SHR                             
//SYSUADS  DD DSN=SYS1.UADS,DISP=SHR                                 
//SYSHELP  DD DSN=SYS1.HELP,DISP=SHR                                 
//ISPTABL  DD DISP=(,DELETE),UNIT=SYSDA,SPACE=(TRK,(5,5,10)),         
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120)           
//ISPTLIB  DD DSN=AAAAAA.ISPF.TABLES,DISP=SHR                       
//         DD DSN=CIPDEV.ISPF.TABLES,DISP=SHR                         
//         DD DSN=SYSSHR.CPU1.ISPTLIB,DISP=SHR                       
//         DD DSN=SYSSHR.EDC.ISPTLIB,DISP=SHR                         
//         DD DSN=SYS1.SISPTENU,DISP=SHR                             
//         DD DSN=SYS1.SISFTLIB,DISP=SHR                             
//         DD DSN=SYS1.SBPXTENU,DISP=SHR                             
//         DD DSN=SYS3.DV.CAIISPT,DISP=SHR                           
//ISPCTL0  DD UNIT=SYSDA,                                             
//            SPACE=(TRK,(5,5)),                                     
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160),                   
//            DISP=(,DELETE,DELETE)                                   
//ISPCTL1  DD UNIT=SYSDA,                                             
//            SPACE=(TRK,(5,5)),                                     
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160),                     
//            DISP=(,DELETE,DELETE)                                     
//ISPCTL2  DD UNIT=SYSDA,                                               
//            SPACE=(TRK,(5,5)),                                       
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160),                     
//            DISP=(,DELETE,DELETE)                                     
//ISPWRK0  DD UNIT=SYSDA,                                               
//            SPACE=(TRK,(5,5)),                                       
//            DCB=(RECFM=FB,LRECL=256,BLKSIZE=2560),                   
//            DISP=(,DELETE,DELETE)                                     
//ISPWRK1  DD UNIT=SYSDA,                                               
//            SPACE=(TRK,(5,5)),                                       
//            DCB=(RECFM=FB,LRECL=256,BLKSIZE=2560),                   
//            DISP=(,DELETE,DELETE)                                     
//ISPWRK2  DD UNIT=SYSDA,                                               
//            SPACE=(TRK,(5,5)),                                       
//            DCB=(RECFM=FB,LRECL=256,BLKSIZE=2560),                   
//            DISP=(,DELETE,DELETE)                                     
//ISPLST0  DD UNIT=SYSDA,                                               
//            SPACE=(TRK,(5,5)),                                       
//            DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210),           
//            DISP=(,DELETE,DELETE)                             
//ISPLST1  DD UNIT=SYSDA,                                       
//            SPACE=(TRK,(5,5)),                                 
//            DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210),           
//            DISP=(,DELETE,DELETE)                             
//ISPLST2  DD UNIT=SYSDA,                                       
//            SPACE=(TRK,(5,5)),                                 
//            DCB=(RECFM=FBA,LRECL=121,BLKSIZE=1210),           
//            DISP=(,DELETE,DELETE)                             
//SYSPRINT DD SYSOUT=*,HOLD=YES                                 
//SYSTSPRT DD SYSOUT=*,HOLD=YES                                 
//SYSTSIN  DD *                                                 
 ISPSTART CMD(%CHK1 AAAAAA.COPYBACK)                           
/*                                                               


CHK1 - Macro
AAAAAA.COPYBACK - PS file
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue May 26, 2009 7:51 pm
Reply with quote

ISPSTART CMD - The command you run needs to be a CLIST or EXEC that contains the ISPF EDIT command to call the macro. (ISPEXEC EDIT DATASET('dsn') MACRO(CHK1) ring a bell?) You're error messages clearly show that the ISREDIT commands are not understood since you haven't yet started an EDIT session.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue May 26, 2009 7:53 pm
Reply with quote

Wouldn't all of this have been easier to implement as a standard TSO EDIT process instead of going through all of this extra stuff just to change some data?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue May 26, 2009 8:02 pm
Reply with quote

Macros are run from EDIT or VIEW.

You need another REXX program, one that will be executed from the JCL.
This program will EDIT a file and run the macro.
Here is an example:
Code:
/* rexx */
Parse Arg DSNmember .
Address ISPEXEC "EDIT DATASET('"DSNmember"') MACRO(CHK1)"
Exit


Now, in the macro itself, the END command can behave differently depending on the edit profile.
(Try with AUTOSAVE ON then with AUTOSAVE OFF).
If you are sure about your change, do a SAVE before the END.
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Tue May 26, 2009 8:35 pm
Reply with quote

Thanks a lot Superk and Marso.

I got it now. I tried this before but made a mistake. I'll again try and let you know the results.

Superk said:

Quote:

Wouldn't all of this have been easier to implement as a standard TSO EDIT process instead of going through all of this extra stuff just to change some data?


Absolutely yes, But I am just trying to execute this macro as a beginner's case so that i can go for further ones.
Back to top
View user's profile Send private message
senjay

Active User


Joined: 10 May 2007
Posts: 147
Location: India

PostPosted: Tue May 26, 2009 8:47 pm
Reply with quote

Again, Thanks a lot Marso and Superk.

It worked perfectly. icon_smile.gif
The other posts regarding the same topic was very useful when SEARCHed.

Atlast, sorry Superk for posting this in CLIST and REXX forum. must be an oversight omission. icon_rolleyes.gif
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts submitting feedback for manuals All Other Mainframe Topics 3
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top