Thanks Dave hats exactly what Im Looking for - After posting I located a publication for CLISTs and CLIST Macros.
---------- Original Message ---------- From: Dave Salt <[email protected]> To: [email protected] Subject: Re: Examing & Setting Return Codes in a CLIST/MACRO Date: Sat, 11 May 2013 17:09:19 -0400 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) Hope that helps, Dave Salt SimpList(tm) - try it; you'll get it! http://www.mackinney.com/products/program-development/simplist.html > Date: Sat, 11 May 2013 19:44:12 +0000 > From: [email protected] > Subject: Examing & Setting Return Codes in a CLIST/MACRO > To: [email protected] > > Hi, > Not proffecient in CLISTS and RExx. > > Can I get some assistance with examining & testing a return code in a CLIST > Macro. > > In A CLIST i execute the following statements to edit a member of a PDS > and use the ALTER MACRO to change all occurances of XXXXXXX. > SET IOFUNC = &STR(EDIT) > ISPEXEC EDIT DATASET('&JCLLIB(CATLOG42)') MACRO(ALTER) > > > The ALTER MACRO Executes/ Changes the VALUE OF XXXXXXX correctly, submits > the JOB and then CANCELS The Edit session. > > Here is the EDIT Macro > ISREDIT MACRO > SET LROW = 00 > SET LCOL = 00 > SET LNUM = 00 > > ISPEXEC VGET (V0) SHARED > ISREDIT FIND XXXXXXX > ISREDIT CHANGE 'XXXXXXX' '&V0' ALL > ISREDIT SUB > ISREDIT CAN > > EXIT > > > > My question is How Do I properly Test and SET the Return Code in the EDIT > MACRO. Can I use &LASTCC ? > I need some examples as to how to examine and Set the Return code in the > ALTER MACRO. > > Here is the excerpt from the trace: > SET IOFUNC = &STR(EDIT) > SET IOFUNC = EDIT > ISPEXEC EDIT DATASET('&JCLLIB(CATLOG42)') MACRO(ALTER) > ISPEXEC EDIT DATASET('TECH.CICSTS.V42.JCLLIB(CATLOG42)') MACRO(ALTER) > IKJ56250I JOB TEC0P0DC(JOB05492) SUBMITTED > DO > DO > SET RC = &LASTCC > SET RC = 4 > IF &RC = 400 THEN > IF 4 = 400 THEN > IF &RC NE 0 THEN > IF 4 NE 0 THEN > DO > DO > WRITE &STR(&IOFUNC Function Failed RC=&RC) > WRITE EDIT Function Failed RC=4 > EDIT Function Failed RC=4 > > > Any examples would be appreciated. > > > Thank You In Advance > Paul D'Angelo > ---------------------------------------------------------------------- > 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 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
