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
 

 

Runnin an ISREDIT MACRO

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

New User


Joined: 10 Nov 2011
Posts: 5
Location: India

PostPosted: Tue Dec 20, 2011 4:04 pm    Post subject: Runnin an ISREDIT MACRO
Reply with quote

Here’s the code which executes a macro named ‘MYMACRO’.

If the macro is called I get the error - COMMAND MYMACRO NOT FOUND
***

Code:

/* REXX */                                                 
INDSN="'LIB2.DB2.J251114.DDL(CR0111AJ)'"                   
ADDRESS ISPEXEC "EDIT DATASET("||INDSN||") MACRO("MYMACRO")"
EXIT



Code:
/* REXX */                                                     
ADDRESS ISREDIT "MACRO("STRING")"                             
ADDRESS ISPEXEC "VPUT  STRING"                               
ADDRESS ISREDIT "RESET EXCLUDED"                             
ADDRESS ISREDIT "EXCLUDE ALL 'CRMFNX00'"                     
ADDRESS ISREDIT "FIND ALL 'CRMFNX00'"                         
  IF RC > 0 THEN EXIT                                         
ADDRESS ISREDIT "CHANGE 'CRMFNX00' 'CRMFNXS6' ALL"           
ADDRESS ISREDIT "SAVE"                                       
ADDRESS ISREDIT "END"                                         
  EXIT
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Dec 20, 2011 4:29 pm    Post subject:
Reply with quote

The macro need to be defined in the SYSPROC or SYSEXEC DD concatenation
Back to top
View user's profile Send private message
amit.sagar19

New User


Joined: 10 Nov 2011
Posts: 5
Location: India

PostPosted: Tue Dec 20, 2011 6:24 pm    Post subject: Reply to: Runnin an ISREDIT MACRO
Reply with quote

Hi Expat,
Thanks for the suggestions.
Here's the JCL which I used to call the REXX 'MCALL' (which in turn runs macro MYMACRO) :

Code:

//STEPNAME EXEC PGM=IKJEFT01                                     
//ISPLOG DD SYSOUT=*,DCB=(LRECL=125,BLKSIZE=129,RECFM=VA)       
//ISPPROF DD DSN=&&TEMP,DISP=(NEW,PASS),UNIT=SYSDA,             
//           DCB=(RECFM=FB,LRECL=80,DSORG=PO),SPACE=(TRK,(1,1,5))
//ISPLLIB DD DSN=SYS1.SISPLOAD,DISP=SHR                         
//ISPMLIB DD DSN=SYS1.SISPMENU,DISP=SHR                         
//ISPPLIB DD DSN=SYS1.SISPPENU,DISP=SHR                         
//ISPSLIB DD DSN=SYS1.SISPSLIB,DISP=SHR                         
//ISPTLIB DD DSN=SYS1.SISPTENU,DISP=SHR                         
//SYSPROC DD DSN=SYS1.SISPEXEC,DISP=SHR                         
//SYSTSPRT DD SYSOUT=*                                           
//SYSEXEC DD DSN=LIB2.DB2.J251114.LOAD,DISP=SHR                 
//SYSTSIN DD *                                                   
ISPSTART CMD(%MCALL)                                             
/*                                                               
// 



The JCL fails and gives the following error message:
[Panel ISREDDE3 message - In batch, the following message was displayed on the panel.
Macro does not exist - Initial or recovery macro "SITEMAC1" could not be executed.
TSO - Command - - %SITEMAC1 ]

Please advise what is missing.

Second Question:
What if I try to execute by giving 'EX' against the REXX exec? In such a case, how are the ISPLIBs (as included in the JCL) included?
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Dec 20, 2011 7:46 pm    Post subject: Reply to: Runnin an ISREDIT MACRO
Reply with quote

You've allocated:

Code:

//SYSPROC DD DSN=SYS1.SISPEXEC,DISP=SHR                                     
//SYSEXEC DD DSN=LIB2.DB2.J251114.LOAD,DISP=SHR


Which one contains your ISPF Edit Macro (MYMACRO)?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Dec 21, 2011 3:44 am    Post subject:
Reply with quote

Hi,

Quote:
What if I try to execute by giving 'EX' against the REXX exec? In such a case, how are the ISPLIBs (as included in the JCL) included?

Your logon PROC would have allocated the ISPLIB's.

Type TSO ISRDDN, it provides a list of allocated DD names

Also is LIB2.DB2.J251114.LOAD truly a load library ?

A load library part of SYSEXEC DD ?

Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Dec 21, 2011 3:47 pm    Post subject:
Reply with quote

For your second question why not try - BPXWDYN:
Code:
/* REXX */                                       
"ALLOC F(MYPDS) DA('your.pds') SHR REU"   
CALL BPXWDYN "CONCAT DDLIST(SYSPROC,MYPDS) MSG(2)"
EXIT 0                                           
That way you can use use MACRO as a macro actually.
Back to top
View user's profile Send private message
amit.sagar19

