ISRE741 Command not executed



IBM's Command List programming language & Restructured Extended Executor

ISRE741 Command not executed

Postby Sandeep1311 » Fri Apr 17, 2020 12:46 am

Hi,

I am trying to use MACRO for easy DNAME execution. while submitting the macro I have below.



* Command in error . : MACRO(VIEW)                                           *
 *                                                                            *
 * Command not executed                                                       *
 * An ISREDIT MACRO statement must precede any executable statements.         *
 *                                                                            *
 *   Error message ID . : ISRE741                                             *
 *                                                                            *
 *   Last return code . : 28                                                  *
 *                                                                            *
 *   Macro executing  . : SRTOL                                               *
 *                                                                            *
 * Press ENTER key to terminate the macro.                                    *
 *                                                                            *
 


I checked on IBM Knowledge center and the issue explanation state

The macro name you entered does not have the ISREDIT MACRO statement as the first executable instruction

I checked my program.


/* REXX */                                                  
 ADDRESS ISREDIT                                            
 "MACRO(VIEW)"                                              
 "(CURL,CURC) = CURSOR"                                      
 "(LINEDATA) = LINE" CURL                                    
 PARSE VAR LINEDATA BEQUAL '=' DSNAME ','                    
  IF SYSDSN("'"DSNAME"'") = 'OK' THEN                        
   DO                                                        
     SELECT                                                  
       WHEN VIEW = 'E' THEN                                  
         DO                                                  
           ADDRESS ISPEXEC "EDIT DATASET('"DSNAME"')"        
         END                                                
       WHEN VIEW = 'V' THEN                                  
         DO                                                  
           ADDRESS ISPEXEC "VIEW DATASET('"DSNAME"')"        
         END                                                
       WHEN VIEW = 'B' THEN                                  
         DO                                                  
           ADDRESS ISPEXEC "BROWSE DATASET('"DSNAME"')"      
         END                                                
       WHEN VIEW = 'D' THEN                                  
         DO                                                  
           ADDRESS TSO "DELETE '"DSNAME"'"                  
         END                                                
       OTHERWISE                                            
         DO                                                  
           SAY 'PLEASE SELECT APPRPIATE OPTION'              
         END                                                
     END                                                    
   END                                                      
  ELSE                                                      
   DO                                                        
     SAY 'DATSET IS NOT FOUND'                              
   END                                                      



please advise.
Sandeep1311
 
Posts: 6
Joined: Mon Apr 13, 2020 6:44 am
Has thanked: 1 time
Been thanked: 0 time

Re: ISRE741 Command not executed

Postby Terry Heinze » Fri Apr 17, 2020 2:32 am

Not a REXX expert, but try changing your 2nd line to:
Address isredit "MACRO"
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: ISRE741 Command not executed

Postby sergeyken » Fri Apr 17, 2020 2:36 am

RTFM: https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc193621/$file/f54em00_v2r3.pdf

The described syntax requires the operation code MACRO to be separated by at least one blank from its other options and/or parameters.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 408
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 6 times
Been thanked: 40 times

Re: ISRE741 Command not executed

Postby Sandeep1311 » Fri Apr 17, 2020 3:42 pm

ADDRESS ISREDIT "MACRO (VIEW)" is fine now thank you for help
Sandeep1311
 
Posts: 6
Joined: Mon Apr 13, 2020 6:44 am
Has thanked: 1 time
Been thanked: 0 time

Re: ISRE741 Command not executed

Postby willy jensen » Fri Apr 17, 2020 5:44 pm

To clarify, "first executable instruction" in the statement "The macro name you entered does not have the ISREDIT MACRO statement as the first executable instruction" really means "first executable EDIT instruction. The following REXX statement sequence is perfectly ok:

/* rexx */                          
  address ispexec                    
  "control errors return"            
  ADDRESS ISREDIT "MACRO (P) PROCESS"
  if rc=0 then do                    
    address isredit                  
    "(sds) = dataset"                
    "(smb) = member "                
  end                                
  else do                            
    arg sds                          
    parse var sds . =2 sds'('smb')'.  
  end              
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post