RUN function not returning correct value

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
manojmmx
Participant
Posts: 8
Joined: Tue May 09, 2006 2:45 am
Location: Pune

RUN function not returning correct value

Post 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 ?
rodneycrowe
Participant
Posts: 10
Joined: Fri Sep 23, 2005 10:27 am

Re: RUN function not returning correct value

Post 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.
techpeople
Participant
Posts: 3
Joined: Fri Jun 16, 2006 9:28 am

Re: RUN function not returning correct value

Post 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 ?
Senior DataStage TX Consultant
(On-site, Off-site services)
Email: edukulla@yahoo.com
Tel: 925-699-3949
Fax: 775-251-7649
Post Reply