IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to pass value to ISPF EDIT Macro from the command prompt


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Atul Chetan Sharma
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 2
Location: India

PostPosted: Thu Mar 01, 2007 11:44 am
Reply with quote

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
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Mar 01, 2007 1:00 pm
Reply with quote

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
View user's profile Send private message
Atul Chetan Sharma
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 2
Location: India

PostPosted: Thu Mar 01, 2007 1:53 pm
Reply with quote

Thanks Abhijit,

It worked as suggested by you icon_razz.gif

Atul
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Sun Mar 04, 2007 6:51 pm
Reply with quote

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
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Mar 07, 2007 12:49 pm
Reply with quote

Steve,
You are correct. I checked using TSO ISRDDN command, my PDS is listed under SYPROC.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Mar 09, 2007 9:10 pm
Reply with quote

You have not setup your macro to except any arguments.. look at Steves
example.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top