06-21-2012 06:35 AM
I am getting one .CSV file along with control file.
Control file having number of records in .CSV file.
How can I check the records count in control file and .csv file records count.
Please any one help me about this. Thanks in advance.
06-21-2012 07:53 AM
One way to go:
You first read both the control and data file. Then you add a user written code node (or a user transformation if such comparison is used for more than one file). The code could look like something below ( not tested):
set <my data> nobs=nobs;
if <ctrl var containing number of obs> ne &nobs then <do something>;
06-22-2012 12:23 AM
You can create control table using Library contents transformation(please read it).
For example purpose i have hard coded the value(but you can get his values from control table) .
First create a job with your csv file and load into data set.After job is created then add post process code.
Hope this helps..
2050 data _null_;
2051 if &x=5 then job="Success";
2052 else job="fail";
2053 put job=;