yes you are exactly correct, its not a actual lookup but just existence check.
ok now i have kept all my requirements into this blog:
Routine name:ORIG_BANK_BIC
1) Initialize the varaibles as given to ""
2)If _FLAG[IN_COV] == 1 then --- this variable is set in jbTXN8952WireTxnTfm1 i.e. svFlagInCov
3)execute function Lookup_BIC passing AC_SEQ_ACU_ID_ORD as parameter and assign the
return value to _BIC variable -- the above field is obtained from the i/p file inward_cover record type AC_SEQB_ACU_ID_ORD column
4) If the return value from function is not = 'XXXXXXXXX' then
5) execute function LOOKUP_BIC_TO_ISO_COUNTRY passing _BIC set above as parameter and assign
return value to _ORIG_BANK_ISO variable.
6)If _FLAG[ADD] == 1 then --- this variable is set in jbTXN8952WireTxnTfm1 i.e. svFlagAdd
7)execute function Lookup_BIC passing AD_SWA_CD_ORD_BNK as parameter and assign the
return value to _BIC variable -- the above field is obtained from the i/p file add_pay record type
![Cool 8)](./images/smilies/icon_cool.gif)
If the return value from function is not = 'XXXXXXXXX' then
9) execute function LOOKUP_BIC_TO_ISO_COUNTRY passing -BIC set above as parameter and assign
return value to _ORIG_BANK_ISO variable.
10) IF (IN_FTG_CD_052 == 'A') --- this field is from i/p file inward record type
7)execute function Lookup_BIC passing IN_SWA_CD_BNK_ORD as parameter and assign the
return value to _BIC variable -- the above field is obtained from the i/p file inward record type
9) execute function LOOKUP_BIC_TO_ISO_COUNTRY passing -BIC set above as parameter and assign
return value to _ORIG_BANK_ISO variable.
10) IF (IN_SWA_CD_BNK_ORD is null or blank)
11)execute function Lookup_BIC passing IN_SWA_CD_FUL_DST as parameter and assign the
return value to _BIC variable -- the above field is obtained from the i/p file inward record type
12) execute function LOOKUP_BIC_TO_ISO_COUNTRY passing _BIC set above as parameter and assign
return value to _ORIG_BANK_ISO variable.
13) IF (IN_FTG_CD_053 == 'A') --- this field is from i/p file inward record type
14) assign 'XXXXXXXX' to _BIC variable
15) execute function Lookup_BIC passing IN_SWA_CD_SBC as parameter and assign the
return value to _FINT_BIC variable -- the above field is obtained from the i/p file inward record type
16)execute function LOOKUP_BIC_TO_ISO_COUNTRY passing _FINT_BIC set above as parameter
and assign result to variable _FINT_BANK_ISO
17) Assign _FINT_BANK_ISO set above to _ORIG_BANK_ISO variable
18)execute function Lookup_BIC passing IN_SWA_CD_FUL_DST as parameter and assign the
return value to _SINT_BIC variable -- the above field is obtained from the i/p file inward record type
19)execute function LOOKUP_BIC_TO_ISO_COUNTRY passing _SINT_BIC set above as parameter
and assign result to variable _SINT_BANK_ISO
20) execute function Lookup_BIC passing IN_SWA_CD_FUL_DST as parameter and assign the
return value to _SENDER variable -- the above field is obtained from the i/p file inward record type
21) assign 'XXXXXXXX' to _BIC variable
22)execute function LOOKUP_BIC_TO_ISO_COUNTRY passing _SENDER set above as parameter
and assign result to variable _ORIG_BANK_ISO
23) Assign _SENDER set above to _FINT_BIC variable
24) Assign _ORIG_BANK_ISO set above to _FINT_BANK_ISO variable
where
ORIG_BANK_BIC is a routine in which 2 functions a)Lookup_bic b)LOOKUP_BIC_TO_ISO_COUNTRY are called several times.
_FLAG[IN_COV],_FLAG[ADD],IN_FTG_CD_052 ,(IN_FTG_CD_053 ) are the stage variables which are already defined in transformer.
and remaining others which has "_" like _bic are C variables.
please let me know if this can be done through any way either with routines, datastage itself or through job control etc.
so the above scenario of looking up the file in unix is required for LOOKUP_BIC_TO_ISO_COUNTRY function.
please give some suggestions regarding this.