NatRJE Issue

Hello All,
I am new to NatRJE. I’m getting HexRET = ‘000C’ i.e Invalid number of JCL cards.
01 #job-line (a80/1:80)
MOVE '//XXABCXXX JOB ‘SAP’,‘XYZ’,CLSS=X,MSGCLASS=X TO #JOB-LINE(1)
MOVE ‘//STEP01 EXEC NATT’ TO #JOB-LINE(2)
MOVE ‘//CMPRINT DD SYSOUT=*’ TO #JOB-LINE(3)
MOVE ‘/CMWKF01 DD DSN=ABC.ZZ, DISP=SHR’ TO #JOB-LINE(4)
MOVE ‘//CMYSYNIN DD ’ TO #JOB-LINE(5)
MOVE ‘LOGON XXXXXXX’ TO #JOB-LINE(6)
MOVE ‘XXXXXXXX’ TO #JOB-LINE(7)
MOVE '//
’ TO #JOB-LINE(8)

CALL ‘NATRJE’ #JOB-LINE(1:8) , 8, ‘L’, #error

Please suggest where i’m going wrong…

Don’t pass an array as the first parameter, just #JOB-LINE(1)

I’m still getting ‘000C’ as error

Are you really passing a literal 8 as the 2nd parameter ?

That needs to be a B4 field.

Thanks alot it worked

For legibility, ease of use, and ease of maintenance, I suggest some restructuring. Also, use tags to make the JCL stream a bit more dynamic.

DEFINE DATA LOCAL
1 #MJ (I4)         CONST <8>
1 #JCL (A80/#MJ)   INIT
  <"//XXABCXXX JOB 'SAP','XYZ',CLSS=X,MSGCLASS=X"
  ,"//STEP01 EXEC NATT"
  ,"//CMPRINT DD SYSOUT=*"
  ,"//CMWKF01 DD DSN=ABC.$PROGRAM$,DISP=SHR"
  ,"//CMSYNIN DD *"
  ,"LOGON $LIBRARY$"
  ,"$PROGRAM$"
  ,"//"
  >
1 #LIB (A8)
1 #PGM (A8)
1 #C (B4)
END-DEFINE
FORMAT LS=90
INPUT (AD=T)
      #LIB
      #PGM
EXAMINE #JCL (*) FOR "$LIBRARY$" REPLACE #LIB
EXAMINE #JCL (*) FOR "$PROGRAM$" REPLACE #PGM
ASSIGN #C = #MJ
DISPLAY #JCL (*)
CALL "NATRJE" #JCL (1)
              #C
              "L"
END