000-349 · Question #57
Which of the following is the best approach for creating a variable number of output files from a single input file.
The correct answer is B. Use the PUT function in a second output card to write each transaction to a file whose name is. This question tests knowledge of dynamic output file generation in WebSphere Transformation Extender (WTX), specifically how to produce a variable number of output files from one input.
Question
Which of the following is the best approach for creating a variable number of output files from a single input file.
Options
- ACreate an entry in the Resource Registry and reference it in the output card definition.
- BUse the PUT function in a second output card to write each transaction to a file whose name is
- CUse the RUN function and the E command line qualifier to generate output filenames
- DUse the ECHOOUT function and a generated filename in the first rule of each physical output
- EUse a wildcard expression in the output filename and set the Transaction Scope=Burst.
How the community answered
(49 responses)- A8% (4)
- B84% (41)
- C2% (1)
- D4% (2)
- E2% (1)
Why each option
This question tests knowledge of dynamic output file generation in WebSphere Transformation Extender (WTX), specifically how to produce a variable number of output files from one input.
The Resource Registry stores adapter configuration references but does not itself provide a mechanism to dynamically generate a variable number of output filenames at runtime.
The PUT function in WTX allows a map to programmatically write data to a file whose name is constructed at runtime, enabling a variable number of uniquely named output files to be generated from a single input. By placing this logic in a second output card, the map can iterate over transactions and emit each to a dynamically named file. This is the standard WTX pattern for fan-out file generation.
The RUN function invokes an external process and the E qualifier passes environment variables, but this does not directly control the creation of multiple output files within the map's own output processing.
ECHOOUT writes data to the execution log or console rather than to named output files, so it cannot be used to generate variable output files.
Wildcard expressions in output filenames combined with Transaction Scope=Burst support splitting output by transaction boundaries into a fixed naming pattern, but do not support truly dynamic or programmatically constructed filenames.
Concept tested: WTX PUT function dynamic output file generation
Topics
Community Discussion
No community discussion yet for this question.