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 ?
RUN function not returning correct value
-
- Participant
- Posts: 10
- Joined: Fri Sep 23, 2005 10:27 am
Re: RUN function not returning correct value
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.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 "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.
-
- Participant
- Posts: 3
- Joined: Fri Jun 16, 2006 9:28 am
Re: RUN function not returning correct value
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
=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 ?
Senior DataStage TX Consultant
(On-site, Off-site services)
Email: edukulla@yahoo.com
Tel: 925-699-3949
Fax: 775-251-7649
(On-site, Off-site services)
Email: edukulla@yahoo.com
Tel: 925-699-3949
Fax: 775-251-7649