Page 1 of 2

@INROWNUM ?

Posted: Mon Aug 28, 2006 4:59 pm
by DeepakCorning
What Exactly in @INROWNUM??

My Understanding was @INROWNUM is the input row Counter and is independent of the Table Count. But in One of my job the value that the @INROWNUM has is the Count in the table and I am not at all able to understand this. Is my understanding of the variable wrong???

Posted: Mon Aug 28, 2006 5:13 pm
by kris007
You are right that it is the input row counter. But I am not clear when you say Table Count. What are you referring to as a table count and where exactly are using this variable? In the constraint section or in the derivation? and for what are you using it?

Posted: Mon Aug 28, 2006 5:25 pm
by DeepakCorning
I am using it in My logic... X should get a value when @INROWNUM = 1 (For the First row) and some other row if @INROWNUM > 1 and I am using this logic from years but Today for one environment the variable is not working correct. Its not getting assigned 1 at all.
I really appreciate your help in this matter...

Posted: Mon Aug 28, 2006 5:40 pm
by kris007
You will have to be more clear on what exactly you are tying to do? From what I understand you are using it in a derivation where in you are trying to collect some values based upon your @INROWNUM variable value. Is that correct? If so, are you also defining any constraint in the Transformer?If so, looks to me that the first row from the input doesn't qualify for the constraint and hence not picking the first row. If now, please answer the questions asked in the earlier post.

HTH

Posted: Mon Aug 28, 2006 5:53 pm
by DeepakCorning
I am sorry if I did not give you the full details of the job and confused you.
I am trying to assign a column a value depending on the whther the row is the first one to flow in the job or not. If it is the first row to get processed in the job then the column should get calculated differently and when it is second,third.... then it should get a different value. The probelm that I am having is the Variable @INROWNUM is not getting set to "1" (I populated a sequential file with all the values thatI am getting for this variable and the first one is "2" instead of "1") and hence the logic is not working. No, I am not using it in any kind of constraint.
So I just wanted to know that if there are any reasons of this variable not getting a value 1 for the first row.
Let me know if you have any more doubts.

Posted: Mon Aug 28, 2006 8:45 pm
by ray.wurlod
I have severe doubts about your claim. @INROWNUM is always assigned 1 for the first row input.

Of course, due to output constraints this row may not be output, but what I say is, and remains, true.

Perhaps you want @OUTROWNUM ?

Posted: Tue Aug 29, 2006 8:35 am
by DeepakCorning
I agree Ray. But here is what I m observing in my job - If I set the job to run for only 947 rows then the @INROWNUM value starts from 1 and goes upto 947 but if I run it for more than 947 rows then it starts from 2 and the value of 948 repeats twice and it goes upto the final rowcount.
I know its hard to blv but can not help its happening :(--

Let me try to paste the data (The Last column is the inrownum)

6006.00000,945.00000,946.00000
6006.00000,946.00000,947.00000
6006.00000,947.00000,948.00000
6006.00000,948.00000,948.00000
6006.00000,949.00000,949.00000
6006.00000,950.00000,950.00000

Posted: Tue Aug 29, 2006 9:23 am
by uegodawa
Have you tried with @OUTROWNUM. Because I had a similar issue and I used @OUTROWNUM to solve the problem.

Posted: Tue Aug 29, 2006 9:25 am
by Mike
Is your transformer connected to another active stage? Try turning off row buffering if that's the case.

Mike

Posted: Tue Aug 29, 2006 9:26 am
by DeepakCorning
I am actually doing the calculation in stage variables so OUTROWNUM will not work in the stage variables. But if no choice then I have to use that variable.
But it still leaves the question why this system variable is not working??

Posted: Tue Aug 29, 2006 9:32 am
by chulett
I don't think it's possible to answer your question without seeing the actual job and what you are doing in it. As in posting a dsx export of it somewhere.

Posted: Tue Aug 29, 2006 9:32 am
by ArndW
How do you set the job to run only 947 rows? If it is via the normal job execution call then I've tried the same thing and can't reproduce your problem with AIX and 7.5

Posted: Tue Aug 29, 2006 9:55 am
by DeepakCorning
Yes the usual way , while running it gave a option to run for specific number of rows.

And its not happening with any other job but only with this one. I am not modifying the param anywhere , not filtering out anything but still. Strange fact is it starts from 2 and repeats at 948 no matter what you do and how you run :)

Posted: Tue Aug 29, 2006 6:12 pm
by kumar_s
By the way, what is second columna and what is third column?
Have you given any constrains, used in any stage varialbe?
Try to map this value in a integer.
What is the job design and what are you trying to acheive?
Hope you have tried running in a sequential mode too.

Posted: Fri Sep 22, 2006 7:42 pm
by DeepakCorning
The Third Column and the second column are just counters which depends on the INROWNUM value. But as the INROWNUM is not getting the value 1 they are starting with wrong values.
I am just trying to assign the counters values depending on if it is the first row in the stage or not.
No Constraints on the variable in the job and also I am not using it anywhere other than this stage.

And one more thing that i tested is that the value is getting wrong value only in this "stage". Right now I changed my logic to go after the inrownum in the previous stage but I am really curious to know why this happens and whts the solution to this?