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
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