View previous topic :: View next topic
|
Author |
Message |
Atul Chetan Sharma Warnings : 1 New User
Joined: 11 Jan 2007 Posts: 2 Location: India
|
|
|
|
When I am trying to pass a value to my macro code by typing
"TSO <pgm name> FMB" on the command prompt
My code:
ARG REGN
SAY REGN
ADDRESS ISREDIT
"MACRO PROCESS"
"(LNDATA) = LINE .ZCSR"
"(DSNAME) = DATASET"
Displays the argument FMB but fails to execute the ISREDIT macro and is unable to fetch the line and dataset name.
Is there something I am doing wrong or is there any other way to pass a value from the command prompt when we use edit macros......? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
If you are trying to execute MACRO, then don't use TSO prefix before command. When you are in editing/viewing dataset/member, just type your macro name on the command line.
I don't know much about your style of writing but the following works for me-
Code: |
/* REXX */
"ISREDIT MACRO (STRING)"
SELECT
WHEN STRING='TEST' THEN
Do something
OTHERWISE
Do somehing else
END
|
Suppose I stored it in a member TSTMAC of my ISPMLIB then just type
TSTMAC TEST at the command line |
|
Back to top |
|
|
Atul Chetan Sharma Warnings : 1 New User
Joined: 11 Jan 2007 Posts: 2 Location: India
|
|
|
|
Thanks Abhijit,
It worked as suggested by you
Atul |
|
Back to top |
|
|
Steve Coalbran
New User
Joined: 01 Feb 2007 Posts: 89 Location: Stockholm, Sweden
|
|
|
|
agkshirsagar wrote: |
Suppose I stored it in a member TSTMAC of my ISPMLIB then just type TSTMAC TEST at the command line |
ISPMLIB is where ISPF searches for messages.
This is a REXX exec so would need to be on your SYSEXEC or SYSPROC concatenations.
Code: |
IQIEDIT4 T SE16661.USER.EXEC(EM) - 01.00 Columns 00001 00072
Command ===> em banana republic Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /*REXX*/
000002 ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
000003 ADDRESS ISREDIT "MACRO (ARGS) NOPROCESS"
000004 UPPER args
000005 SAY "Argument is:" args
****** **************************** Bottom of Data ****************************
|
gives...
Code: |
Argument is: BANANA REPUBLIC
*** |
|
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Steve,
You are correct. I checked using TSO ISRDDN command, my PDS is listed under SYPROC. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
You have not setup your macro to except any arguments.. look at Steves
example. |
|
Back to top |
|
|
|