Looping or Iteration based on codes
Posted: Wed Oct 18, 2017 12:25 am
I have a requirement to generate the same set of records based on codes & input data.
my input data looks like
John|101|M|23
Kathy|102|F|40
Jean|103|M|23
Pauk|104|M|55
I have standard codes US,GB,MX,CA
and the output should be
John|101|M|23|US
John|101|M|23|GB
John|101|M|23|MX
John|101|M|23|CA
Kathy|102|F|40|US
Kathy|102|F|40|GM
Kathy|102|F|40|MX
Kathy|102|F|40|CA
Jean|103|M|23|US
Jean|103|M|23|GB
Jean|103|M|23|MX
Jean|103|M|23|CA
Paul|104|M|55|US
Paul|104|M|55|GB
Paul|104|M|55|MX
Paul|104|M|55|CA
my input data looks like
John|101|M|23
Kathy|102|F|40
Jean|103|M|23
Pauk|104|M|55
I have standard codes US,GB,MX,CA
and the output should be
John|101|M|23|US
John|101|M|23|GB
John|101|M|23|MX
John|101|M|23|CA
Kathy|102|F|40|US
Kathy|102|F|40|GM
Kathy|102|F|40|MX
Kathy|102|F|40|CA
Jean|103|M|23|US
Jean|103|M|23|GB
Jean|103|M|23|MX
Jean|103|M|23|CA
Paul|104|M|55|US
Paul|104|M|55|GB
Paul|104|M|55|MX
Paul|104|M|55|CA