Hi Guys,
Good evening.
I need to get first and last record from input file having millions of rows.
In unix i know the command Head but here i am using Windows O/S.
Can you please give me suggestions.
Thanks in advance.
Reddy
How do i get fisrt and last rows in windows environment
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Reddy
As Ray said "Write your Own" its easy.
Create a job in datastage itself to read a sequential file and in constraint have @INROWNUM =1 to one link. This will create the first record in the output file. Have another link directed to Aggregator and use the LAST option to write the last record to the next link. This will produce the last record.
The only draw back it is sequential and has to scan the entire file.
Thanks
As Ray said "Write your Own" its easy.
Create a job in datastage itself to read a sequential file and in constraint have @INROWNUM =1 to one link. This will create the first record in the output file. Have another link directed to Aggregator and use the LAST option to write the last record to the next link. This will produce the last record.
The only draw back it is sequential and has to scan the entire file.
Thanks
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar