Natural call Cobol Cics

I have a natural program. That program is executed online and batch. This program is calling a cobol-cics subroutine.

I want to call this subroutine using 2 locals, something like this:

Batch:
CALL SUBROUTINE USING DFHEIBLK LOCAL1 LOCAL2

Online:
SET CONTROL ‘P=C’
CALL SUBROUTINE USING LOCAL1 LOCAL2

When the natural execute on CICS, this call works appropriately.When executed on batch, the subroutine was executed using only LOCAL1

How can I call the subroutine using 2 locals?

DISPLAY on batch:

APPLID(ROS0P01) USER(UY5,I698705) L PENDING
JOB(J547D480,72036) SCRL CSR COLS 00002 00074 F 05 P 0001
…+…1…+…2…+…3…+…4…+…5…+…6…+…7…
=============================== T O P =================================
000001 CBRS196D-INICIO: BC0011J547D480CBRN353 0000
000002 0
000003 0000000 CBRKCTL-FIM 00000000
000004 CBRS196D-DEPOIS: BC0011J547D480CBRN353 0000
000005 00000
000006 0000000 CBRKCTL-FIM 00000000
============================ B O T T O M ==============================

Local 1 has 280 bytes and finish with CBRKCTL-FIM

local 2 has 46 bytes and has not the correct values

The display must be something like this:

APPLID(ROS0P01) USER(UY5,I698705) L PENDING
JOB(J547D480,58737) SCRL CSR COLS 00002 00074 F 05 P 0001
…+…1…+…2…+…3…+…4…+…5…+…6…+…7…
=============================== T O P =================================
000001 CBRS196D-INICIO: BC0011J547D480CBRN353 0000
000002 0
000003 0000000 CBRKCTL-FIM0000000000606730
000004 CBRS196D-DEPOIS: BC0011J547D480CBRN353 0000
000005 00000
000006 0000000 CBRKCTL-FIM0000000000606730
============================ B O T T O M ==============================

Any suggestion?

CALL SUBROUTINE USING DFHEIBLK LOCAL1 LOCAL2

Could we see a breakdown of LOCAL1 and LOCAL2?

Also, are you using the CALL statement or do you think you are using CALL SUBROUTINE (there is no such statement).

CALL SUBROUTINE USING DFHEIBLK LOCAL1 LOCAL2

In the above, Natural will see a CALL to a subroutine called subroutine, then will be passing three arguments DFHEIBLK LOCAL1 LOCAL2 .

I presume you actually have something like CALL DFHEIBLK (or do you have a CALL FILE statement?) LOCAL1 LOCAL2.

The CALL statement can take up to 128 arguments. Are there more than 128 variables in the combined LOCAL1 and LOCAL2?

Please note, from the Natural documentation:

For %P=C, the restriction applies that group arrays cannot be passed. Not clear what happens if there is an array within LOCAL1 or LOCAL2. The documentation suggests alternative structures.