(I did search before posting...if I've missed it just tell me the text to search for...)
Seq file --> xfm --> Seq file
xfm has the constraint: NewKey
NewKey is determined by RowProcCompareWithPrevValue.
All is good except for the last record in the file. Does DS provide a variable for EOF condition? In pseudocode, I would change my constraint to:
NewKey or DSEof
Same question if source is a RDBMS table.
How to detect end of file
Moderators: chulett, rschirm, roy
Short answer? Nope.
Sometimes you can 'pre-count' the data and pass the number in as a parameter for use in a constraint or derivation. Some people will cat a known 'end of file' record onto the source or into the stream so you can tell when you've hit the end. Another thought relates to 'group change detection', sometimes you can order descending and key off the first group item rather than the last and avoid the need to know when you've hit the end.
Hope something there helps.
![Sad :(](./images/smilies/icon_sad.gif)
Sometimes you can 'pre-count' the data and pass the number in as a parameter for use in a constraint or derivation. Some people will cat a known 'end of file' record onto the source or into the stream so you can tell when you've hit the end. Another thought relates to 'group change detection', sometimes you can order descending and key off the first group item rather than the last and avoid the need to know when you've hit the end.
Hope something there helps.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Thanks Craig. The question was in relation to viewtopic.php?t=126366&highlight=.
My workaround was essentially the 'pre-count' approach, joining the table back with itself based on the RowNum.
My workaround was essentially the 'pre-count' approach, joining the table back with itself based on the RowNum.