Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us