New User


Joined: 10 Nov 2011
Posts: 5
Location: India

PostPosted: Wed Dec 21, 2011 10:24 pm    Post subject: Reply to: Runnin an ISREDIT MACRO
Reply with quote

My macro MYMACRO is present in the library LIB2.DB2.J251114.LOAD.
This library also contains the REXX which runs this macro.

Moreover, the library in SYSEXEC DD statement is not a load lib. It is just the name of my PDS is LIB2.DB2.J251114.LOAD
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Wed Dec 21, 2011 11:42 pm    Post subject:
Reply with quote

Where does "SITEMAC1" live? You may need to have that library concatenated to SYSEXEC or SYSPROC also.
Back to top
View user's profile Send private message
amit.sagar19

New User


Joined: 10 Nov 2011
Posts: 5
Location: India

PostPosted: Mon Dec 26, 2011 7:14 pm    Post subject: Reply to: Runnin an ISREDIT MACRO
Reply with quote

Hi Don.Leahy,

I am not sure where to find the SITEMAC1 initial macro.
Can you suggest me a way to find it?

I checked the PROFILE by editing a member and found IMACRO is set to NONE.

But, the trace generated by TSO ISPVCALL STATUS gives Site Initial Macro as SITEMAC1.

Further, I am not able to run the command TSO ISPCCONF which could help find the 'Keyword File' / Configuration table.

Please advise.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Dec 26, 2011 7:26 pm    Post subject:
Reply with quote

Hi Amit sagar,

If you are not able to find SITEMAC1 library you can get in touch with SMEs or leads or ADMIN guys who knows more about the system.
Back to top
View user's profile Send private message
amit.sagar19

New User


Joined: 10 Nov 2011
Posts: 5
Location: India

PostPosted: Tue Dec 27, 2011 12:51 pm    Post subject:
Reply with quote

Finally, with all your help I am able to run the macro.
There are several ways to do this:

1) Using a batch (JCL) job:
Add xxx1.SYSPROC which contains the initial macro in the JCL ddname concatenation. For example:

//SYSPROC DD DSN=xxx1.SISPEXEC,DISP=SHR
// DD DSN=xxx1.SYSPROC,DISP=SHR

2) Another way to achieve this is to directly call the macro on the member to be edited.
- TSO ISRDDN > Check if the library containing your macro is listed here with ddname as SYSPROC.
- If not then add then add it using following code in a REXX.
ADDRESS TSO "%SPROC DS('LIB2.DB2.myname.mylib') ADD"
- Now you can see the library listed as :
Volume Disposition Act DDname Data Set Name Actions:
PA1270 SHR,KEEP > SYSPROC LIB2.DB2.myname.mylib
- Edit the member you want the macro to run on and type KEYS. Map your macro name to any of the function keys of your choice, say PF4.
- Once the key is mapped, you can go to the member and press PF4 to run the macro.

Thanks everyone for your valuable inputs.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Jan 04, 2012 12:52 am    Post subject: Reply to: Runnin an ISREDIT MACRO
Reply with quote

Code:
ADDRESS TSO "%SPROC DS('LIB2.DB2.myname.mylib') ADD"

SPROC is some exec local only to your system.
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 PCOMM macro to call another PCOMM macro boyti ko All Other Mainframe Topics 4 Tue Jul 12, 2016 4:30 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm
No new posts RACF Easytrieve Plus macro Susan Jackson CA Products 0 Fri Jun 03, 2016 8:25 pm
No new posts Calling macro via rexx in batch mode. SanaR CLIST & REXX 15 Tue Mar 08, 2016 4:46 pm
No new posts Too many edit macro's and too few PF ... don.leahy TSO/ISPF 7 Wed Feb 17, 2016 3:00 am


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