I'm trying to get an Edit Macro to accept ARG...Edit Macro is manually entered by user from within an active REXX.
Rexx invokes ISPEXEC View session of a PDS member
User enters Edit Macro "GENCHK x" (where x = a line # within the PDS member)
Edit Macro doesn't accept ARG 'x'
/* REXX */
ADDRESS ISREDIT
"MACRO"
ARG RSTRSTEP
SAY RSTRSTEP
EXIT
(EXIT added just for testing ARG)...RSTRSTEP is blanks
ARG not working in Edit Macro
-
- Posts: 474
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: ARG not working in Edit Macro
No, EDIT macro parms are accessed like this:
where 'p' contains the parm. This also demonstrates how you can use one REXX pgm as both an EDIT macro and a regular pgm.
Code: Select all
Address Isredit "MACRO NOPROCESS (P)"
if rc=0 then exit EditMac(p)
/* regular pgm starts */
arg name,opts
. . .
exit 0
/* edit macro section */
EditMac:
Address Isredit
parse upper var p what .
. . .
exit 0
where 'p' contains the parm. This also demonstrates how you can use one REXX pgm as both an EDIT macro and a regular pgm.
-
- Posts: 27
- Joined: Fri Dec 09, 2022 6:59 pm
- Skillset: CA-7, JCL, SORT, Roscoe, TSO, REXX
- Referer: just found you on the Internet
Re: ARG not working in Edit Macro
tried your suggestion and nothing happens (that I'm aware of)
changed
ADDRESS ISREDIT
"MACRO"
to
ADDRESS ISREDIT "MACRO NOPROCESS (RSTRSTEP)"
IF RC=0 THEN EXIT EDITMAC(RSTRSTEP)
added
EDITMAC:
ADDRESS ISREDIT
PARSE UPPER VAR RSTRSTEP
EXIT
not sure what you meant by "arg name,opts" but left in
ARG STRTSTEP
SAY STRTSTEP
EXIT
when i execute REXX (am already in VIEW session of PDS member) by entering "GENCHK 39"...'39' would be the desired input to REXX "GENCHK" and should be the value of STRTSTEP, my SAY STRTSTEP should display '39'
it displays nothing...and I don't hit the EXIT...I am somewhere still in the REXX
changed
ADDRESS ISREDIT
"MACRO"
to
ADDRESS ISREDIT "MACRO NOPROCESS (RSTRSTEP)"
IF RC=0 THEN EXIT EDITMAC(RSTRSTEP)
added
EDITMAC:
ADDRESS ISREDIT
PARSE UPPER VAR RSTRSTEP
EXIT
not sure what you meant by "arg name,opts" but left in
ARG STRTSTEP
SAY STRTSTEP
EXIT
when i execute REXX (am already in VIEW session of PDS member) by entering "GENCHK 39"...'39' would be the desired input to REXX "GENCHK" and should be the value of STRTSTEP, my SAY STRTSTEP should display '39'
it displays nothing...and I don't hit the EXIT...I am somewhere still in the REXX
-
- Posts: 474
- Joined: Thu Mar 10, 2016 5:03 pm
- Skillset: assembler rexx zOS ispf racf smf
- Referer: saw it in the experts foprum thought I could help here
Re: ARG not working in Edit Macro
I need to see your pgm to determine why it's not working, but lets keep it really simple then.
Edit macro sample named EM1:
When in edit, issue EM1 Kilroy was here
shows message: parm-> Kilroy was here
Edit macro sample named EM1:
Code: Select all
/* ISPF edit macro rexx */
Address Isredit "MACRO PROCESS (p)"
Address Isredit
say 'parm->' p
When in edit, issue EM1 Kilroy was here
shows message: parm-> Kilroy was here
-
- Posts: 27
- Joined: Fri Dec 09, 2022 6:59 pm
- Skillset: CA-7, JCL, SORT, Roscoe, TSO, REXX
- Referer: just found you on the Internet
Re: ARG not working in Edit Macro
ok, now that worked...thanks !
-
- Similar Topics
- Replies
- Views
- Last post
-
-
I can't get the LINK macro working properly
by chong_zhou » Fri Aug 21, 2020 10:53 pm » in Assembler - 13
- 7001
-
by steve-myers
View the latest post
Thu Aug 27, 2020 1:06 am
-
-
- 1
- 1412
-
by enrico-sorichetti
View the latest post
Wed Jun 16, 2021 10:26 pm
-
-
Compiler option INVDATA is not working on COBOL6.3
by Misha786 » Fri Apr 22, 2022 5:35 pm » in IBM Cobol - 4
- 3357
-
by Misha786
View the latest post
Mon Apr 25, 2022 4:35 pm
-
-
-
Micro mainframe transmission stopped working
by nightrider43 » Wed Apr 03, 2024 6:25 pm » in All Other Tools - 0
- 2903
-
by nightrider43
View the latest post
Wed Apr 03, 2024 6:25 pm
-
-
- 0
- 2712
-
by knv09
View the latest post
Thu Nov 16, 2023 8:16 pm