Hi all,
i need to find the number of records in a file. Meanwhile i shouldn't include 1st record and as well as last record. Consider 10 number of records contribute to 1 Block in a file.
Here, i need to calculate the total number of records and should divide the resultant by 10 (as Block has 10 records). If the resultant value is 5.9 then i should write the value as 6, if it 5.5 then also 6 and even if it is 5.1 then output should 6. Similarly, if the value is 7.1 then the output should be 8.
If we use the ROUND OFF function then 5.1 or 7.1 or 5.4 or 2.3 etc etc.. will be rounded off to their preceding whole number. So could any one suggest me a way to try this?hope you would got what am trying to say.
In short,
If a number has a deci mal value then it should be converted into their successive whole number (regardless of the Mathematics logic)
Your time will be highly appreciated.
Thanks in advance,
Veera
Number of records
Moderators: chulett, rschirm, roy
Re: Number of records
do u have to calculate records from dataset? or its in other format.
Re: Number of records
My input will be a mainframe file and i need to calculate the number of records based on the block sizekamalshil wrote:do u have to calculate records from dataset? or its in other format.
Thanks in advance...
veera...
veera...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ceil() is for parallel jobs only.
Do you need this count before the job runs, or as a result from the DataStage job?
In the first case get the result of wc -l pathname and subtract 2.
In the second case get the last value of @INROWNUM and subtract 2. The Aggregator stage can give a Last value.
Do you need this count before the job runs, or as a result from the DataStage job?
In the first case get the result of wc -l pathname and subtract 2.
In the second case get the last value of @INROWNUM and subtract 2. The Aggregator stage can give a Last value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ray,ray.wurlod wrote:Ceil() is for parallel jobs only.
Do you need this count before the job runs, or as a result from the DataStage job?
In the first case get the result of wc -l pathname and subtract ...
I couldn't see your content as am not a member. So could you reply back without that?Your help will be appreciated.Hope you would do.
Thanks,
Veera