×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ISPF EDIT Macro

ISPF EDIT Macro

ISPF EDIT Macro

(OP)
Hi,

I wrote a isredit macro which will be called from  one of my Rexx exec. This rexx will open a member in pds and execute a macro. The macro should find a string and get back me the string and next 12 charcters.

The problem is that my macro is not executing with the following command. It opens the dataset in ISPF panel and stops there.

ADDRESS ISPEXEC "EDIT DATASET('"MEMDD"') MACRO(STRMACRO)" where MEMDD is variable with pds(member).

I had both the rexx program and macro in the same pds. the macro is below
/*REXX*/                              
ADDRESS ISREDIT "MACRO(STRMACRO)"    
TRACE('?I')                           
MEMBR = "GXYZ0016"                    
SRCHSTR=MEMBR||20                     
ADDRESS ISREDIT "F" SRCHSTR           
ADDRESS ISREDIT "(LNNUM) = LINENUM"   
ADDRESS ISREDIT "(LNVAR) = LINE LNNUM"
ADDRESS TSO                           
STRPOS=POS(SRCHSTR,LNVAR)             
IF STRPOS > 0 THEN DO                 
STRPOS=STRPOS+ LENGTH(MEMBR)          
NEWSTR=SUBSTR(LNVAR,STRPOS,14)        
SAY STRPOS                            
SAY NEWSTR                            
END                                   
ADDRESS ISREDIT "CANCEL"
Exit

Require some help on this.Please

RE: ISPF EDIT Macro


When you are in "interactive trace" ("?") you must press ENTER after every statement.  You're not just waiting for something to happen, are you?
 

Frank Clarke
--America's source for adverse opinions since 1943.

RE: ISPF EDIT Macro

(OP)
Yes, we need to press enter after every statement. I used that to see what was happening after myy macro open the required dataset. There is no need for that trace but just for debug.

RE: ISPF EDIT Macro


Then the only thing I can think of is that your opening statement

CODE

ADDRESS ISREDIT "MACRO(STRMACRO)"    
seems odd.  I would make it

CODE

ADDRESS ISREDIT "MACRO"
but I'm guessing.

Frank Clarke
--America's source for adverse opinions since 1943.

RE: ISPF EDIT Macro

(OP)
Hi Frank,

Thanks for the resposne. I changed that to

ADDRESS ISREDIT "MACRO"

Still the macro doesn't run. The rexx just opens the member in the pds in ispf screen and stays there.

Thanks,

RE: ISPF EDIT Macro

Works for me...

CODE

        >>>   "N"
      3 *-* memdd = "****.****.cntl(@@jtst)"
        >>>   "****.****.cntl(@@jtst)"
      4 *-* ADDRESS ISPEXEC "EDIT DATASET('"MEMDD"') MACRO(STRMACRO)"
        >>>   "EDIT DATASET('****.****.cntl(@@jtst)') MACRO(STRMACRO)"
      4 *-* MEMBR = "GXYZ0016"
        >>>   "GXYZ0016"
 IRX0100I +++ Interactive trace.  TRACE OFF to end debug, ENTER to continue. +++

      5 *-* SRCHSTR=MEMBR||20
        >>>   "GXYZ001620"

      6 *-* ADDRESS ISREDIT "F" SRCHSTR
        >>>   "F GXYZ001620"
        +++ RC(4) +++

      7 *-* ADDRESS ISREDIT "(LNNUM) = LINENUM"
        >>>   "(LNNUM) = LINENUM"
 ***

Of course, I don't know what it's supposed to do and the dataset is probably configured wrong, but I did get something out of it...
 

Frank Clarke
--America's source for adverse opinions since 1943.

RE: ISPF EDIT Macro


Just curious...

What is this

CODE

SRCHSTR=MEMBR||20
supposed to do?   I'd be surprised if it's doing what you wanted it to do.

Frank Clarke
--America's source for adverse opinions since 1943.

RE: ISPF EDIT Macro

(OP)
Hi Frank,

The purpose this code is to get the timestamp from the laod module. The timestamp in the load module wil;l be be present after moadule name and timestamp will be in format of YYYYMMDDHHMMSS.Most of the modules have compiled after 20000101,hence i am using member||20 so that the search string will be unique.

May be some thing to do with record format. all load libraries will have VB.

I think i need to use LMINIT instead of isrredit.

Thanks,

RE: ISPF EDIT Macro


All load libraries will be RECFM=U.  You are correct that you will not be able to ISREDIT them.
 

Frank Clarke
--America's source for adverse opinions since 1943.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close