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

ISREDIT CHANGE COMMAND NOT WORKING


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vasanthr

New User


Joined: 24 Jan 2011
Posts: 21
Location: India

PostPosted: Tue Sep 23, 2014 11:43 pm
Reply with quote

Hi All, I am trying to open a pds member and change a particular dataset name in the pds member to the dataset name which I am passing as argument through rexx. However I dont want the pds member to be saved after the rexx run with new dataset name. I just want the member to be viewed with changes made so that I can change something else if required manually and submit the job in the pds member myself.The pds member has a simple sort JCl in it and this needs to modified with dataset name i pass as argument every time I call the rexx.
When I execute the below code my pds member opens successfully but the change command did not work. Could you please help me on what is the problem in the below code.

Code:

/*rexx*/
PARSE ARG DS
PDSNAME='TEST.DT.HY.R1234'
MEMBR='SORTJCL'
ADDRESS ISPEXEC
ISPEXEC "LMINIT DATAID("DATID") DATASET('"PDSNAME"') ENQ(SHR)"
ISPEXEC "LMOPEN DATAID("DATID") OPTION(INPUT)"
ISPEXEC "LMMFIND DATAID("DATID") MEMBER("MEMBR") STATS(YES)"
 IF RC = 0 THEN
DO
ISPEXEC "EDIT DATAID("DATID") MEMBER("MEMBR")"
ADDRESS ISREDIT "C ALL 'ABC.DT.XF' &DS"
ADDRESS ISREDIT "CANCEL"
 RETURN
END
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Sep 24, 2014 1:20 am
Reply with quote

I believe hat your change command should be within an edit macro. Once your edit statement has finished execuing and you try to exeute the change the edit has already finished. Either use a macro, and/or use VIEW or use file tailoring (instead of submitting the tailored file you can edit it instead and do your changes and submit or cancel at that point)
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Sep 24, 2014 2:41 am
Reply with quote

Your edit statement:
Code:
ISPEXEC "EDIT DATAID("DATID") MEMBER("MEMBR")"

should also have the MACRO(abc) parameter. And the specified macro should have your change statements.

and..
Quote:
I just want the member to be viewed with changes made...

Your edit macro cannot include the CANCEL statement or the user will never see the JCL. Instead of using CANCEL, add this:
Code:
"DEFINE END  ALIAS CANCEL"

When the user press F3 to End, it will not save the file. Perhaps also:
Code:
"DEFINE SAVE  ALIAS CANCEL"
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Wed Sep 24, 2014 4:32 am
Reply with quote

Pedro wrote:
Your edit statement:
Code:
ISPEXEC "EDIT DATAID("DATID") MEMBER("MEMBR")"

should also have the MACRO(abc) parameter. And the specified macro should have your change statements.

and..
Quote:
I just want the member to be viewed with changes made...

Your edit macro cannot include the CANCEL statement or the user will never see the JCL. Instead of using CANCEL, add this:
Code:
"DEFINE END  ALIAS CANCEL"

When the user press F3 to End, it will not save the file. Perhaps also:
Code:
"DEFINE SAVE  ALIAS CANCEL"

If the TS only wants to see the changes and has no intention of saving them, why the flupping 'ell doesn't he use
Code:
ISPEXEC "VIEW DATAID("DATID") MEMBER("MEMBR") macro(whatever)"

AND WHY DO PEOPLE STILL SCREAM WHEN WRITING REXX?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Sep 24, 2014 6:57 pm
Reply with quote

Maybe "Caps Lock"? Maybe because used to COBOL upper-case?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed Sep 24, 2014 8:56 pm
Reply with quote

Terry Heinze wrote:
Maybe "Caps Lock"? Maybe because used to COBOL upper-case?
My earliest Rexx programs were written in all caps, but I soon abandoned that style. But I still find myself uppercasing important commands and keywords, especially when invoking ISPF services. There is no good reason to do that, especially when you use HILITE REXX in your edit session. I used to scream when counting Rexx quotation marks, but HILITE REXX cured me of that affliction. icon_cool.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Sep 25, 2014 5:57 am
Reply with quote

I have a vague recollection that ISPF services calls should be in uppercase to support users that run in DBCS mode. Sorry, I am an old geezer and cannot remember more details. :-)

I Code In "Camel-Case", With The First Letter Of Every Language Keyword Being Capitalized. Yeah, I Am Crazy. I have a macro that helps me.
Back to top
View user's profile Send private message
Vasanthr

New User


Joined: 24 Jan 2011
Posts: 21
Location: India

PostPosted: Thu Sep 25, 2014 7:43 pm
Reply with quote

Thanks Everyone. I was able to execute the macro successfully using the macro in the view command itself.

Code:
ISPEXEC "VIEW DATAID("DATID") MEMBER("MEMBR") MACRO(CHNG) PARM(DS)"
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 DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
Search our Forums:

Back to Top