Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett , rschirm , roy
naren6876
Participant
Posts: 233 Joined: Mon Feb 07, 2005 7:19 pm
Post
by naren6876 » Tue Jun 27, 2006 8:19 am
Hi all,
Is tehre anyway that i can find a last row number ina sequential file which can be used in constraint as @OUTROWNUM = Lastrownum?.
Any input would be highly appreciated.
Thanks in advance.
kumar_s
Charter Member
Posts: 5245 Joined: Thu Jun 16, 2005 11:00 pm
Post
by kumar_s » Tue Jun 27, 2006 8:31 am
Use this in a command activity prior to the job being called, and pass the output as parameter.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kcbland
Participant
Posts: 5208 Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:
Post
by kcbland » Tue Jun 27, 2006 8:44 am
Run all data thru an Aggregator and use LAST derivation for all columns with no GROUP set.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
kumar_s
Charter Member
Posts: 5245 Joined: Thu Jun 16, 2005 11:00 pm
Post
by kumar_s » Tue Jun 27, 2006 8:48 am
This gives the last record. If you need the last record no, simply count the total no of record using aggregator.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue Jun 27, 2006 4:28 pm
Why not just use tail -1 filename as a filter in the Sequential File stage that reads the file?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.