0

input in zero byte file made in unix:

2000560|Bibek|28

3490679|kjdsk|56

1775679|Samrat|45

my output needed is

Bi

kj

Sa

2 Answers2

0

record string("|") col1; string("|") col2 string("\n") col3; end;

out::transform(in) = begin out.value::string_substring(in.col2, 1,2); end;

gbronner
  • 1,907
  • 24
  • 39
0

read file then use reformat. Below is the transformation out::reformat(in)= begin out.out_field:: string_substring(in.field2,0,2); end;

index starts from 0

Vishva
  • 1
  • 1