Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to pass value to ISPF EDIT Macro from the command prompt

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to pass value to ISPF EDIT Macro from the command prompt
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: 686
Location: Earth

PostPosted: Thu Mar 01, 2007 1:00 pm    Post subject:
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    Post subject: Re: How to pass value to ISPF EDIT Macro from the command pr
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: 85
Location: Stockholm, Sweden

PostPosted: Sun Mar 04, 2007 6:51 pm    Post subject:
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: 686
Location: Earth

PostPosted: Wed Mar 07, 2007 12:49 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts presentation for ISPF developer newby Pedro TSO/ISPF 3 Tue Feb 13, 2018 4:37 am
No new posts OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us