Execute Macro outside a member.



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

Execute Macro outside a member.

Postby Viswanathchandru » Fri Dec 21, 2012 1:58 am

Dear all,

I can understand that a Macro can run only under ISPF. But I have a requirement where I need to open a dataset (View mode) issue "JEM"(Third party macro often called as Job scan) and capture the output. I'm wondering how to execute this. Any help or suggestions would be helpful. Hope I'm clear.


Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Execute Macro outside a member.

 

Re: Execute Macro outside a member.

Postby Viswanathchandru » Fri Dec 21, 2012 3:01 am

Thanks all, I was able to do.


Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Execute Macro outside a member.

Postby dick scherrer » Fri Dec 21, 2012 3:55 am

Good to hear it is working - thank you for the update.

It will probably help someone else one with a similar issue if you post how you got this working :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Execute Macro outside a member.

Postby Viswanathchandru » Fri Dec 21, 2012 7:14 pm

Dear all,

Here is the snipet that worked.
OPN = 'JUSTIN'

X = OUTTRAP("OPT.")                                             
 ADDRESS TSO "LISTDS "PDS" M"                                       
X = OUTTRAP("OFF")                                                 
                                                                   
PDS = STRIP(PDS,"B","'")                                           
                                                                   
DO I = 7 TO OPT.0                                               
  OPT.I = STRIP(OPT.I)                                       
  ADDRESS ISPEXEC "VIEW DATASET ('"PDS"("OPT.I")') MACRO ("OPN")"
END.


However this opens the pds members in View mode and applies the Marco named OPN. But I'm facing some issues like I need to press F3 everytime to move on to the next member. Even after coding
"ISREDIT END" as the last edit statement I'm still facin issues. Any suggestions would be helpful.

Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Execute Macro outside a member.

Postby enrico-sorichetti » Fri Dec 21, 2012 7:37 pm

I usually prefer doing everything using ISPF clauses (LMM..... stuff)

see here for a snippet using that approach

http://ibmmainframes.com/about25947.html
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

These users thanked the author enrico-sorichetti for the post:
Viswanathchandru (Fri Dec 21, 2012 11:13 pm)
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Execute Macro outside a member.

Postby Viswanathchandru » Fri Dec 21, 2012 11:13 pm

Outstanding!!

Thanks enrico..

Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post