Page 1 of 1

RUN function not returning correct value

Posted: Sun May 21, 2006 11:31 pm
by manojmmx
I am calling a child map using the RUN command from map rule.
as below.


=VALID(Run("LogoMap.mmc", HANDLEIN(1,(C[77]:.:In1+C[78]:.:In1)+ " -OE1")),
"000")

The child map is doing the correct Lookup and returning the correct value which i can see in the debugger tool ( I am using TX 8.0) But the RUN function is returning '21' instead of the actual output of child map , "Logomap.mmc"

What could be the problem ?

Re: RUN function not returning correct value

Posted: Mon May 22, 2006 10:02 am
by rodneycrowe
manojmmx wrote:I am calling a child map using the RUN command from map rule.
as below.


=VALID(Run("LogoMap.mmc", HANDLEIN(1,(C[77]:.:In1+C[78]:.:In1)+ " -OE1")),
"000")

The child map is doing the correct Lookup and returning the correct value which i can see in the debugger tool ( I am using TX 8.0) But the RUN function is returning '21' instead of the actual output of child map , "Logomap.mmc"

What could be the problem ?
The RUN() function returns a code from the child map execution, not the output data itself. To return the ouput data you need to override the output card with the "OE#" command.

The "21" is the return code for the child map execution, "21" is the return code for Input valid but unknown data found" You will have to look at the map trace for the child map to determine what is wrong.

Re: RUN function not returning correct value

Posted: Fri Jun 16, 2006 9:47 am
by techpeople
Also always use PACKAGE(input value) when passing data to run maps. this way you can ensure the data to runmap input cards are sent in proper syntax(with initator, terminators). your code would be:

=VALID(Run("LogoMap.mmc", HANDLEIN(1,(PACKAGE(C[77]:.:In1)+PACKAGE(C[78]:.:In1))+ " -OE1")),
"000")

Regards,
Kiran
manojmmx wrote:I am calling a child map using the RUN command from map rule.
as below.


=VALID(Run("LogoMap.mmc", HANDLEIN(1,(C[77]:.:In1+C[78]:.:In1)+ " -OE1")),
"000")

The child map is doing the correct Lookup and returning the correct value which i can see in the debugger tool ( I am using TX 8.0) But the RUN function is returning '21' instead of the actual output of child map , "Logomap.mmc"

What could be the problem ?