Tuesday, April 17, 2007

Invoke Search-For Extended utility using REXX

Function:
This REXX exec can be issued as an EDIT macro or from the Data Set List panel to invoke the Search-For Extended utility for the current data set.

Operation:
Enter SFE as a line command on the DSLIST panel or as a primary command in EDIT or VIEW to enter the Search-For Extended utility and search the current data set.

/*************REXX*****************/
ADDRESS 'ISPEXEC'
"CONTROL ERRORS RETURN"
"ISREDIT MACRO (SRF4FILE)"
IF RC=0 THEN DO
IF SRF4FILE='' THEN DO
"ISREDIT (DSN) = DATASET"
IF RC>0 THEN EXIT RC
SRF4FILE="'"DSN"'"
END
END
ELSE
ARG SRF4FILE
IF SRF4FILE='' THEN EXIT 4
SRF4MEM='*'
SRC4WKPL='Y'
"VPUT (SRC4WKPL SRF4FILE SRF4MEM)"
"SELECT PGM(ISRSEPRM) PARM(S4) SCRNAME(SRCHFORE) "
IF ZERRMSG\='' THEN "SETMSG MSG("ZERRMSG")"

No comments:

Post a Comment