01-16-2013 06:31 AM
we have a requirement like this.
|src col1||src col2||src col3|
|tgt col1||tgt col2||tgt col3.1||tgt col3.2|
We need to split the src_col3 into multiple rows such that in each row, the tgt_col3.2 will have only 4 characters. The no. of rows that can result from a single row is dynamic as it is based on the data length of the src_col3. tgt_col3.1 is a sequnece no whcih denotes, for each tgt_col1 ie."a", how many rows are made up.
Can this be achieved using SAS DI with any transformation?
01-16-2013 06:35 AM
Looks like a job for a data step within a User Written Code transformation.
The code will be as dynamic as you write it, using the transformations dynamic macro variables as much as possible.
01-16-2013 10:00 AM
The standard transformation scenario could be:
So it wouldn't be very dynamic...
01-16-2013 10:04 AM
Another option would be to: