> Does your suggestion leave the file unchanged, end the edit session
> with RC=0, and not leave the user in a terminal edit session?

The edit session would end with whatever return code was set by CHANGE. For 
example, if the change was successful (RC=0, which means one or more strings 
were changed), then yes the edit session would end without the changes being 
saved and using exit code zero.

> (When I wish to be reminded not to save changes, I use View rather than Edit. 

The OP obviously wants to make sure no permanent changes are made. Based on 
that, I agree with you it would be much better to call the macro using VIEW 
instead of EDIT. 

Dave Salt

SimpList(tm) - try it; you'll get it! 

http://www.mackinney.com/products/program-development/simplist.html  


> Date: Sat, 11 May 2013 22:04:42 -0500
> From: [email protected]
> Subject: Re: Examing & Setting Return Codes in a CLIST/MACRO
> To: [email protected]
> 
> On Sat, 11 May 2013 17:09:19 -0400, Dave Salt wrote:
> 
> >The edit session ends with CANCEL, which means no changes were saved, which
> >means ISPF sets the return code of the macro to 4. If you want to end with a
> >different return code, you can hard code it like this:
> >
> >EXIT CODE(0)
> >
> >Or set it using this as an example:
> >
> >ISREDIT CHANGE 'XXXXXXX' '&V0' ALL   
> >SET &EXITCODE = &LASTCC
> >do more stuff....
> >EXIT CODE(&EXITCODE) 
> >
> It appears to be the OP's intent to make changes; submit a job,
> and exit the edit session without saving those changes.  Apparently
> he considers this normal operation, and prefers a zero return code.
> 
> Does your suggestion leave the file unchanged, end the edit session
> with RC=0, and not leave the user in a terminal edit session?
> 
> (When I wish to be reminded not to save changes, I use View
> rather than Edit.  But I don't put the SUBMIT and CANCEL in my
> macro because I want to inspect the job before SUBMITting.)
> 
> 
> >> Date: Sat, 11 May 2013 19:44:12 +0000
> >> From: essteam
> >>     ...           
> >> ISREDIT CHANGE 'XXXXXXX' '&V0' ALL   
> >> ISREDIT SUB                          
> >> ISREDIT CAN                          
> >>                                      
> >> EXIT
> 
> -- gil
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
                                          
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to