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

Reply via email to