Hello out there,
I am a fair novice at REXX coding, but I have been experimenting with changing ISPF environments. I have been attempting to EDIT a series of members in a PDS with little luck. When I try to use the ADDRESS ISREDIT instruction with variables or commands, I receive a +++ RC(20) +++, which from what I perceive is an unacceptable environment error.
The code seems quite simple from my perspective, but it's been hell debugging. Any and all help will be accepted. Thanks all.
/* REXX SUT LISTDS */
SAY TIME()
SAY USERID()
CALL TRACE"?R"
MESSAGE_SETTING = MSG(''ON'')
ARG DSN,MEMB
IF SYSDSN(SUT04F.CHANGE.CNTL) \= "OK"
THEN NOP
ELSE CALL OUTTRAP "LINE.","*" /* STEM CHARACTER APPENDS LINE #S */
"LISTDS SUT04F.CHANGE.CNTL MEMBERS"
NUM_MEMBERS = LINE.0 - 6 /* COUNT OF ACTUAL MEMBERS */
SAY NUM_MEMBERS 'MEMBERS IN SUTFILE FOR PROCESSING'
ADDRESS ISREDIT
DSN = "YSEALEY.SUT04F.CHANGE.CNTL"
SAY ' PROCESSING LIBRARY ' DSN
DO I = 7 TO LINE.0 /* LOOP FOR EACH MEMBER */
MEMB = STRIP(LINE.I,'L') /* STRIP 2 BLANK HEADERS */
IF MEMB = 'IDTEMP' THEN
ITERATE /* GO BACK TO TOP OF LOOP */
SAY 'EDITTING MEMBER'LINE.I
ADDRESS ISREDIT
"MACRO"
"("DSN") = DATASET"
"("MEMB") = MEMBER"
"DELETE 1 5"
"COPY IDTEMP BEFORE .ZFIRST"
CALL OUTTRAP ("OFF")
END
I am a fair novice at REXX coding, but I have been experimenting with changing ISPF environments. I have been attempting to EDIT a series of members in a PDS with little luck. When I try to use the ADDRESS ISREDIT instruction with variables or commands, I receive a +++ RC(20) +++, which from what I perceive is an unacceptable environment error.
The code seems quite simple from my perspective, but it's been hell debugging. Any and all help will be accepted. Thanks all.
/* REXX SUT LISTDS */
SAY TIME()
SAY USERID()
CALL TRACE"?R"
MESSAGE_SETTING = MSG(''ON'')
ARG DSN,MEMB
IF SYSDSN(SUT04F.CHANGE.CNTL) \= "OK"
THEN NOP
ELSE CALL OUTTRAP "LINE.","*" /* STEM CHARACTER APPENDS LINE #S */
"LISTDS SUT04F.CHANGE.CNTL MEMBERS"
NUM_MEMBERS = LINE.0 - 6 /* COUNT OF ACTUAL MEMBERS */
SAY NUM_MEMBERS 'MEMBERS IN SUTFILE FOR PROCESSING'
ADDRESS ISREDIT
DSN = "YSEALEY.SUT04F.CHANGE.CNTL"
SAY ' PROCESSING LIBRARY ' DSN
DO I = 7 TO LINE.0 /* LOOP FOR EACH MEMBER */
MEMB = STRIP(LINE.I,'L') /* STRIP 2 BLANK HEADERS */
IF MEMB = 'IDTEMP' THEN
ITERATE /* GO BACK TO TOP OF LOOP */
SAY 'EDITTING MEMBER'LINE.I
ADDRESS ISREDIT
"MACRO"
"("DSN") = DATASET"
"("MEMB") = MEMBER"
"DELETE 1 5"
"COPY IDTEMP BEFORE .ZFIRST"
CALL OUTTRAP ("OFF")
END