Below is the script to process unstructured file


A = LOAD 'input';

B = RANK A;

C = FILTER B BY $0 > 5;

D = FOREACH C GENERATE $1;

DUMP D;


// Data in file


DETAIL REJECT                          ***CONFIDENTIAL***                      03/11/16
                                          XYZ BANK
PGM NAME:IEWEWDLL                 EWS HOT UPDATES OF BOKSMREJECT REPORT
RPT IDEN:IEWEWOLL

ST     ACTT#FROM EULS        CUST  NAME      REJECTREASON     UPD                        
420     2016031202038346       1    -        INVALIDNUMBER    CHG