Sei sulla pagina 1di 2

Informatica Asssignment Execute all these one after the other. 1. Attached are two data files, CL_Transaction.

dat, Xt_Transaction.dat.The column names for CL_Transaction.dat file are Policy_Effective_Date, UserId, Policy_Expiry_date, RecordId, ran_amount and the column names for Xt_Transaction.dat file are RecordId, ran_code, ranId. 2. Taking the CL_Transaction.dat as the source file, lookup the Xt_Transaction.dat file with Record d as the lookup column. The final target file that is o!tained after the lookup must contain the following columns. Policy_Effective_Date, Policy_Expiry_date, RecordId, ran_amount, ran_code. ". After doing step ", to that target file, do the following. #. Add $ columns named %ear, month, date, hrs, minutes, seconds and di&ide the first_insert_date column into these $ fields. Ex! "###$%"&$#'(&( )* year ) "##%, month ) $%, date ) "&, hrs ) $#, +inutes)'(, seconds ) &(. $. Add a new column month_desc for which the output should !e the name of month Ex! month)$" )* month_desc ) ,anuary, month ) $( )* month_desc ) -e.uary. '. Create a new column time whose structure should !e hrs(minutes(seconds Ex! hrs)$#, minutes ) '(, seconds ) &( )* time ) $#!'(!&( ). Create new columns da%, dtfmt1, dtfmt2 which conform with the following rules Ex! year ) "##%, month ) $%, date ) "& day )* +onday or uesday or /ednesday 0.. 1i.e. the corresponding day of the date2, dtfmt" )* "&3ul "##% and dtfmt( ) $%4 "&4"##% *. Add three new columns +o!name, startdate, starttimestamp whose &alues will !e ,o!name -. name of the +o! that is running, startdate -. da% when the +o! started running, starttimestamp -. time when the +o! started running. /. Add a new field fmt_amt to 0ormat all the tran_amount &alues into 1. Ex! If the tran_amount ) "($$.$$ then fmt_amt ) 5",($$.$$ 6int ! Use fmt function 12. 3et onl% those records whose %ear - 1//). 11. n the su!routine that ha&e !een created for pre&iousl% with if code -4 14 5.. use a CA67 statement and e8ecute the same routine and the result must !e the same s o!tained with 0. 78DE_ E9 -I:E C9:7;6TR <31;6TR <32 122A=C:A2A;12A; 12AC:03122;A=C;A:C 222A:0L> 1;CA=;=AT ??1=12'$*/;R@<;0@< 112CA>TA*2;6ACA <;3A<3@LB L2"A:73" #;:RA3;A:: 12"CADE 2;0@<;6A<:

1"$TEA0=C=;sa<:%;6CaR 12$ALETA22;f99T=ALL;F9LL7B!All 12$A=??12*;C@R7;C@T7 12'A=C:1 ";L 9<;T 37R 1*2=C:0C ;L77;GAR<7 12'=AC:HHC;6C 9<;09R: 12*ALDTA?2;AccoR:;acuRA 1$2A=LTAC1;rAC; 2$1ACEA:02;;dRACA 1*2CAT012$;A C;6AC 12#A:70I=C;6D@R;:RA= 0or this code_te8tfile, do the following 1. Falidate the code using the following rules. f the code is in&alid, the whole record must !e loaded into a re+ect file. The length of the field must !e 12. f the code has J?4 replace the field with JE4 The first " characters of the code must !e a num!er and the ne8t # fields must !e characters KaLM, ALNO. f a field has a ? and has !een relaced with JE4 in the a!o&e first ) fields, the code is in&alid and if not then the code is &alid and should conforms with the a!o&e specification also. 2. Add a new field concats1s2 which concatenates the strings s1 and s2 Ex! string" )a.c and string( ) cde concats"s" )*a.ccde ;tring" )cde and string() concats"s( )*cde ". Add a new field conconcats1s2. To populate this field, compare !oth strings s1 and s2 and if s1.s2 then concats1s2 - . s1s2 and if s1Ps2 concats1s2 - . s2s1. #. Add a field count&owels and populate the field with the count of all the &owels Ka,e,i,o,u or A,7, ,9,@O present in the field concats1s2. $. Add a new field rep&ow. To populate this field, replace all the occurances of &owels Ka,e,i,o,u or A,7, ,9,@O with M%8w& respecti&el% i.e replace a -M,e-%,i-8,o-w,u-& Ex! amnipute )* <mnxpvty. '. Add a field countcode. Dopulate the field with the num!er of occurrences of JA4 in the code column. ). Add a new field, get_count_code. Dopulate this field with, get the concatenated &alue of the first and second fields of code column delimited !% JA4. 78( code - 12AC:03A12 get_count_code -. 12(C:03 *. Con&ert the concatss1s2 field into upper case and lowercases and dump them into two new columns.

Potrebbero piacerti anche