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
 

 

ISREDIT CHANGE COMMAND NOT WORKING

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: ISREDIT CHANGE COMMAND NOT WORKING
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: 1712
Location: UK

PostPosted: Wed Sep 24, 2014 1:20 am    Post subject: Reply to: ISREDIT CHANGE COMMAND NOT WORKING
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

Senior Member


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

PostPosted: Wed Sep 24, 2014 2:41 am    Post subject: Reply to: ISREDIT CHANGE COMMAND NOT WORKING
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

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Wed Sep 24, 2014 4:32 am    Post subject: Re: Reply to: ISREDIT CHANGE COMMAND NOT WORKING
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: 1238
Location: Richfield, MN, USA

PostPosted: Wed Sep 24, 2014 6:57 pm    Post subject:
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed Sep 24, 2014 8:56 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Sep 25, 2014 5:57 am    Post subject: Reply to: ISREDIT CHANGE COMMAND NOT WORKING
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    Post subject: Reply to: ISREDIT CHANGE COMMAND NOT WORKING
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    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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


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