why is the flag not imported to the called sub program when calling from main program.
program main:
data: flag(1) type c value 'y'. " to indicate called from main program
data: mem1(60) type c. " import zprogram output
mem1 = 'S'.
data: mem2(60) type c. " export flag to mem2
mem2 = 'p'.
export flag to MEMORY ID mem2.
submit zprogram
and return
IMPORT internaltable FROM MEMORY id mem1.
program sub.
data: flag(1) type c. " to indicate called from main
data: mem1(60) type c. " import zprogram output
key = 'S'.
data: mem2(60) type c. " export flag to mem2
mem2 = 'p'.
IMPORT flag from memory id mem2.
if flag = 'y'.
EXPORT internaltable TO MEMORY id mem1.
ENDIF.