Compiling an Endevor processor with IF-THEN-ELSE logic failing, RC(0001) RSN(0406)
search cancel

Compiling an Endevor processor with IF-THEN-ELSE logic failing, RC(0001) RSN(0406)

book

Article ID: 140784

calendar_today

Updated On:

Products

Endevor Endevor Natural Integration Endevor - ECLIPSE Plugin Endevor - Enterprise Workbench

Issue/Introduction

Modified a processor's IF THEN ELSE logic and the processor ADD fails in the translate step with RC=0012  with the following message:

  "C1X0263E  AN ERROR OCCURRED PARSING IF-THEN-ELSE, RC(0001), RSN(0406)"


The messages guide states to report the problem with the RC and RSN codes. 

The IF logic has been used in other processors.

Here is the processor in question.  It's a basic CONDELE.

//DELETE PROC AAAA='',
//            CENV2='NULL',
//            DSPPREFX='P&C1EN(1,4).&CENV2.CM',
//            DSVPREFX='V&C1EN(1,4).&CENV2.CM',
//            ZZZZ=''                   END SYMBOLS; PLACE LAST
//*
//DSOURCE  EXEC PGM=CONDELE,
//             PARM=('&C1ELEMENT'),
//             MAXRC=12
//*
//TYPEIF1  IF (&C1TY(4,3) = 'SRC' | &C1TY = 'PSB') THEN
//C1LIB1  DD DSN=&DSPPREFX..&C1STAGE..&C1TY
//           DISP=SHR
//C1LIB2  DD DSN=&DSPPREFX..&C1STAGE..LOAD,
//           DISP=SHR
//*
//TYPELSE1 ELSE
//*
//TYPEIF2  IF (&C1TY = 'JCL' | &C1TY = 'PROC' | &C1TY = 'SYSIN' |
//             &C1TY(4,3) = 'MAC' | &C1TY(4,3) = 'CPY')  THEN
//*
//C1LIB1    DD DSN=&DSPPREFX..&C1STAGE..&C1TY,
//             DISP=SHR
//*
//TYPEEND2 ENDIF
//*
//TYPEEND1 ENDIF
//*

Environment

Release : 18.0, 18.1 

Component : CA Endevor Software Change Manager

Resolution

There are errors in the coding of the IF/THEN/ELSE statements

 

1. The valid operators are:

  • EQ or =
  • GT or >
  • NE or ¬=
  • LE
  • LT or <
  • GE

 

The processor has :

         //TYPEIF1 IF (&C1TY(4,3) = 'SRC' | &C1TY = 'PSB') THEN

It should be coded as follows: 

        //TYPE1    IF (('&C1TY(4,3)' EQ 'SRC') OR ('&C1TY' EQ 'PSB')) THEN



2. When using a substring within an IF statement in a processor, must put a set of single quotes around the substringing part of the statement. For example:
IF(('&C1ELEMENT(1,3)'='ACC'))

 

The working version of the processor should look like this: 


//TYPE1    IF (('&C1TY(4,3)' EQ 'SRC') OR ('&C1TY' EQ 'PSB')) THEN
//C1LIB1  DD DISP=SHR,DSN=&DSPPREFX..&C1STAGE..&C1TY               
//C1LIB2  DD DISP=SHR,DSN=&DSPPREFX..&C1STAGE..LOAD                
//*                                                                
//TYPELSE1 ELSE                                                    
//*                                                                
//TYPE2    IF (('&C1TY' EQ 'JCL')                                  
//         OR ('&C1TY' EQ 'PROC')                                  
//         OR ('&C1TY' EQ 'SYSIN')                                 
//         OR ('&C1TY(4,3)' EQ 'MAC')                              
//         OR ('&C1TY(4,3)' EQ 'CPY')) THEN                        
//C1LIB1    DD DISP=SHR,DSN=&DSPPREFX..&C1STAGE..&C1TY             
//*                                                                
//TYPEEND1 ENDIF                                                   
//*                                                                
//TYPEEND2 ENDIF                                                   
//*