Originally posted by: SystemAdmin
Hi ASK,
I think in your case you better create a second map that has two input cards, one containing 1 header, and one containing s Details. You then call this map with RUN() for each Hdr you have, and you pass the following inputs to your second map:
-
the Hdr
-
all corresponding Details to this Hdr (with extract)
Here is an idea of how your RUN function will look like :
=VALID(RUN ( "Create_One_File", ECHOIN( 1, PACKAGE (Hdr) ) + ECHOIN( 2, PACKAGE ( EXTRACT (...all Dtl corresponding to given Hdr...) ) + " -OF1 File_xxxHdrxxx.txt"),
FAIL ("Error running map Create_One_File " + LastErrorCode() + " " + LasterrorMsg() ) )
The option -OF1 means you override the adapter of output card one with "File" and specify the filename with something coming out of your Hdr.
Hope this will help :)
François
#IBM-Websphere-Transformation-Extender#DataExchange#IBMSterlingTransformationExtender